Hello,
I want to load a dialog box when a menuitem is clicked, I've got the code for a dialog box in a resource file using the DIALOGEX stuff and the name of my dialog box is IDD_ADD. Can someone please give me the code here in this format:
case IDM_MENUITEM:
//How to load the dialog box.
break; or return 0; //Whichever one it is, idk.
Thank you!!!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
hmmmm did you even do a search before you came posting here????? Try to help yourself next time as this one of the more frequent tutorials out on the web.
Hello,
I want to load a dialog box when a menuitem is clicked, I've got the code for a dialog box in a resource file using the DIALOGEX stuff and the name of my dialog box is IDD_ADD. Can someone please give me the code here in this format:
case IDM_MENUITEM:
//How to load the dialog box.
break; or return 0; //Whichever one it is, idk.
Thank you!!!
hmmmm did you even do a search before you came posting here????? Try to help yourself next time as this one of the more frequent tutorials out on the web.
the result of a search..
http://winprog.org/tutorial/
I haven't used this, but here is some sample code I got from a website that I've been meaning to play around with:
hDlg=DialogBox(hInst, MAKEINTRESOURCE(IDD_ADD), hwnd, (DLGPROC)MyProc);
EndDialog(hDlg, nResult);
Then you would have:
INT_PTR CALLBACK MyProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
for you procedure.
You can look up those functions on MSDN for all the details.