亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
7777精品伊人久久久大香线蕉最新版| 欧美日韩国产经典色站一区二区三区| 国产精品一区二区在线观看不卡| 国产999精品久久久久久绿帽| 成人性生交大片免费看中文| 在线看不卡av| 国产拍欧美日韩视频二区| 一区二区理论电影在线观看| 麻豆极品一区二区三区| 色综合久久综合网欧美综合网| 欧美一区二区三区免费| 中文字幕日韩精品一区| 免费在线一区观看| 欧美日韩一级大片网址| 国产精品不卡一区二区三区| 美国十次综合导航| 欧美日韩三级一区| 樱桃国产成人精品视频| 国产91精品在线观看| 精品欧美一区二区久久| 亚洲女同女同女同女同女同69| 国产一区二区在线电影| 4438亚洲最大| 日韩va欧美va亚洲va久久| 在线国产电影不卡| 伊人一区二区三区| 色欧美88888久久久久久影院| 中文字幕一区二区三区在线观看| 国产精品18久久久久久久网站| 日韩美女视频在线| 精品一区二区av| 久久嫩草精品久久久精品一| 麻豆91免费看| 日本一区二区不卡视频| 成人国产在线观看| 亚洲国产综合91精品麻豆| 欧美日韩黄视频| 日韩精品五月天| 8x8x8国产精品| 国产精品资源网| 亚洲欧美视频在线观看视频| 精品污污网站免费看| 视频一区二区不卡| 国产欧美精品一区二区三区四区| av网站免费线看精品| 日日摸夜夜添夜夜添国产精品 | 麻豆成人久久精品二区三区小说| 制服丝袜av成人在线看| 国产福利一区在线观看| 一区二区三区四区在线播放 | 久久99精品国产.久久久久久| 日韩欧美在线一区二区三区| 国产精品99久久久| 亚洲国产综合色| 国产精品无遮挡| 91麻豆精品国产| 在线视频一区二区免费| 久久99精品久久久久久动态图| 亚洲三级电影网站| 久久精品这里都是精品| 3atv在线一区二区三区| 一本色道亚洲精品aⅴ| 国产成人在线观看| 捆绑调教一区二区三区| 日韩电影在线一区| 亚洲电影在线播放| 亚洲自拍偷拍欧美| 亚洲另类一区二区| 亚洲天堂精品视频| 国产精品欧美经典| 国产精品欧美久久久久一区二区| 国产午夜精品久久久久久久 | 久久av资源站| 奇米综合一区二区三区精品视频| 亚洲va天堂va国产va久| 亚洲一区免费视频| 日韩av电影天堂| 精品亚洲国产成人av制服丝袜| 狠狠网亚洲精品| 国产精品88888| www.视频一区| 欧美妇女性影城| 欧美tk—视频vk| 日本一区二区三区国色天香| 国产精品进线69影院| 一区二区成人在线视频 | 精品国产乱码久久久久久闺蜜 | 看电视剧不卡顿的网站| 午夜亚洲国产au精品一区二区| 亚洲精品乱码久久久久久黑人 | 欧美国产综合一区二区| 亚洲人吸女人奶水| 免费看黄色91| 福利视频网站一区二区三区| 色综合久久综合网97色综合| 日韩一区二区精品在线观看| 国产欧美日韩另类一区| 丝袜美腿一区二区三区| 国产乱人伦偷精品视频不卡| 欧美这里有精品| 国产网站一区二区| 美女在线一区二区| 欧美优质美女网站| 中文字幕中文字幕一区二区| 免费高清在线视频一区·| av电影在线观看一区| 精品国产一区二区三区久久影院| 亚洲综合另类小说| 成人av在线影院| 国产欧美精品国产国产专区| 蜜臀精品一区二区三区在线观看| 欧洲精品视频在线观看| 亚洲色图欧洲色图| 国产成人在线网站| 精品国产精品网麻豆系列| 蜜臀av性久久久久蜜臀aⅴ四虎 | 久久99这里只有精品| 欧美日韩不卡在线| 偷拍自拍另类欧美| 欧美一区二区三区在线电影| 同产精品九九九| 欧美另类变人与禽xxxxx| 亚洲狠狠爱一区二区三区| 欧美日韩一区二区三区不卡| 亚洲一区二区中文在线| 欧美日韩美少妇 | 精品国产免费人成在线观看| 精品中文字幕一区二区小辣椒 | 老司机一区二区| 国产欧美视频一区二区三区| 成人国产一区二区三区精品| 亚洲视频在线一区观看| 欧美丰满少妇xxxbbb| 国产伦精品一区二区三区视频青涩 | 国产精品网站导航| 91福利在线导航| 国内精品伊人久久久久av影院| 国产精品久久网站| 91麻豆精品国产自产在线| 国产精品一区专区| 亚洲国产精品尤物yw在线观看| 精品精品欲导航| 色婷婷久久久久swag精品| 久久精品72免费观看| 亚洲美腿欧美偷拍| 精品伦理精品一区| 欧美性猛片xxxx免费看久爱| 国产一区二区三区国产| 五月激情六月综合| 椎名由奈av一区二区三区| 精品伦理精品一区| 7777精品伊人久久久大香线蕉的 | 国产精品乱码妇女bbbb| 欧美一区二区三区在线| 欧美日韩一级片网站| 91丨porny丨国产入口| 国产一区二区不卡| 久久99日本精品| 国产精品麻豆欧美日韩ww| 国产经典欧美精品| 亚洲成人中文在线| 伊人性伊人情综合网| 中文字幕亚洲不卡| 国产精品久久久久久久午夜片 | 国产91对白在线观看九色| 久久99热狠狠色一区二区| 看电影不卡的网站| 韩国午夜理伦三级不卡影院| 国产一区二区毛片| 国产毛片精品视频| 不卡影院免费观看| 91九色02白丝porn| 欧美日韩成人一区二区| 欧美一级国产精品| 日本一区二区三区在线观看| 中文字幕一区二区视频| 亚洲综合在线第一页| 日韩va亚洲va欧美va久久| 国产伦精品一区二区三区免费| 毛片基地黄久久久久久天堂| 久久99久久精品欧美| 99久久综合狠狠综合久久| 欧美性一二三区| 久久精品在线观看| 亚洲成年人影院| 成人午夜私人影院| 蜜桃视频在线观看一区| 性久久久久久久久久久久| 久久av资源网| 一本一道久久a久久精品| 日韩一级黄色片| 亚洲另类春色校园小说| 蜜桃精品视频在线| 在线看国产一区| 国产网红主播福利一区二区| 天涯成人国产亚洲精品一区av| 成人综合在线网站| 日韩欧美一区在线观看| 亚洲韩国一区二区三区| 成人免费黄色在线|