Adding a Menu to a Dialogbox?
Hello,
I was wondering if it's possible to add a menu to my Dialogbox as I use it as the main window for my entire program.
My RC file looks like this
Code:
IDD_MAIN_DLG DIALOGEX 200, 100, 329, 200
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION |
WS_SYSMENU
CAPTION "Removed"
FONT 8, "MS Shell Dlg" // , 400, 0, 0x1
BEGIN
LTEXT "Server Address:",IDC_STATIC,68,14,72,8
EDITTEXT IDC_SERVER_ADDRESS,125,10,100,12,ES_CENTER | ES_AUTOHSCROLL
LTEXT "From:",IDC_STATIC,18,44,72,8
EDITTEXT IDC_FROM,40,40,100,12,ES_CENTER | ES_AUTOHSCROLL
LTEXT "To:",IDC_STATIC,185,44,72,8
EDITTEXT IDC_TO,200,40,100,12,ES_CENTER | ES_AUTOHSCROLL
LTEXT "Subject:",IDC_STATIC,18,64,72,8
EDITTEXT IDC_FROM,45,60,250,12,ES_RIGHT | ES_AUTOHSCROLL
The rest is not implemented yet but it is working thus far. It is invoked through this command in the main program.
Code:
DialogBox(hInstance, MAKEINTRESOURCE(IDD_MAIN_DLG),
hWnd, reinterpret_cast<DLGPROC>(DlgProc));
I'm not sure where I would specifiy a menu, I know a couple ways of creating them, but you need to load them using loadMenu and createwindowex which I don't use. If it's possible to add a menu to the dialogbox, I'd really appreciate knowing how.