MenuToolbar.Inc
上传用户:yoyoxiao
上传日期:2021-10-16
资源大小:31k
文件大小:2k
源码类别:

工具条

开发平台:

Asm

  1. include windows.inc
  2. include user32.inc
  3. include kernel32.inc
  4. include shell32.inc
  5. include comctl32.inc
  6. include comdlg32.inc
  7. include masm32.inc
  8. include gdi32.inc
  9. includelib user32.lib
  10. includelib kernel32.lib
  11. includelib shell32.lib
  12. includelib comctl32.lib
  13. includelib comdlg32.lib
  14. includelib masm32.lib
  15. includelib gdi32.lib
  16. WinMain PROTO :DWORD,:DWORD,:DWORD,:DWORD
  17. WndProc PROTO :DWORD,:DWORD,:DWORD,:DWORD
  18. CreateToolBar PROTO
  19. BuildMenus PROTO
  20. SubClassTB PROTO :HWND,:UINT,:WPARAM,:LPARAM
  21. ;include RadASMmasmincdebug.inc
  22. ;includelib RadASMmasmlibdebug.lib
  23. ;
  24. ;DBGWIN_DEBUG_ON = 1 ; include debug info into the program
  25. ;DBGWIN_EXT_INFO = 1 ; include extra debug info into the program 
  26. .data
  27. ClassName db 'DLGCLASS',0
  28. DlgName db 'MyDialog',0
  29. DllName db 'TestDll.dll',0
  30. szInstallHook db 'InstallHook',0
  31. Mnu0Item0 db "&Menu 0 Item 0",0
  32. Mnu0Item1 db "Menu 0 Item 1",0
  33. Mnu0Item2 db "Menu 0 Item 2",0
  34. Mnu1Item0 db "Menu 1 Item 0",0
  35. Mnu1Item1 db "Menu 1 Item 1",0
  36. Mnu1Item2 db "Menu 1 Item 2",0
  37. Mnu1Item3 db "Menu 1 Item 3",0
  38. Mnu1Item4 db "Menu 1 Item 4",0
  39. Mnu1Item5 db "Menu 1 Item 5",0
  40. Mnu2Item0 db "Menu 2 Item 0",0
  41. Mnu2Item1 db "Menu 2 Item 1",0
  42. Mnu2Item2 db "Menu 2 Item 2",0
  43. Mnu2Item3 db "Menu 2 Item 3",0
  44. Mnu3Item0 db "Menu 3 Item 0",0
  45. Mnu3Item1 db "Menu 3 Item 1",0
  46. TbStrings db "Menu &0",0
  47. db "Menu &1",0
  48. db "Menu &2",0
  49. db "Menu &3",0,0
  50. ; Start the button IDs at one so we don't use 0 (we'll have to dec in order to get the right menu)
  51. TbBtns TBBUTTON <0,1,TBSTATE_ENABLED,TBSTYLE_AUTOSIZE or TBSTYLE_DROPDOWN,0,0,0>
  52. TBBUTTON <1,2,TBSTATE_ENABLED,TBSTYLE_AUTOSIZE or TBSTYLE_DROPDOWN,0,0,1>
  53. TBBUTTON <3,3,TBSTATE_ENABLED,TBSTYLE_AUTOSIZE or TBSTYLE_DROPDOWN,0,0,2>
  54. TBBUTTON <4,4,TBSTATE_ENABLED,TBSTYLE_AUTOSIZE or TBSTYLE_DROPDOWN,0,0,3>
  55. nTbBtns dd ($-TbBtns)/TBBUTTON
  56. CapFont LOGFONT <-15,0,0,0,FW_BOLD,FALSE,FALSE,0,0,0,0,0,0,"Comic Sans MS">
  57. .data?
  58. hInstance dd ?
  59. CommandLine dd ?
  60. hWnd dd ?
  61. hToolBar dd ?
  62. hHook dd ?
  63. hHookDll dd ?
  64. pInstallHook dd ?
  65. CurrentBtn dd ?
  66. nmtb NMTOOLBAR <>
  67. hMenus dd 4 DUP (?)
  68. hBkGrnd dd ?
  69. hBmp dd ?
  70. hFont dd ?