To start with, just for proper HANDLE'ing of various things you might want to finish your case conditions:
switch (ul_reason_for_call)
{
case DLL_PROCESS_ATTACH:
g_hInstance = hModule;
case DLL_THREAD_ATTACH: case DLL_THREAD_DETACH: case DLL_PROCESS_DETACH: g_hInstance = null;
break;
}
return TRUE;
Then perhaps in your MetaTest you have passed in a HWND, as is from a Parent window, as you know a parent window can have several children. Then Within the call to CreateDialogParamA, you have used your CALLBACK function DialogFunc without the (,,,..) to initialize it.
MT4_EXPFUNC int MetaTest(HWND hWnd)
{
MSG msg;
BOOL msgstatus;
HWND hDlg = CreateDialogParamA(g_hInstance, MAKEINTRESOURCE(IDD_METATEST), hWnd, DialogFunc, 0);
So every time you opened a new module (dialog), you didn't ShowWindow(SW_HIDE) the old one.
Then you have a While loop, that is running the 'msg' pump, and that too will show all open previously inactive child windows.