A LHAPI application is also a System Manager application. First, a LHAPI app must register itself as a System Manager application, then register itself as a LHAPI application. The two are very distinct, and although you can have a System Manager application without LHAPI, you cannot have a LHAPI application without the System Manager. Here is a typical initialization:
//Register ourself with the System Manager:
m_init_app(SYSTEM_MANAGER_VERSION);
//Register our application's name (the user will see this):
m_reg_app_name("My Test App"); //Register our far pointer table (in case we need to make dynamic memory allocations:
#define countof(x) (sizeof(x)/sizeof(x[0]))
char far *SysMgrFarPtrs[10];
m_reg_far(&SysMgrFarPtrs, countof(SysMgrFarPtrs), 0);
Next, any initialization required for LHAPI should be done.
//Register our application with LHAPI.
LHAPIBLOCK LHAPIData;
InitializeLHAPI(&LHAPIData);
//Set the default font and the menu font to 64x18
SetMenuFont(FONT_NORMAL);
SetFont(FONT_NORMAL);