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

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

?? lion-tutorial11.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 11: More about Dialog Box</p>
<hr size="1">
We will learn more about dialog box in this tutorial. Specifically, we will explore 
the topic of how to use dialog boxs as our input-output devices. If you read the 
previous tutorial, this one will be a breeze since only a minor modification is 
all that's needed to be able to use dialog boxes as adjuncts to our main window. 
Also in this tutorial, we will learn how to use common dialog boxes. 
<p>Download the dialog box examples <a href="files/tut11-1.zip">here</a> and <a href="files/tut11-2.zip">here</a>. 
  Download Common Dialog Box example <a href="files/tut11-3.zip">here</a>. 
<h3> Theory:</h3>
Very little is to be said about how to use dialog boxes as input-output devices 
of our program. Your program creates the main window as usual and when you want 
to display the dialog box, just call CreateDialogParam or DialogBoxParam. With 
DialogBoxParam call, you don't have to do anything more, just process the messages 
in the dialog box procedure. With CreateDialogParam, you must insert IsDialogMessage 
call in the message loop to let dialog box manager handle the keyboard navigation 
in your dialog box for you. Since the two cases are trivial, I'll not put the 
source code here. You can download the examples and examine them yourself, <a href="files/tut11-1.zip">here</a> 
and <a href="files/tut11-2.zip">here</a>. <br>
Let's go on to the common dialog boxes. Windows has prepared predefined dialog 
boxes for use by your applications. These dialog boxes exist to provide standardized 
user interface. They consist of file, print, color, font, and search dialog boxes. 
You should use them as much as possible. The dialog boxes reside in comdlg32.dll. 
In order to use them, you have to link to comdlg32.lib. You create these dialog 
boxes by calling appropriate functions in the common dialog library. For open 
file dialog, it is GetOpenFileName, for save as dialog it is GetSaveFileName, 
for print dialog it is PrintDlg and so on. Each one of these functions takes a 
pointer to a structure as its parameter. You should look them up in Win32 API 
reference. In this tutorial, I'll demonstrate how to create and use an open file 
dialog. <br>
Below is the function prototype of GetOpenFileName function: <br>
&nbsp; 
<blockquote><b>GetOpenFileName proto lpofn:DWORD</b></blockquote>
You can see that it receives only one parameter, a pointer to an OPENFILENAME 
structure. The return value TRUE means the user selected a file to open, it's 
FALSE otherwise. We will look at OPENFILENAME structure next. <br>
&nbsp; 
<blockquote><b>OPENFILENAME&nbsp; STRUCT</b> 
  <blockquote><b>&nbsp;lStructSize DWORD&nbsp; ?</b> <br>
    <b>&nbsp;hwndOwner HWND&nbsp; ?</b> <br>
    <b>&nbsp;hInstance HINSTANCE ?</b> <br>
    <b>&nbsp;lpstrFilter LPCSTR&nbsp; ?</b> <br>
    <b>&nbsp;lpstrCustomFilter LPSTR&nbsp; ?</b> <br>
    <b>&nbsp;nMaxCustFilter DWORD&nbsp; ?</b> <br>
    <b>&nbsp;nFilterIndex DWORD&nbsp; ?</b> <br>
    <b>&nbsp;lpstrFile LPSTR&nbsp; ?</b> <br>
    <b>&nbsp;nMaxFile DWORD&nbsp; ?</b> <br>
    <b>&nbsp;lpstrFileTitle LPSTR&nbsp; ?</b> <br>
    <b>&nbsp;nMaxFileTitle DWORD&nbsp; ?</b> <br>
    <b>&nbsp;lpstrInitialDir LPCSTR&nbsp; ?</b> <br>
    <b>&nbsp;lpstrTitle LPCSTR&nbsp; ?</b> <br>
    <b>&nbsp;Flags&nbsp; DWORD&nbsp; ?</b> <br>
    <b>&nbsp;nFileOffset WORD&nbsp; ?</b> <br>
    <b>&nbsp;nFileExtension WORD&nbsp; ?</b> <br>
    <b>&nbsp;lpstrDefExt LPCSTR&nbsp; ?</b> <br>
    <b>&nbsp;lCustData LPARAM&nbsp; ?</b> <br>
    <b>&nbsp;lpfnHook DWORD&nbsp; ?</b> <br>
    <b>&nbsp;lpTemplateName LPCSTR&nbsp; ?</b></blockquote>
  <b>OPENFILENAME&nbsp; ENDS</b></blockquote>
Let's see the meaning of the frequently used members. <br>
&nbsp; 
<center>
  <table BORDER width="100%" >
    <tr> 
      <td>lStructSize</td>
      <td>The size of the OPENFILENAME structure , in bytes</td>
    </tr>
    <tr> 
      <td>hwndOwner</td>
      <td>The window handle of the open file dialog box.</td>
    </tr>
    <tr> 
      <td>hInstance</td>
      <td>Instance handle of the application that creates the open file dialog 
        box</td>
    </tr>
    <tr> 
      <td>lpstrFilter</td>
      <td>The filter strings in the format of&nbsp; pairs of null terminated strings. 
        The first string in each pair is the description. The second string is 
        the filter pattern. for example: <br>
        &nbsp;&nbsp;&nbsp;&nbsp; FilterString&nbsp;&nbsp; db "All Files (*.*)",0, 
        "*.*",0 <br>
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
        db "Text Files (*.txt)",0,"*.txt",0,0 <br>
        Note that only the pattern in the second string in each pair is actually 
        used by Windows to filter out the files. Also noted that you have to put 
        an extra 0 at the end of the filter strings to denote the end of it.</td>
    </tr>
    <tr> 
      <td>nFilterIndex</td>
      <td>Specify which pair of the filter strings will be initially used when 
        the open file dialog is first displayed. The index is 1-based, that is 
        the first pair is 1, the second pair is 2 and so on. So in the above example, 
        if we specify nFilterIndex as 2, the second pattern, "*.txt" will be used.</td>
    </tr>
    <tr> 
      <td>lpstrFile</td>
      <td>Pointer to the buffer that contains the filename used to initialize 
        the filename edit control on the dialog box. The buffer should be at least 
        260 bytes long.&nbsp; <br>
        After the user selects a file to open, the filename with full path is 
        stored in this buffer. You can extract the information from it later.</td>
    </tr>
    <tr> 
      <td>nMaxFile</td>
      <td>The size of the lpstrFile buffer.</td>
    </tr>
    <tr> 
      <td>lpstrTitle</td>
      <td>Pointer to the title of the open file dialog box</td>
    </tr>
    <tr> 
      <td>Flags</td>
      <td>Determine the styles and characteristics of the dialog box.</td>
    </tr>
    <tr> 
      <td>nFileOffset</td>
      <td>After the user selects a file to open, this member contains the index 
        to the first character of the actual filename. For example, if the full 
        name with path is "c:\windows\system\lz32.dll", the this member will contain 
        the value 18.</td>
    </tr>
    <tr> 
      <td>nFileExtension</td>
      <td>After the user selects a file to open, this member contains the index 
        to the first character of the file extension</td>
    </tr>
  </table>
</center>
<h3> Example:</h3>
The following program displays an open file dialog box when the user selects File-> 
Open from the menu. When the user selects a file in the dialog box, the program 
displays a message box showing the full name, filename,and extension of the selected 
file. 
<p><b>.386</b> <br>
  <b>.model flat,stdcall</b> <br>
  <b>option casemap:none</b> <br>
  <b>WinMain proto :DWORD,:DWORD,:DWORD,:DWORD</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\comdlg32.inc</b> <br>
  <b>includelib \masm32\lib\user32.lib</b> <br>
  <b>includelib \masm32\lib\kernel32.lib</b> <br>
  <b>includelib \masm32\lib\comdlg32.lib</b> 
<p><b>.const</b> <br>
  <b>IDM_OPEN equ 1</b> <br>
  <b>IDM_EXIT equ 2</b> <br>
  <b>MAXSIZE equ 260</b> <br>
  <b>OUTPUTSIZE equ 512</b> 
<p><b>.data</b> <br>
  <b>ClassName db "SimpleWinClass",0</b> <br>
  <b>AppName&nbsp; db "Our Main Window",0</b> <br>
  <b>MenuName db "FirstMenu",0</b> <br>
  <b>ofn&nbsp;&nbsp; OPENFILENAME &lt;></b> <br>
  <b>FilterString db "All Files",0,"*.*",0</b> <br>
  <b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  db "Text Files",0,"*.txt",0,0</b> <br>
  <b>buffer db MAXSIZE dup(0)</b> <br>
  <b>OurTitle db "-=Our First Open File Dialog Box=-: Choose the file to open",0</b> 
  <br>
  <b>FullPathName db "The Full Filename with Path is: ",0</b> <br>
  <b>FullName&nbsp; db "The Filename is: ",0</b> <br>
  <b>ExtensionName db "The Extension is: ",0</b> <br>
  <b>OutputString db OUTPUTSIZE dup(0)</b> <br>
  <b>CrLf db 0Dh,0Ah,0</b> 
<p><b>.data?</b> <br>
  <b>hInstance HINSTANCE ?</b> <br>
  <b>CommandLine LPSTR ?</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 GetCommandLine<br>
  &nbsp;&nbsp;&nbsp;&nbsp;mov CommandLine,eax</b> <br>
  <b>&nbsp;&nbsp;&nbsp; invoke WinMain, hInstance,NULL,CommandLine, 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</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_WINDOW+1</b> <br>
  <b>&nbsp;&nbsp;&nbsp; mov&nbsp;&nbsp; wc.lpszMenuName,OFFSET MenuName</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>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; WS_OVERLAPPEDWINDOW,CW_USEDEFAULT,\</b> 
  <br>
  <b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CW_USEDEFAULT,300,200,NULL,NULL,\</b> 
  <br>

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91精品国产aⅴ一区二区| 成人福利视频网站| 国产日韩av一区二区| 欧美三级资源在线| 91美女片黄在线观看91美女| 国产成人av福利| 国产成人精品免费看| 狠狠网亚洲精品| 久久99久久精品欧美| 久久国产精品一区二区| 精品一区二区三区香蕉蜜桃 | 99国产精品国产精品毛片| 激情欧美一区二区| 日日摸夜夜添夜夜添精品视频 | 91年精品国产| jlzzjlzz亚洲女人18| 精品无人码麻豆乱码1区2区 | 精品一区二区综合| 免费国产亚洲视频| 精品在线你懂的| 精品在线免费视频| 懂色中文一区二区在线播放| 国产成人亚洲精品青草天美| 国产成人在线影院| 成人午夜私人影院| 91色综合久久久久婷婷| 美女视频黄 久久| 秋霞国产午夜精品免费视频| 亚洲欧美日韩综合aⅴ视频| 久久久精品天堂| 亚洲免费视频中文字幕| 亚洲一区二区三区免费视频| 亚洲综合免费观看高清在线观看| 亚洲精品乱码久久久久久| **欧美大码日韩| 国产欧美一区二区精品秋霞影院| 国产欧美精品一区二区色综合朱莉 | 欧美性猛交一区二区三区精品| 欧美一区二区三区免费大片| 日韩一区二区三区观看| 欧美日本一区二区三区四区| 国内偷窥港台综合视频在线播放| 成人免费视频app| 国产精品一区二区你懂的| 国产xxx精品视频大全| 91麻豆高清视频| 欧美一区二区三区四区高清| 国产欧美日韩卡一| 亚洲国产成人va在线观看天堂 | 欧美日韩国产高清一区二区三区 | 国产精品综合视频| 一本到高清视频免费精品| 精品国产免费人成在线观看| 亚洲婷婷国产精品电影人久久| 热久久一区二区| 在线区一区二视频| 国产清纯美女被跳蛋高潮一区二区久久w| 一区二区视频在线看| 韩国v欧美v亚洲v日本v| 9191成人精品久久| 亚洲精品久久久蜜桃| 丁香激情综合国产| 久久久久一区二区三区四区| 午夜av电影一区| 一本久久综合亚洲鲁鲁五月天| 久久午夜电影网| 青青青爽久久午夜综合久久午夜| 91福利视频网站| 国产精品乱人伦中文| 国产经典欧美精品| 欧美成人a∨高清免费观看| 亚洲一二三区在线观看| 99re66热这里只有精品3直播 | 欧美日韩和欧美的一区二区| 国产精品久久久久婷婷| 精品一区二区三区免费毛片爱| 欧美一区二视频| 青青青爽久久午夜综合久久午夜| 91久久精品一区二区二区| 亚洲欧美一区二区视频| 粉嫩在线一区二区三区视频| 久久综合色之久久综合| 国产精品一区免费视频| 国产日韩精品一区| yourporn久久国产精品| 亚洲天堂成人在线观看| gogogo免费视频观看亚洲一| 国产精品无码永久免费888| 成人免费毛片app| 成人欧美一区二区三区| 99久久99精品久久久久久| 日韩美女视频一区二区| 在线免费观看一区| 五月天激情综合| 欧美一级欧美一级在线播放| 美女爽到高潮91| 国产日韩欧美激情| 色综合色狠狠天天综合色| 亚洲亚洲精品在线观看| 日韩欧美国产一区二区在线播放| 看片的网站亚洲| 国产日韩精品视频一区| 在线观看免费亚洲| 日本视频一区二区三区| 国产日韩精品一区二区三区在线| 91影视在线播放| 亚洲v日本v欧美v久久精品| 日韩欧美第一区| voyeur盗摄精品| 日韩制服丝袜av| 亚洲精品一区二区在线观看| 国产成人免费视频精品含羞草妖精| 亚洲欧洲精品天堂一级 | 久久福利视频一区二区| 国产欧美一区在线| 欧美在线看片a免费观看| 久久精品99国产国产精| 国产精品国产三级国产普通话99| 在线播放91灌醉迷j高跟美女 | 欧美一区二区视频在线观看2022| 国产一区二区三区日韩| 亚洲成在人线在线播放| 久久欧美中文字幕| 欧美在线你懂的| 成人一级片网址| 石原莉奈在线亚洲二区| 中文字幕在线播放不卡一区| 日韩三级伦理片妻子的秘密按摩| 99久久精品费精品国产一区二区| 免费看欧美女人艹b| 一区二区三区 在线观看视频| 欧美电影免费观看高清完整版| 成人av电影免费观看| 激情综合色综合久久| 亚洲va韩国va欧美va| 久久看人人爽人人| 日韩视频免费观看高清完整版 | 亚洲一区二区三区在线播放| 久久亚洲精精品中文字幕早川悠里| 色综合视频一区二区三区高清| 国产九色sp调教91| 美国毛片一区二区| 无吗不卡中文字幕| 一区二区三区日韩精品| 中文字幕中文在线不卡住| 亚洲精品在线电影| 精品久久久久一区二区国产| 欧美日韩国产成人在线免费| 91精品办公室少妇高潮对白| 成+人+亚洲+综合天堂| 国产在线一区二区综合免费视频| 亚洲h精品动漫在线观看| 一区二区三区丝袜| 亚洲视频每日更新| 亚洲色图都市小说| 国产欧美日韩卡一| 国产精品午夜春色av| 久久精品在线观看| 久久久亚洲国产美女国产盗摄| 精品国产乱码久久久久久影片| 91精品国产综合久久精品| 欧美男同性恋视频网站| 欧美日韩综合在线| 欧美精品一卡二卡| 欧美成人精品3d动漫h| www国产成人| 国产精品乱人伦中文| 一区二区三区在线视频观看| 蜜桃免费网站一区二区三区| 热久久国产精品| 国产suv精品一区二区6| 成人性生交大片免费看中文网站| 成人av片在线观看| 一本到不卡精品视频在线观看 | 91精品国产91久久综合桃花| 欧美一区二区三区影视| 久久综合九色综合97_久久久| 久久久久久久久久久久久久久99 | 欧美喷潮久久久xxxxx| 日韩欧美成人激情| 国产欧美视频在线观看| 亚洲欧美一区二区久久| 日韩国产高清在线| 国产98色在线|日韩| 欧美性色aⅴ视频一区日韩精品| 宅男噜噜噜66一区二区66| 亚洲精品一区二区三区蜜桃下载| 欧美国产精品专区| 亚洲国产日韩一级| 久久国产福利国产秒拍| 国产成人精品三级| 欧美伊人久久久久久久久影院| 678五月天丁香亚洲综合网| 久久久亚洲高清| 亚洲成人av电影在线| 高清国产午夜精品久久久久久| 欧美色老头old∨ideo| 国产欧美一区二区精品秋霞影院| 婷婷开心激情综合| 波多野结衣91|