OK, I have a my main program dialog, which has a menu and a tree view. At some time in the program the user will activate a child dialog to be displayed. Now when this happenes I get troubles.
1)When right clicking on title bar or left clicking on small icon: The system menu doesn''t show up.
2)I completely lose focus of my menu on treeview. Thou when I click repeatedy on the treeview control some, but not all of the tree view nodes show up...
Child dialog stuff:
DLGTEMPLATE* g_pChildDlgs[2];
//....
g_pChildDlgs[0] = (DLGTEMPLATE *)LockResource(LoadResource(g_hMainInst, FindResource(0, MAKEINTRESOURCE(IDD_ONE), RT_DIALOG)));
g_pChildDlgs[1] = (DLGTEMPLATE *)LockResource(LoadResource(g_hMainInst, FindResource(0, MAKEINTRESOURCE(IDD_TWO), RT_DIALOG)));
//....
hChildDlg = CreateDialogIndirect(g_hMainInst, g_pChildDlgs[0], hWnd, OneDlgProc);
ShowWindow(hChildDlg, SW_SHOW);
Proc:
BOOL CALLBACK OnetsDlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
switch(uMsg)
{
case WM_INITDIALOG:
{
SetWindowPos(hDlg, HWND_TOP, 193, 25, 0, 0, SWP_NOSIZE);
return TRUE;
}
break;
}
return TRUE;
}
..anyone?....
One Must Fall: Battlegrounds