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

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

?? tut23.html

?? win32匯編教程 希望各位多多支持
?? HTML
?? 第 1 頁 / 共 3 頁
字號:
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<head>
   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
   <meta name="Author" content="Iczelion">
   <meta name="GENERATOR" content="Mozilla/4.7 [en] (Win98; I) [Netscape]">
   <title>Iczelion's Win32 Assembly Tutorial 23: Tray Icon</title>
</head>
<body text="#CCCCCC" bgcolor="#000000" link="#FFFF00" vlink="#C0C0C0" alink="#C0FFC0">

<center>
<h1>
<font face="Arial,Helvetica"><font color="#FFCC00">Tutorial 23: Tray Icon</font></font></h1></center>
<font face="Arial,Helvetica"><font size=-1>In this tutorial, we will learn
how to put icons into system tray and how to create/use a popup menu.</font></font>
<br><font face="Arial,Helvetica"><font size=-1>Download the example <a href="files/tut23.zip">here</a>.</font></font>
<h3>
<font face="Arial,Helvetica"><font color="#CC6600"><font size=-1>Theory:</font></font></font></h3>
<font face="Arial,Helvetica"><font size=-1>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:</font></font>
<ol>
<li>
<font face="Arial,Helvetica"><font size=-1>Fill a <font color="#FFCC00">NOTIFYICONDATA</font>
structure which has the following members:</font></font></li>

<ul>
<li>
<font face="Arial,Helvetica"><font size=-1><font color="#FFFF00">cbSize</font>&nbsp;&nbsp;
The size of this structure.</font></font></li>

<li>
<font face="Arial,Helvetica"><font size=-1><font color="#FFFF00">hwnd</font>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Handle of the window that will receive notification when a mouse event
occurs over the tray icon.</font></font></li>

<li>
<font face="Arial,Helvetica"><font size=-1><font color="#FFFF00">uID</font>&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.</font></font></li>

<li>
<font face="Arial,Helvetica"><font size=-1><font color="#FFFF00">uFlags</font>&nbsp;&nbsp;&nbsp;
Specify which members of this structure are valid</font></font></li>

<ul>
<li>
<font face="Arial,Helvetica"><font size=-1><b><font color="#33CCFF">NIF_ICON</font></b>
The hIcon member is valid.</font></font></li>

<li>
<font face="Arial,Helvetica"><font size=-1><b><font color="#33CCFF">NIF_MESSAGE</font></b>
The uCallbackMessage member is valid.</font></font></li>

<li>
<font face="Arial,Helvetica"><font size=-1><b><font color="#33CCFF">NIF_TIP</font></b>
The szTip member is valid.</font></font></li>
</ul>

<li>
<font face="Arial,Helvetica"><font size=-1><font color="#FFFF00">uCallbackMessage</font>&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.</font></font></li>

<li>
<font face="Arial,Helvetica"><font size=-1><font color="#FFFF00">hIcon</font>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
The handle of the icon you want to put into the system tray</font></font></li>

<li>
<font face="Arial,Helvetica"><font size=-1><font color="#FFFF00">szTip</font>&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.</font></font></li>
</ul>

<li>
<font face="Arial,Helvetica"><font size=-1>Call <font color="#FFFF00">Shell_NotifyIcon</font>
which is defined in shell32.inc. This function has the following prototype:</font></font></li>

<p><br><b><font face="Arial,Helvetica"><font color="#FFCC00"><font size=-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Shell_NotifyIcon PROTO dwMessage:DWORD ,pnid:DWORD</font></font></font></b>
<p><font face="Arial,Helvetica"><font size=-1>&nbsp;&nbsp;&nbsp; <font color="#FFFF00">dwMessage</font>&nbsp;
is the type of message to send to the shell.</font></font>
<br><font face="Arial,Helvetica"><font size=-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<b><font color="#33CCFF">NIM_ADD</font></b> Adds an icon to the status
area.</font></font>
<br><font face="Arial,Helvetica"><font size=-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<b><font color="#33CCFF">NIM_DELETE</font></b> Deletes an icon from the
status area.</font></font>
<br><font face="Arial,Helvetica"><font size=-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<b><font color="#33CCFF">NIM_MODIFY</font></b> Modifies an icon in the
status area.</font></font>
<br><font face="Arial,Helvetica"><font size=-1>&nbsp;&nbsp;&nbsp; <font color="#FFFF00">pnid</font>&nbsp;
is the pointer to a <font color="#FFCC00">NOTIFYICONDATA</font> structure
filled with proper values</font></font>
<br><font face="Arial,Helvetica"><font size=-1>If you want to add an icon
to the tray, use NIM_ADD message, if you want to remove the icon, use NIM_DELETE.</font></font></ol>
<font face="Arial,Helvetica"><font size=-1>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):</font></font>
<ul>
<li>
<font face="Arial,Helvetica"><font size=-1>wParam contains the ID of the
icon. This is the same value you put into uID member of NOTIFYICONDATA
structure.</font></font></li>

<li>
<font face="Arial,Helvetica"><font size=-1>lParam&nbsp; The low word contains
the mouse message. For example, if the user right-clicked at the icon,
lParam will contain WM_RBUTTONDOWN.</font></font></li>
</ul>
<font face="Arial,Helvetica"><font size=-1>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:</font></font>
<ol>
<li>
<font face="Arial,Helvetica"><font size=-1>Create a popup menu by calling
<font color="#FFFF00">CreatePopupMenu</font>.
This function creates an empty menu. It returns the menu handle in eax
if successful.</font></font></li>

<li>
<font face="Arial,Helvetica"><font size=-1>Add menu items to it with <font color="#FFFF00">AppendMenu</font>,
<font color="#FFFF00">InsertMenu</font>
or <font color="#FFFF00">InsertMenuItem</font>.</font></font></li>

<li>
<font face="Arial,Helvetica"><font size=-1>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 <font color="#FFFF00">TrackPopupMenu</font>
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.</font></font></li>
</ol>
<font face="Arial,Helvetica"><font size=-1>Note: Beware of two annoying
behaviors when you use a popup menu with a tray icon:</font></font>
<ol>
<li>
<font face="Arial,Helvetica"><font size=-1>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.</font></font></li>

<li>
<font face="Arial,Helvetica"><font size=-1>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!</font></font></li>
</ol>

<h3>
<font face="Arial,Helvetica"><font size=-1>Example:</font></font></h3>
<b><font face="Arial,Helvetica"><font color="#CCCCCC"><font size=-1>.386</font></font></font></b>
<br><b><font face="Arial,Helvetica"><font color="#CCCCCC"><font size=-1>.model
flat,stdcall</font></font></font></b>
<br><b><font face="Arial,Helvetica"><font color="#CCCCCC"><font size=-1>option
casemap:none</font></font></font></b>
<br><b><font face="Arial,Helvetica"><font color="#CCCCCC"><font size=-1>include
\masm32\include\windows.inc</font></font></font></b>
<br><b><font face="Arial,Helvetica"><font color="#CCCCCC"><font size=-1>include
\masm32\include\user32.inc</font></font></font></b>
<br><b><font face="Arial,Helvetica"><font color="#CCCCCC"><font size=-1>include
\masm32\include\kernel32.inc</font></font></font></b>
<br><b><font face="Arial,Helvetica"><font color="#CCCCCC"><font size=-1>include
\masm32\include\shell32.inc</font></font></font></b>
<br><b><font face="Arial,Helvetica"><font color="#CCCCCC"><font size=-1>includelib
\masm32\lib\user32.lib</font></font></font></b>
<br><b><font face="Arial,Helvetica"><font color="#CCCCCC"><font size=-1>includelib
\masm32\lib\kernel32.lib</font></font></font></b>
<br><b><font face="Arial,Helvetica"><font color="#CCCCCC"><font size=-1>includelib
\masm32\lib\shell32.lib</font></font></font></b>
<p><b><font face="Arial,Helvetica"><font color="#CCCCCC"><font size=-1>WM_SHELLNOTIFY
equ WM_USER+5</font></font></font></b>
<br><b><font face="Arial,Helvetica"><font color="#CCCCCC"><font size=-1>IDI_TRAY
equ 0</font></font></font></b>
<br><b><font face="Arial,Helvetica"><font color="#CCCCCC"><font size=-1>IDM_RESTORE
equ 1000</font></font></font></b>
<br><b><font face="Arial,Helvetica"><font color="#CCCCCC"><font size=-1>IDM_EXIT
equ 1010</font></font></font></b>
<br><b><font face="Arial,Helvetica"><font color="#CCCCCC"><font size=-1>WinMain
PROTO :DWORD,:DWORD,:DWORD,:DWORD</font></font></font></b>
<p><b><font face="Arial,Helvetica"><font color="#CCCCCC"><font size=-1>.data</font></font></font></b>
<br><b><font face="Arial,Helvetica"><font color="#CCCCCC"><font size=-1>ClassName&nbsp;
db "TrayIconWinClass",0</font></font></font></b>
<br><b><font face="Arial,Helvetica"><font color="#CCCCCC"><font size=-1>AppName&nbsp;&nbsp;&nbsp;
db "TrayIcon Demo",0</font></font></font></b>
<br><b><font face="Arial,Helvetica"><font color="#CCCCCC"><font size=-1>RestoreString
db "&amp;Restore",0</font></font></font></b>
<br><b><font face="Arial,Helvetica"><font color="#CCCCCC"><font size=-1>ExitString&nbsp;&nbsp;
db "E&amp;xit Program",0</font></font></font></b>
<p><b><font face="Arial,Helvetica"><font color="#CCCCCC"><font size=-1>.data?</font></font></font></b>
<br><b><font face="Arial,Helvetica"><font color="#CCCCCC"><font size=-1>hInstance
dd ?</font></font></font></b>
<br><b><font face="Arial,Helvetica"><font color="#CCCCCC"><font size=-1>note

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久精品男人的天堂| 欧美激情资源网| 精品国产精品一区二区夜夜嗨 | 在线视频欧美精品| 亚洲免费在线视频一区 二区| 成人国产一区二区三区精品| 亚洲婷婷综合久久一本伊一区| 99re成人精品视频| 亚洲一区二区精品3399| 亚洲精品在线免费播放| 亚洲女厕所小便bbb| 亚洲电影在线播放| 欧美一区二区啪啪| 综合久久综合久久| 一级女性全黄久久生活片免费| 五月综合激情日本mⅴ| 国产成a人无v码亚洲福利| 成人美女视频在线看| 99vv1com这只有精品| 欧美日韩成人综合在线一区二区| 欧美日韩mp4| 精品乱码亚洲一区二区不卡| 久久久久99精品一区| 亚洲激情校园春色| 亚洲一二三四在线| 麻豆91在线观看| 91在线观看成人| 夜夜嗨av一区二区三区| 久久久亚洲高清| 亚洲国产欧美在线| 国产精品自拍网站| 欧美日韩一级片网站| 一级中文字幕一区二区| 国产一区二区三区观看| 亚洲欧美自拍偷拍| 国产精品 欧美精品| 国产欧美精品一区二区三区四区| 制服丝袜激情欧洲亚洲| 日韩三级精品电影久久久| 一区二区三区丝袜| 91丝袜高跟美女视频| 99这里只有久久精品视频| 亚洲一区二区3| 青青草国产精品97视觉盛宴| 99精品欧美一区| 国产日韩精品视频一区| 日本欧美韩国一区三区| 中文文精品字幕一区二区| 久久久久久久久久久黄色| 另类人妖一区二区av| 日韩女优电影在线观看| 久久精品国产第一区二区三区| 欧美精品日韩一区| 毛片不卡一区二区| 久久精品一区二区三区不卡| 成人免费视频app| 国产欧美精品一区| 成人免费看的视频| 亚洲伊人伊色伊影伊综合网| 欧美色综合天天久久综合精品| 国产精品乱码久久久久久| 麻豆精品一二三| 一区二区三区蜜桃| 精品视频一区 二区 三区| 亚洲一区二区三区中文字幕| 日韩久久免费av| 在线观看一区二区精品视频| 91视频在线观看| 国产综合久久久久久鬼色| 久久午夜电影网| 7777精品伊人久久久大香线蕉| 成人毛片视频在线观看| 国产超碰在线一区| 亚洲18影院在线观看| 久久机这里只有精品| 欧美成人综合网站| 国产mv日韩mv欧美| 美脚の诱脚舐め脚责91| 国产一区二区在线观看免费 | 91黄色免费网站| eeuss鲁一区二区三区| 精品午夜久久福利影院| 九九九久久久精品| 男女性色大片免费观看一区二区 | av在线不卡网| 亚洲精品高清在线| 欧美一卡二卡三卡| 成人黄动漫网站免费app| 日韩影院精彩在线| 欧美伊人久久久久久午夜久久久久| 亚洲天堂福利av| 精品视频免费在线| 北条麻妃国产九九精品视频| 亚洲福利电影网| 精品免费国产二区三区| 欧美一区二区三区视频免费| 九九视频精品免费| 婷婷中文字幕综合| 亚洲精品日韩一| 中文字幕一区在线观看视频| 欧美一区二区三区免费大片 | 久久国产人妖系列| 亚洲另类在线一区| 国产精品福利一区| 91免费观看在线| 国产一区福利在线| 久久99在线观看| 99国产精品国产精品毛片| 日韩一二三区视频| 日本一区二区三区久久久久久久久不| 色噜噜狠狠成人中文综合 | 色久优优欧美色久优优| 色哟哟精品一区| 欧美丰满少妇xxxbbb| 日韩欧美国产精品一区| 欧美大尺度电影在线| 国产成人在线色| 成人avav影音| 91网站在线观看视频| 色婷婷av一区二区三区软件| 在线观看日韩一区| 欧美高清dvd| 日韩精品在线一区| 一区二区三区影院| 免费久久99精品国产| 国产精品影视在线| 不卡高清视频专区| 欧美久久久久久久久| 日韩一区二区三区电影| 日韩你懂的在线观看| 亚洲国产综合人成综合网站| 亚洲主播在线播放| 亚洲一区自拍偷拍| 蜜臀av一级做a爰片久久| 一区二区三区在线视频免费| 亚洲观看高清完整版在线观看| 丝袜美腿高跟呻吟高潮一区| 韩国三级中文字幕hd久久精品| aaa欧美色吧激情视频| 欧美吻胸吃奶大尺度电影| 国产欧美一区二区精品久导航 | 免费人成黄页网站在线一区二区 | 午夜欧美视频在线观看 | 天天影视涩香欲综合网| 色综合婷婷久久| 国产精品一区二区免费不卡 | 欧美一级淫片007| 国产精品欧美极品| 免费成人av资源网| 欧美日韩国产综合视频在线观看| 国产亚洲成av人在线观看导航 | 久色婷婷小香蕉久久| 色婷婷综合久久久久中文| 91蜜桃免费观看视频| 91极品美女在线| 亚洲午夜免费视频| 91激情在线视频| 亚洲欧洲日产国产综合网| 国产成人精品影院| 欧美高清在线一区二区| 久久成人精品无人区| 欧美人妇做爰xxxⅹ性高电影| 99在线精品视频| av一区二区久久| 中文欧美字幕免费| 亚洲mv大片欧洲mv大片精品| 91麻豆国产自产在线观看| 亚洲欧美日韩小说| 久久久久久久久免费| 久久婷婷一区二区三区| 亚洲二区视频在线| 国产精品久久久久久久午夜片| 国产三级精品三级在线专区| 亚洲国产精品一区二区www| 91成人在线免费观看| 不卡高清视频专区| 日韩女优av电影| 青娱乐精品在线视频| 欧美日韩精品一区视频| 亚洲啪啪综合av一区二区三区| 香蕉影视欧美成人| 久久影院电视剧免费观看| 日韩精品一区二| 亚洲第一激情av| 欧美激情艳妇裸体舞| 色婷婷狠狠综合| 国产麻豆9l精品三级站| 日韩视频永久免费| 97精品视频在线观看自产线路二| 一区二区三区在线观看欧美 | 91在线观看美女| 欧美在线免费观看视频| 亚洲日穴在线视频| 不卡的av网站| 欧美一区二区三区在| 成人av电影在线观看| 午夜久久电影网| 国产精品对白交换视频| 亚洲精品一区二区在线观看| 91影院在线观看|