[Dev-C++] how to make dialog box at foreground?
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Jessica C. <jes...@gm...> - 2007-12-07 21:08:27
|
dialog box1 (DLG1) and dialog box2 (DLG2) can be popped up in front of main
dialog box (IDD_MAIN).
then I tried to make main dialog box (defined by IDD_MAIN) to the foreground
by clicking on it.
but it doesn't work. it stills as a background.
what is the problem here?
btw, DLG1 and DLG2 can shift to the foreground by clicking on them easily.
my structure of code is as follows.
WndProc()
{
switch(msg)
{
WM_COMMAND:
ID_1: CreateDialog(g_hInst, "DLG1", hwnd, DlgProc1);
break;
ID_2: CreateDialog(g_hInst, "DLG1", hwnd, DlgProc1);
break;
}
break;
}
WinMain()
{
CreateDialog(GetModuleHandle(NULL), MAKEINTRESOURCE(IDD_MAIN),NULL,
WndProc);
}
|