-
Hello!
I started with VC++ and I'd need some help (greatly appreciated).
I use resources (dialogs) and I'd like to know how can I load another dialog through code 'cause I just can't figure it out. I've already looked in MSDN Library, but I found nothing useful.
Are there any MFC (and dealing with resources) tutorials? I've found some MFC tutorials, but none of them were including resources and dealing with them. Any suggestions?
-
If you're using MFC, right-click on the dialogue in the dialogue editor, and choose ClassWizard. It should ask you if you want to make a new class for it.
For non-MFC, use the CreateDialog function:
Code:
HWND hMyDlg;
if(hMyDlg = CreateDialog(hInstance, MAKEINTRESOURCE(IDD_MYDIALOG), NULL, DlgProc)) {
ShowWindow(hMyDlg, SW_SHOW);
}
Where DlgProc is your Dialogue Box Procedure (see the Platform SDK).
-
Thanks.
But what I really want is that:
I have created dialog (in resources) and I want to show another dialog when user presses button on my main dialog. How can I do that, 'cause I've tried something but it didn't work out anything.
-
I'll send you an example project in a bit. You're on VC6, aren't you?
-
Could you do this for me and send me an example?
I have VS6 (SP3).
My e-mail: [email protected]
Thanks.