Hi everyone,
I think most of this is down to my lack of knowledge, but anyway...
I have a program with two buttons to open two different dialog boxes. The first one works fine, and all the commands I put in place for the buttons on the first dialog box work. Then, when I add the following code for a close button on the second dialog box, nothing happens:
Code:
case IDC_OTHER2: //Pressing an exit button on dialog box 2.
EndDialog(hwnd, 0);
break;
The above is placed in the same location as the same command for the close button of the first dialog box, which works fine.
Also, how do I get a dialog based program to appear on the taskbar at the bottom, and how do I give it an 'X' button in the upper right corner? Here is the code I have for creating the main menu of the program:
Code:
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
LPSTR lpCmdLine, int nCmdShow)
{
return DialogBox(hInstance, MAKEINTRESOURCE(IDD_SDTSEL), NULL, ToolDlgProc);
}
I put this down to my own general lack of knowledge on the subject, so if anyone could point me in the right direction, it would be much appreciated.
Thanks.