Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Add menu to dialog
#1
Hi,

I am trying to add a menu to a dialog. This was easy in previous versions of QM but in the latest version after I have added the menu in either the dialog editor or toolbar the menu item does not appear. Not sure where I am going wrong?

The following is a basic dialog with a File > Open menu added

Function Test_Menu
Code:
Copy      Help
str md=
;BEGIN MENU
;>&File
;,&Open :501 0x0 0x0 Co
;,<
;END MENU

;;menu bar example:
;if(!ShowDialog(dd &sub.DlgProc &controls 0 0 0 0 0 0 0 0 md)) ret
;;popup menu example:
;int i=ShowMenu(md); out i

str dd=
;BEGIN DIALOG
;0 "" 0x90C80AC8 0x0 0 0 224 136 "Dialog" "4"
;1 Button 0x54030001 0x4 116 116 48 14 "OK"
;2 Button 0x54030000 0x4 168 116 48 14 "Cancel"
;END DIALOG
;DIALOG EDITOR: "" 0x2040A00 "*" "" "" ""

if(!ShowDialog(dd 0 0)) ret

But as the image show, no menu item appears


Attached Files Image(s)
   
#2
you need to add the menu as an argument of ShowDialog for it to show
Code:
Copy      Help
if(!ShowDialog(dd 0 0 0 0 0 0 0 0 0 0 md)) ret
#3
Perfect, thanks for your assistance.


Forum Jump:


Users browsing this thread: 2 Guest(s)