亚洲色一色噜一噜噜噜_在线国产精品一区二区_91国自产拍 精品_国产伦三级一区二区

  • <object id="nlumt"><tt id="nlumt"><pre id="nlumt"></pre></tt></object>
    <legend id="nlumt"><mark id="nlumt"></mark></legend>
    <pre id="nlumt"><tt id="nlumt"><rt id="nlumt"></rt></tt></pre>

    <bdo id="nlumt"><delect id="nlumt"></delect></bdo>

      汶上信息港

      標(biāo)題: 未公開API函數(shù)揭秘——通用對話框 [打印本頁]

      作者: hbhdgpyz    時間: 2008-9-28 16:29
      標(biāo)題: 未公開API函數(shù)揭秘——通用對話框
      <P class=MsoNormal><SPAN lang=EN-US>COMDLG32.DLL </SPAN><SPAN style="FONT-FAMILY: 宋體; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">為我們提供了一些很有用的對話框,但是仍然有部分我們可能會用到的系統(tǒng)對話框它卻沒有提供。如果試圖復(fù)制這些系統(tǒng)對話框?qū)⑹且患闊┑目嗖钍?。幸?lt;/SPAN><SPAN lang=EN-US>shell32.dll</SPAN><SPAN style="FONT-FAMILY: 宋體; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">為我們提供了這些對話框,本文將帶你去發(fā)掘一些未公開的</SPAN><SPAN lang=EN-US>API</SPAN><SPAN style="FONT-FAMILY: 宋體; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">函數(shù),以實現(xiàn)這些對話框。</SPAN></P>
      3 Z* S; y: O, n$ ^' E<P class=MsoNormal><SPAN lang=EN-US>&nbsp;<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></SPAN></P>
      1 B6 v' G5 }" A) d$ S. o& |7 A<P class=MsoNormal><SPAN style="FONT-FAMILY: 宋體; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">在使用未公開的</SPAN><SPAN lang=EN-US>API</SPAN><SPAN style="FONT-FAMILY: 宋體; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">函數(shù)之前,你必須知道聲明未公開的</SPAN><SPAN lang=EN-US>API</SPAN><SPAN style="FONT-FAMILY: 宋體; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">函數(shù)與聲明那些公開的</SPAN><SPAN lang=EN-US>API</SPAN><SPAN style="FONT-FAMILY: 宋體; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">函數(shù)略有不同,那就是,你必須用到未公開</SPAN><SPAN lang=EN-US>API</SPAN><SPAN style="FONT-FAMILY: 宋體; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">函數(shù)的順序號</SPAN><SPAN lang=EN-US>(ordinal number)</SPAN><SPAN style="FONT-FAMILY: 宋體; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">。這個順序號就是未公開函數(shù)的別名。也就是說在聲明未公開</SPAN><SPAN lang=EN-US>API</SPAN><SPAN style="FONT-FAMILY: 宋體; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">函數(shù)時,必須加上它的別名。例如下面要說到的</SPAN><SPAN lang=EN-US>PickIconDlg</SPAN><SPAN style="FONT-FAMILY: 宋體; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">函數(shù)的順序號為</SPAN><SPAN lang=EN-US>62</SPAN><SPAN style="FONT-FAMILY: 宋體; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">,它的別名就是</SPAN><SPAN lang=EN-US>"#62"</SPAN><SPAN style="FONT-FAMILY: 宋體; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">。如果不這樣做,系統(tǒng)會提示你找不到函數(shù)的入口點。</SPAN></P>
      # W1 m* _/ O5 j* {& e<P class=MsoNormal><SPAN lang=EN-US>&nbsp;<o:p></o:p></SPAN></P>" v6 n5 L9 U/ Y$ f; L6 o1 b6 l3 @; t, T
      <P class=MsoNormal><SPAN style="FONT-FAMILY: 宋體; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">選取圖標(biāo)</SPAN></P>- ?/ p; _4 w# B! u$ Q6 X
      <P class=MsoNormal><SPAN lang=EN-US>&nbsp;<o:p></o:p></SPAN></P>
      " T# a  P" n. e5 N<P class=MsoNormal><SPAN lang=EN-US>BOOL WINAPI PickIconDlg(</SPAN></P>4 {' z% ]) T1 A( V: A! K
      <P class=MsoNormal><SPAN lang=EN-US>HWND hwndOwner, </SPAN></P>
      # k5 B# ^3 |  C. `& q0 @<P class=MsoNormal><SPAN lang=EN-US>LPSTR lpstrFile, </SPAN></P>& `) i, u. h' ^
      <P class=MsoNormal><SPAN lang=EN-US>DWORD nMaxFile, </SPAN></P>
      ) |8 m$ {9 x# w<P class=MsoNormal><SPAN lang=EN-US>LPDWORD lpdwIconIndex);</SPAN></P>5 h. M! A+ i6 N2 _4 h2 z
      <P class=MsoNormal><SPAN style="FONT-FAMILY: 宋體; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">該函數(shù)的順序號為</SPAN><SPAN lang=EN-US>62</SPAN><SPAN style="FONT-FAMILY: 宋體; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">。</SPAN></P>
      ) G4 Z0 v" Z8 [7 v4 g<P class=MsoNormal><SPAN lang=EN-US>&nbsp;<o:p></o:p></SPAN></P>
      7 _; [- z. a$ w; J<P class=MsoNormal><SPAN lang=EN-US>hwndOwner</SPAN><SPAN style="FONT-FAMILY: 宋體; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">擁有該對話框的窗口句柄</SPAN><SPAN lang=EN-US> lpstrFile</SPAN><SPAN style="FONT-FAMILY: 宋體; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">指向一個緩沖,包含初始的文件名。函數(shù)返回后它就包含新的文件名。</SPAN><SPAN lang=EN-US>nMaxFile</SPAN><SPAN style="FONT-FAMILY: 宋體; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">指定緩沖的大小,以字符為單位。</SPAN><SPAN lang=EN-US> lpdwIconIndex</SPAN><SPAN style="FONT-FAMILY: 宋體; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">指向一個變量其中包含基于零的圖標(biāo)的索引。函數(shù)返回后它包含新圖標(biāo)的索引值。</SPAN> <SPAN style="FONT-FAMILY: 宋體; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">如果用戶選擇了圖標(biāo),則返回值為真,如果用戶選擇取消按鈕或是系統(tǒng)菜單的關(guān)閉選項則返回值為假。</SPAN></P>8 D6 W7 l# Q/ {1 _" v! T
      <P class=MsoNormal><SPAN lang=EN-US>&nbsp;<o:p></o:p></SPAN></P>
      3 V6 r) m7 @! \* |# `<P class=MsoNormal><SPAN style="FONT-FAMILY: 宋體; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">運行程序?qū)υ捒?lt;/SPAN></P>
      ( |4 g) o* l; E9 j, [<P class=MsoNormal><SPAN lang=EN-US>&nbsp;<o:p></o:p></SPAN></P>
      ) g$ {$ c0 K* O$ s<P class=MsoNormal><SPAN lang=EN-US>void WINAPI RunFileDlg(</SPAN></P>
      # V+ N# J  C' g3 [% G5 p<P class=MsoNormal><SPAN lang=EN-US>HWND hwndOwner, </SPAN></P>- H$ v% ]+ r* K" e
      <P class=MsoNormal><SPAN lang=EN-US>HICON hIcon, </SPAN></P>, Q% }2 p* O( X$ ^" Y/ a5 U- C
      <P class=MsoNormal><SPAN lang=EN-US>LPCSTR lpstrDirectory, </SPAN></P>
      * _5 C8 w- C$ Y+ W" r<P class=MsoNormal><SPAN lang=EN-US>LPCSTR lpstrTitle, </SPAN></P>) d9 R5 n5 l4 q' r! x
      <P class=MsoNormal><SPAN lang=EN-US>LPCSTR lpstrDescription,</SPAN></P>
      3 x# R4 d7 |0 F8 Y<P class=MsoNormal><SPAN lang=EN-US>UINT uFlags);</SPAN></P>
      * d% i1 M6 a% y! |% ^' t. H3 ^<P class=MsoNormal><SPAN style="FONT-FAMILY: 宋體; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">該函數(shù)的順序號為</SPAN><SPAN lang=EN-US>61</SPAN><SPAN style="FONT-FAMILY: 宋體; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">。在</SPAN><SPAN lang=EN-US>VB</SPAN><SPAN style="FONT-FAMILY: 宋體; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">中可聲明如下:</SPAN></P>7 ]- j: T4 V; L; g# g3 t- J4 h
      <P class=MsoNormal><SPAN lang=EN-US>&nbsp;<o:p></o:p></SPAN></P>- l: `4 M1 O2 U% U8 a
      <P class=MsoNormal><SPAN lang=EN-US>Private Declare Function RunFileDlg Lib "shell32" Alias "#61" (ByVal hwndOwner As Long, ByVal hIcon As Long, ByVal lpstrDirectory As String, ByVal lpstrTitle As String, ByVal lpstrDescription As String, ByVal uFlags As Long) As Long</SPAN></P>
      ) D) y4 B9 s+ r7 y+ M" E<P class=MsoNormal><SPAN lang=EN-US>&nbsp;<o:p></o:p></SPAN></P>
      0 J  z8 b" M9 ]2 ^! ~5 K- h<P class=MsoNormal><SPAN style="FONT-FAMILY: 宋體; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">其中</SPAN><SPAN lang=EN-US>uFlags</SPAN><SPAN style="FONT-FAMILY: 宋體; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">參數(shù)的可選值為</SPAN></P>
      3 @% X7 |; g) z7 m4 f0 p! e<P class=MsoNormal><SPAN lang=EN-US>&nbsp;<o:p></o:p></SPAN></P>" B5 h: `; v% b- C* l
      <P class=MsoNormal><SPAN lang=EN-US>RFF_NOBROWSE 0x01 Removes the browse button. </SPAN></P>
      3 J; L8 F$ t. K# H. ^' ?" b2 c<P class=MsoNormal><SPAN lang=EN-US>RFF_NODEFAULT 0x02 No default item selected. </SPAN></P>
      7 K3 a7 e' q. ~5 G, j& Z$ Q<P class=MsoNormal><SPAN lang=EN-US>RFF_CALCDIRECTORY 0x04 Calculates the working directory from the file name. </SPAN></P>
      / Z4 t/ I1 w7 E# e<P class=MsoNormal><SPAN lang=EN-US>RFF_NOLABEL 0x08 Removes the edit box label. </SPAN></P>7 s) U4 c8 k) T* _& j0 f
      <P class=MsoNormal><SPAN lang=EN-US>RFF_NOSEPARATEMEM 0x20 Removes the Separate Memory Space check box (Windows NT only). </SPAN></P>




      歡迎光臨 汶上信息港 (http://www.loveproblemguru.com/) Powered by Discuz! X3.5