Can anybdy help me please. I am learning Visual C++ 6.0 and developing MFC AppWizard applications.
Q1)
I try to add a user deifined diaolog box window to my application. I name it as CMsgDlg and its base class is set to CDialog. When I create the user defined window by calling CDialog::DoModal() method, I seem to have 2 choices to close the window. That is, in a function of the user-defined window, I could call either OnOK() or EndDialog(). I am not quite sure what they do! Do I call OnOK() to make the window invisible and call EndDialog() to destroy the window? The Help manual is not clear about it! It seems to suggest that, for a user-defined modal window created by CDialog::DoModal(), both OnOK() and EndDialog() make the window invisible or both of them destroy the window!! I am confused. Could anyone tell me (1) how to make the user-defined modal window just invisible, & (2) how to destroy it!! The manual seems to suggest that, for a window created by CDiaolog::DoModal(), DestroyWIndow() method is not used at all!
Q2)
I have added the following 5 lines in my C++ program:
char *pt;
const char *cpt;
CString Msg = "hello";
cpt = (const char *)Msg; //This is OK!
No one has replied yet! Why not be the first?
Sign in or Join us (it's free).