Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
add an icon in the upper right corner of the window title bar
#1
I want to add an icon in the upper right corner of the window title bar. Please see the image below. When I click on it, the pop-up menu, I did not find the answer in the forum, I hope someone can provide some suggestions, thank you very much.

Function Function1
Code:
Copy      Help
str md=
;BEGIN MENU
;>&File
;,&Open :501 0x0 0x0 Co
;,&Save :502 0x0 0x0 Cs
;,>Submenu
;,,Item1 :551
;,,Item2 :552
;,,<
;,-
;,E&xit :2
;,<
;>&Edit
;,Cu&t :601
;,&Copy :602
;,&Paste :603
;,<
;>&Help
;,&About :901
;,<
;END MENU

;;menu bar example:
;;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: "" 0 "*" "" "" ""

;if(!ShowDialog(dd &sub.DlgProc 0)) ret
if(!ShowDialog(dd &sub.DlgProc 0 0 0 0 0 0 0 0 0 md)) ret


#sub DlgProc
function# hDlg message wParam lParam

sel message
,case WM_INITDIALOG
,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case IDOK
,case IDCANCEL
ret 1


Attached Files Image(s)
   


Messages In This Thread
add an icon in the upper right corner of the window title bar - by win - 03-25-2019, 11:15 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)