04-24-2009, 10:51 AM
Hi Gintaras,
I am using the menu's in a dialog (see example below from a different post) which I am hanging on another app window. I would like to be able to make the background of the menu match the parent application better - either by specifying the color or making transparent like the menu. I have been going through the different styles but without success. Any advice?
Thanks a million, as always!
Stuart
Function DialogWithMenu
I am using the menu's in a dialog (see example below from a different post) which I am hanging on another app window. I would like to be able to make the background of the menu match the parent application better - either by specifying the color or making transparent like the menu. I have been going through the different styles but without success. Any advice?
Thanks a million, as always!
Stuart
Function DialogWithMenu
\Dialog_Editor
function# hDlg message wParam lParam
if(hDlg) goto messages
str controls = "3"
str rea3
if(!ShowDialog("DialogWithMenu" &DialogWithMenu &controls 0 0 0 0 0 0 0 "dialog.ico" "DialogWithMenu")) ret
;BEGIN DIALOG
;0 "" 0x10CF0A44 0x100 0 0 294 190 "Dialog"
;3 RichEdit20A 0x54233044 0x101 0 0 294 190 ""
;END DIALOG
;DIALOG EDITOR: "" 0x2020009 "*" ""
ret
;messages
sel message
,case WM_INITDIALOG
,
,case WM_SIZE
,RECT r; GetClientRect(hDlg &r)
,siz r.right r.bottom id(3 hDlg)
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,;menu items:
,case 101 ;; Menu File>>Open
,,str s fileTxt
,,if OpenSaveDialog(0 s "Text files[]*.txt[]Image files[]*.bmp;*.gif[]All Files[]*.*[]")
,,,fileTxt.getfile(s)
,,,fileTxt.setwintext(id(3 hDlg))
,case 103 out "Cut"
,case 104 out "Select All"
,case 105 out "Help"
,case 106 SendMessage(id(3 hDlg) WM_UNDO 0 0)
,case 110 ;;Enable Undo
,int hm=GetMenu(hDlg) ;;menu bar
,EnableMenuItem hm 106 0
,case 111 ;;Disable Undo
,hm=GetMenu(hDlg) ;;menu bar
,EnableMenuItem hm 106 MF_GRAYED
ret 1
;BEGIN MENU
;>&File
,;&Open : 101 0 0 Co
,;-
,;>&Recent
,,;Empty : 102 0 3
,,;<
,;<
;>&Edit
,;&Undo : 106 0 1 Cz
,;Enable Undo : 110
,;Disable Undo : 111
,;Cu&t : 103 0 0 Cx
,;-
,;Select &All : 104 0 0 Ca
,;<
;&Help : 105 0
;END MENU