亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? lion-tutorial23.htm

?? 內有一些代碼
?? HTM
?? 第 1 頁 / 共 2 頁
字號:
<html>

<head>
<link rel="stylesheet" href="../../asm.css">

<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>Iczelion's win32 asm tutorial</title>
</head>

<body bgcolor="#FFFFFF" background="../../images/back01.jpg">
<p align="center">Tutorial 23: Tray Icon</p>
<hr size="1">
In this tutorial, we will learn how to put icons into system tray and how to create/use 
a popup menu. <br>
Download the example <a href="files/tut23.zip">here</a>. 
<h3> Theory:</h3>
System tray is the rectangular region in the taskbar where several icons reside. 
Normally, you'll see at least a digital clock in it. You can also put icons in 
the system tray too. Below are the steps you have to perform to put an icon into 
the system tray: 
<ol>
  <li> Fill a NOTIFYICONDATA structure which has the following members:</li>
  <ul>
    <li> cbSize&nbsp;&nbsp; The size of this structure.</li>
    <li> hwnd&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Handle of the window that will receive 
      notification when a mouse event occurs over the tray icon.</li>
    <li> uID&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; A constant that is 
      used as the icon's identifier. You are the one who decides on this value. 
      In case you have more than one tray icons, you will be able to check from 
      what tray icon the mouse notification is from.</li>
    <li> uFlags&nbsp;&nbsp;&nbsp; Specify which members of this structure are 
      valid</li>
    <ul>
      <li> <b>NIF_ICON</b> The hIcon member is valid.</li>
      <li> <b>NIF_MESSAGE</b> The uCallbackMessage member is valid.</li>
      <li> <b>NIF_TIP</b> The szTip member is valid.</li>
    </ul>
    <li> uCallbackMessage&nbsp; The custom message that Windows will send to the 
      window specified by the hwnd member when mouse events occur over the tray 
      icon. You create this message yourself.</li>
    <li> hIcon&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; The handle of the icon you want to 
      put into the system tray</li>
    <li> szTip&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; A 64-byte array that contains 
      the string that will be used as the tooltip text when the mouse hovers over 
      the tray icon.</li>
  </ul>
  <li> Call Shell_NotifyIcon which is defined in shell32.inc. This function has 
    the following prototype:</li>
  <p><br>
    <b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Shell_NotifyIcon 
    PROTO dwMessage:DWORD ,pnid:DWORD</b> 
  <p>&nbsp;&nbsp;&nbsp; dwMessage&nbsp; is the type of message to send to the 
    shell. <br>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <b>NIM_ADD</b> 
    Adds an icon to the status area. <br>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <b>NIM_DELETE</b> Deletes 
    an icon from the status area. <br>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <b>NIM_MODIFY</b> Modifies 
    an icon in the status area. <br>
    &nbsp;&nbsp;&nbsp; pnid&nbsp; is the pointer to a NOTIFYICONDATA structure 
    filled with proper values <br>
    If you want to add an icon to the tray, use NIM_ADD message, if you want to 
    remove the icon, use NIM_DELETE.
</ol>
That's all there is to it. But most of the time, you're not content in just putting 
an icon there. You need to be able to respond to the mouse events over the tray 
icon. You can do this by processing the message you specified in uCallbackMessage 
member of NOTIFYICONDATA structure. This message has the following values in wParam 
and lParam (special thanks to s__d for the info): 
<ul>
  <li> wParam contains the ID of the icon. This is the same value you put into 
    uID member of NOTIFYICONDATA structure.</li>
  <li> lParam&nbsp; The low word contains the mouse message. For example, if the 
    user right-clicked at the icon, lParam will contain WM_RBUTTONDOWN.</li>
</ul>
Most tray icon, however, displays a popup menu when the user right-click on it. 
We can implement this feature by creating a popup menu and then call TrackPopupMenu 
to display it. The steps are described below: 
<ol>
  <li> Create a popup menu by calling CreatePopupMenu. This function creates an 
    empty menu. It returns the menu handle in eax if successful.</li>
  <li> Add menu items to it with AppendMenu, InsertMenu or InsertMenuItem.</li>
  <li> When you want to display the popup menu where the mouse cursor is, call 
    GetCursorPos to obtain the screen coordinate of the cursor and then call TrackPopupMenu 
    to display the menu. When the user selects a menu item from the popup menu, 
    Windows sends WM_COMMAND message to your window procedure just like normal 
    menu selection.</li>
</ol>
Note: Beware of two annoying behaviors when you use a popup menu with a tray icon: 
<ol>
  <li> When the popup menu is displayed, if you click anywhere outside the menu, 
    the popup menu will not disappear immediately as it should be. This behavior 
    occurs because the window that will receive the notifications from the popup 
    menu MUST be the foreground window. Just call SetForegroundWindow will correct 
    it.</li>
  <li> After calling SetForegroundWindow, you will find that the first time the 
    popup menu is displayed, it works ok but on the subsequent times, the popup 
    menu will show up and close immediately. This behavior is "intentional", to 
    quote from MSDN. The task switch to the program that is the owner of the tray 
    icon in the near future is necessary. You can force this task switch by posting 
    any message to the window of the program. Just use PostMessage, not SendMessage!</li>
</ol>
<h3> Example:</h3>
<b>.386</b> <br>
<b>.model flat,stdcall</b> <br>
<b>option casemap:none</b> <br>
<b>include \masm32\include\windows.inc</b> <br>
<b>include \masm32\include\user32.inc</b> <br>
<b>include \masm32\include\kernel32.inc</b> <br>
<b>include \masm32\include\shell32.inc</b> <br>
<b>includelib \masm32\lib\user32.lib</b> <br>
<b>includelib \masm32\lib\kernel32.lib</b> <br>
<b>includelib \masm32\lib\shell32.lib</b> 
<p><b>WM_SHELLNOTIFY equ WM_USER+5</b> <br>
  <b>IDI_TRAY equ 0</b> <br>
  <b>IDM_RESTORE equ 1000</b> <br>
  <b>IDM_EXIT equ 1010</b> <br>
  <b>WinMain PROTO :DWORD,:DWORD,:DWORD,:DWORD</b> 
<p><b>.data</b> <br>
  <b>ClassName&nbsp; db "TrayIconWinClass",0</b> <br>
  <b>AppName&nbsp;&nbsp;&nbsp; db "TrayIcon Demo",0</b> <br>
  <b>RestoreString db "&amp;Restore",0</b> <br>
  <b>ExitString&nbsp;&nbsp; db "E&amp;xit Program",0</b> 
<p><b>.data?</b> <br>
  <b>hInstance dd ?</b> <br>
  <b>note NOTIFYICONDATA &lt;></b> <br>
  <b>hPopupMenu dd ?</b> 
<p><b>.code</b> <br>
  <b>start:</b> <br>
  <b>&nbsp;&nbsp;&nbsp; invoke GetModuleHandle, NULL</b> <br>
  <b>&nbsp;&nbsp;&nbsp; mov&nbsp;&nbsp;&nbsp; hInstance,eax</b> <br>
  <b>&nbsp;&nbsp;&nbsp; invoke WinMain, hInstance,NULL,NULL, SW_SHOWDEFAULT</b> 
  <br>
  <b>&nbsp;&nbsp;&nbsp; invoke ExitProcess,eax</b> 
<p><b>WinMain proc hInst:HINSTANCE,hPrevInst:HINSTANCE,CmdLine:LPSTR,CmdShow:DWORD</b> 
  <br>
  <b>&nbsp;&nbsp;&nbsp; LOCAL wc:WNDCLASSEX</b> <br>
  <b>&nbsp;&nbsp;&nbsp; LOCAL msg:MSG</b> <br>
  <b>&nbsp;&nbsp;&nbsp; LOCAL hwnd:HWND</b> <br>
  <b>&nbsp;&nbsp;&nbsp; mov&nbsp;&nbsp; wc.cbSize,SIZEOF WNDCLASSEX</b> <br>
  <b>&nbsp;&nbsp;&nbsp; mov&nbsp;&nbsp; wc.style, CS_HREDRAW or CS_VREDRAW or 
  CS_DBLCLKS</b> <br>
  <b>&nbsp;&nbsp;&nbsp; mov&nbsp;&nbsp; wc.lpfnWndProc, OFFSET WndProc</b> <br>
  <b>&nbsp;&nbsp;&nbsp; mov&nbsp;&nbsp; wc.cbClsExtra,NULL</b> <br>
  <b>&nbsp;&nbsp;&nbsp; mov&nbsp;&nbsp; wc.cbWndExtra,NULL</b> <br>
  <b>&nbsp;&nbsp;&nbsp; push&nbsp; hInst</b> <br>
  <b>&nbsp;&nbsp;&nbsp; pop&nbsp;&nbsp; wc.hInstance</b> <br>
  <b>&nbsp;&nbsp;&nbsp; mov&nbsp;&nbsp; wc.hbrBackground,COLOR_APPWORKSPACE</b> 
  <br>
  <b>&nbsp;&nbsp;&nbsp; mov&nbsp;&nbsp; wc.lpszMenuName,NULL</b> <br>
  <b>&nbsp;&nbsp;&nbsp; mov&nbsp;&nbsp; wc.lpszClassName,OFFSET ClassName</b> 
  <br>
  <b>&nbsp;&nbsp;&nbsp; invoke LoadIcon,NULL,IDI_APPLICATION</b> <br>
  <b>&nbsp;&nbsp;&nbsp; mov&nbsp;&nbsp; wc.hIcon,eax</b> <br>
  <b>&nbsp;&nbsp;&nbsp; mov&nbsp;&nbsp; wc.hIconSm,eax</b> <br>
  <b>&nbsp;&nbsp;&nbsp; invoke LoadCursor,NULL,IDC_ARROW</b> <br>
  <b>&nbsp;&nbsp;&nbsp; mov&nbsp;&nbsp; wc.hCursor,eax</b> <br>
  <b>&nbsp;&nbsp;&nbsp; invoke RegisterClassEx, addr wc</b> <br>
  <b>&nbsp;&nbsp;&nbsp; invoke CreateWindowEx,WS_EX_CLIENTEDGE,ADDR ClassName,ADDR 
  AppName,\</b> <br>
  <b>WS_OVERLAPPED+WS_CAPTION+WS_SYSMENU+WS_MINIMIZEBOX+WS_MAXIMIZEBOX+WS_VISIBLE,CW_USEDEFAULT,\</b> 
  <br>
  <b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CW_USEDEFAULT,350,200,NULL,NULL,\</b> 
  <br>
  <b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; hInst,NULL</b> 
  <br>
  <b>&nbsp;&nbsp;&nbsp; mov&nbsp;&nbsp; hwnd,eax</b> <br>
  <b>&nbsp;&nbsp;&nbsp; .while TRUE</b> <br>
  <b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; invoke GetMessage, ADDR msg,NULL,0,0</b> 
  <br>
  <b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .BREAK .IF (!eax)</b> <br>
  <b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; invoke TranslateMessage, ADDR 
  msg</b> <br>
  <b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; invoke DispatchMessage, ADDR msg</b> 
  <br>
  <b>&nbsp;&nbsp;&nbsp; .endw</b> <br>
  <b>&nbsp;&nbsp;&nbsp; mov eax,msg.wParam</b> <br>
  <b>&nbsp;&nbsp;&nbsp; ret</b> <br>
  <b>WinMain endp</b> 
<p><b>WndProc proc hWnd:HWND, uMsg:UINT, wParam:WPARAM, lParam:LPARAM</b> <br>
  <b>&nbsp;&nbsp;&nbsp; LOCAL pt:POINT</b> <br>
  <b>&nbsp;&nbsp;&nbsp; .if uMsg==WM_CREATE</b> <br>
  <b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; invoke CreatePopupMenu</b> <br>
  <b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mov hPopupMenu,eax</b> <br>
  <b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; invoke AppendMenu,hPopupMenu,MF_STRING,IDM_RESTORE,addr 
  RestoreString</b> <br>
  <b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; invoke AppendMenu,hPopupMenu,MF_STRING,IDM_EXIT,addr 
  ExitString</b> <br>
  <b>&nbsp;&nbsp;&nbsp; .elseif uMsg==WM_DESTROY</b> <br>
  <b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; invoke DestroyMenu,hPopupMenu</b> 
  <br>
  <b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; invoke PostQuitMessage,NULL</b> 
  <br>
  <b>&nbsp;&nbsp;&nbsp; .elseif uMsg==WM_SIZE</b> <br>
  <b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .if wParam==SIZE_MINIMIZED</b> 
  <br>
  <b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mov note.cbSize,sizeof 
  NOTIFYICONDATA</b> <br>
  <b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; push hWnd</b> 
  <br>
  <b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pop note.hwnd</b> 
  <br>
  <b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mov note.uID,IDI_TRAY</b> 
  <br>
  <b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mov note.uFlags,NIF_ICON+NIF_MESSAGE+NIF_TIP</b> 
  <br>
  <b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mov note.uCallbackMessage,WM_SHELLNOTIFY</b> 
  <br>
  <b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; invoke 
  LoadIcon,NULL,IDI_WINLOGO</b> <br>
  <b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mov note.hIcon,eax</b> 
  <br>
  <b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; invoke 
  lstrcpy,addr note.szTip,addr AppName</b> <br>
  <b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; invoke 
  ShowWindow,hWnd,SW_HIDE</b> <br>
  <b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; invoke 

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩一区欧美二区| 日韩三级电影网址| 国产剧情一区二区| 国模无码大尺度一区二区三区| 蜜臀国产一区二区三区在线播放| 亚洲高清久久久| 日精品一区二区三区| 日本欧美一区二区在线观看| 蜜桃精品视频在线| 国产精品77777| 色综合夜色一区| 在线亚洲高清视频| 日韩欧美电影一区| 国产日韩欧美综合在线| 国产精品久久久久久户外露出| 亚洲欧美一区二区不卡| 亚洲成人av福利| 精品伊人久久久久7777人| 国产成人自拍网| 91蜜桃在线免费视频| 欧美日韩一区二区在线观看| 欧美不卡一二三| 中文字幕在线免费不卡| 国产成人av在线影院| 久久久99久久| 国产精品无码永久免费888| 欧洲精品在线观看| 日韩欧美激情一区| 国产精品久久久久久户外露出| 一区二区在线免费| 美腿丝袜亚洲综合| 99久久综合精品| 日韩视频免费观看高清完整版在线观看 | 日韩专区欧美专区| 国产成人精品亚洲午夜麻豆| 国产成人亚洲综合色影视| 色婷婷国产精品综合在线观看| 日韩欧美在线综合网| 国产精品护士白丝一区av| 蜜桃av一区二区三区电影| 91麻豆高清视频| 精品国产免费人成电影在线观看四季| 亚洲欧美色综合| 国产一区 二区| 制服.丝袜.亚洲.中文.综合| 日韩一区在线看| 麻豆成人av在线| 日本韩国欧美一区二区三区| 2014亚洲片线观看视频免费| 亚洲一区精品在线| eeuss鲁一区二区三区| 91精品综合久久久久久| 亚洲精品成人精品456| 丁香六月综合激情| 26uuu国产电影一区二区| 日日夜夜一区二区| 欧美日韩一区二区在线视频| 亚洲三级电影网站| 波多野结衣亚洲| 日本一区二区三区国色天香| 国内精品写真在线观看 | 免费观看91视频大全| 欧美人牲a欧美精品| 亚洲一区二区三区中文字幕| 95精品视频在线| 国产精品高潮呻吟| 高清国产一区二区| 国产精品五月天| 丁香婷婷综合网| 国产精品女同一区二区三区| 国产精品99久久久久久久女警| 久久蜜臀中文字幕| 国产精品一区不卡| 国产精品毛片大码女人| 成人app网站| 一区二区三区欧美在线观看| 在线观看免费一区| 五月婷婷另类国产| 欧美精品久久久久久久久老牛影院| 中文字幕在线一区| 99久久久无码国产精品| 亚洲美女精品一区| 欧美日韩国产美女| 理论电影国产精品| 久久丝袜美腿综合| 不卡一卡二卡三乱码免费网站| 中文字幕欧美国产| 91久久人澡人人添人人爽欧美| 亚洲一线二线三线视频| 欧美一区二区三区在线视频| 狠狠色丁香九九婷婷综合五月| 久久久91精品国产一区二区精品 | 九九久久精品视频| 国产午夜一区二区三区| 成人av在线一区二区| 亚洲免费视频成人| 日韩一区二区在线播放| 国产精品一级黄| 亚洲美女电影在线| 精品国产一区二区三区不卡| 成人午夜电影久久影院| 一区二区三区免费看视频| 欧美mv和日韩mv的网站| 99国产精品国产精品毛片| 亚洲午夜久久久久久久久电影网| 欧美一区二区三区视频在线 | 中文在线一区二区| 欧美日韩在线亚洲一区蜜芽| 韩日精品视频一区| 亚洲一区二区三区中文字幕 | 久久久不卡网国产精品一区| 成人精品免费网站| 亚洲国产精品久久人人爱蜜臀| 精品国产一区二区在线观看| 色婷婷亚洲婷婷| 国产一区在线视频| 亚洲福利视频一区| 国产精品美女久久久久久久久久久 | 最新国产成人在线观看| 欧美日韩一区二区三区四区| 国产精一品亚洲二区在线视频| 一区二区三区在线观看动漫| 欧美极品少妇xxxxⅹ高跟鞋| 91行情网站电视在线观看高清版| 国产精品一区二区男女羞羞无遮挡| 一级精品视频在线观看宜春院| 中文字幕国产一区| 久久亚洲二区三区| 91精品欧美福利在线观看| 色综合久久天天综合网| 春色校园综合激情亚洲| 激情都市一区二区| 免费观看久久久4p| 日韩中文字幕亚洲一区二区va在线| 亚洲丝袜精品丝袜在线| 欧美激情在线观看视频免费| 久久影院午夜片一区| 91精品国产色综合久久不卡电影| 日本道精品一区二区三区| 99re这里只有精品首页| 成人污污视频在线观看| 国产白丝网站精品污在线入口| 精品一区二区免费| 国内不卡的二区三区中文字幕| 奇米影视一区二区三区| 丝袜美腿高跟呻吟高潮一区| 亚洲国产日韩在线一区模特| 亚洲一区二区黄色| 91传媒视频在线播放| 在线观看日韩一区| 日韩一区精品视频| 亚洲国产日韩综合久久精品| 亚洲综合色丁香婷婷六月图片| 国产精品国产三级国产aⅴ中文| 国产日韩欧美激情| 中文av一区二区| 国产精品久久久久久久岛一牛影视| 中日韩av电影| 亚洲精品成人天堂一二三| 一区二区三区四区在线免费观看| 亚洲激情五月婷婷| 五月婷婷久久综合| 久久丁香综合五月国产三级网站| 国产综合一区二区| 国产精品 日产精品 欧美精品| 成人毛片视频在线观看| 91免费国产在线| 欧美三片在线视频观看| 欧美一区二区精美| 国产欧美日韩在线观看| 中文字幕一区二区在线播放| 亚洲视频一区二区在线| 亚洲美女视频一区| 午夜久久久久久久久| 欧美aⅴ一区二区三区视频| 日韩你懂的在线播放| 国产精品久久三| 亚洲午夜av在线| 日本一区二区综合亚洲| 亚洲欧美自拍偷拍色图| 天天爽夜夜爽夜夜爽精品视频| 九九热在线视频观看这里只有精品| 懂色av一区二区三区免费观看| 色狠狠色狠狠综合| 欧美不卡一区二区| 亚洲免费在线视频| 狂野欧美性猛交blacked| 国产激情一区二区三区四区 | 91麻豆精东视频| 69堂国产成人免费视频| 亚洲欧洲韩国日本视频| 日韩电影网1区2区| 成人av在线看| 91精品国产入口| 亚洲色图视频网站| 国内精品久久久久影院薰衣草 | 91精品国产色综合久久| 亚洲欧洲日韩一区二区三区| 免费三级欧美电影| 久久老女人爱爱|