WinMain will provide this for you:
int PASCAL WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpszCmdLine, int nCmdShow)
{
ghInstance = hInstance;
hDlgLog = CreateDialogParam(ghInstance, (LPCSTR) DLG_LOG, hTab, DlgLog, 0);
In the event that this is not an option you can do the following:
int main(int argc, char *argv[])
{
HINSTANCE ghInstance;
ghInstance = GetModuleHandle(NULL);
hDlgLog = CreateDialogParam(ghInstance, (LPCSTR) DLG_LOG, hTab, DlgLog, 0);
regards,
DMac