I was just looking through my win32 api reference and i found the LoadMenu and SetMenu functions, now i wanned to show a menu - i specified it in my resource - in my modal dialog so i put the functions under WM_INITDIALOG like this: invoke LoadMenu,hDlg,CalcMenu invoke SetMenu,hDlg,eax LoadMenu gives the returnvalue (the Menu Handle) in eax i also tried this: .data MenuName db "CalcMenu",0 . . .code invoke LoadMenu,hDlg,addr MenuName invoke SetMenu,hDlg,eax both doesn't work Regards Typhoon
Posted on 2001-04-01 00:32:00 by Typhoon
Your error is classic: it happens to all beginners to the art of Windows programming. You confuse between dialog/window handle and instance handle. They are not the same thing. A dialog handle represents a dialog box while an instance handle represents the whole process. In your LoadMenu line, you use hDlg instead of hInstance.
Posted on 2001-04-01 05:31:00 by Iczelion
Thanks Iczelion, i just learned a little more, :) regards
Posted on 2001-04-01 13:34:00 by Typhoon