I have found that the problem comes out when I use this code (see below) inside my ThreadFunc.
g_hElmbDialog = handle of the dialog I call the thread.
If intead of calling CreateDialog using g_hElmbDialog, I use NULL, it works!!
boh??
Code:
g_hWaitBox = CreateDialog(GetModuleHandle(NULL), MAKEINTRESOURCE(IDD_WAITBOX), g_hElmbDialog, (DLGPROC)About);
if(g_hWaitBox != NULL)
ShowWindow(g_hWaitBox, SW_SHOW);
else
MessageBox(g_hElmbDialog, "CreateDialog Returned NULL", "Warning!", MB_OK | MB_ICONINFORMATION);
Do you know why??