I am pretty new to MFC and have been having big problems for the last few weeks trying to show a simple dialog box from a resource file.
The compiler I'm using is MetroWerks CodeWarrior v4 and all attempts to make a dialog box display have failed, either with errors or just nothing appearing.
Could someone please post the program to just display a dialog box IDD_DIALOG1 from a resource file: resource1.res - I think I must be doing something really simple wrong?
Why not post what you have and we will correct, will get a better response than asking us to write the code for you.
Ensure you are including 'resource.h' and 'script.rc' to use a dialog from resouce.
Check the return from the createDialog() or similar and if NULL call GetLastError() to help you debug.
First of all you must make a class for your dialog:
I suppose you have a project and a dialog box , and just want to connect between them?
1/ on an empty erea of the dialog box ; click the right mouse botton -->> select : ClassWizard; and agree creating the class.
look at the name of the class : it's the dialog box class.. i.e
2/ in the View Class , and in any function you want (up to your desire) and creat new object of the dialog class:
after that call the DoModal function :
and it will apear.