Hi there!
I've been having all sorts of trouble compiling code that will show a dialog box recently. It appears after much searching I'm getting confused between two rather separate entities.
If I tried to use a straightforward simple windows program (say one that just opens a small window and ends when you close it) and then added a dialog box to it, I got terrible problems when I tried to compile and sometimes even after compiling I'd hit a run time error.
I was trying to use the method of dialog box creation that requires an existing class that implements the dialog box. The class has to descend from the base class CDialog, and then call one of its member functions. Theres functionality in Visual C++ that does some of this for you provided a class is already declared and descends from CDialog. Even adds a new function for you specifically for the button you're editing.
However this is what caused all the trouble. Getting it to compile was very difficult and then some of the weirdest run time errors I've ever seen occurred even when it did.
When I switched to just using the function DialogBoxW and the required parameters for it, it ran fine. When I checked Microsoft's documentation it became further apparent the methods I was trying to use fall under two umbrellas and I've been getting them mixed up.
So my question is...what is the difference between them? I know one is MFC (Microsoft Foundation Class) orientated and the other Windows orientated but I don't get the difference.
I'm also a bit worried that using the windows version might restrict some functionality but I might be getting a bit paranoid there.
Thanks