中文字幕精品亚洲无线码,99视频在线观看精品29,亚州十八禁免费不卡在线视颖,亚洲香蕉网久久综合影视

<sub id="xxpls"></sub><sub id="xxpls"></sub>

  • <listing id="xxpls"><u id="xxpls"></u></listing>
    <sub id="xxpls"></sub>

  • <sub id="xxpls"><ol id="xxpls"></ol></sub>
    <style id="xxpls"><u id="xxpls"></u></style>
  • 汶上信息港

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

    作者: hbhdgpyz    時間: 2008-9-28 16:29
    標題: 未公開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)對話框它卻沒有提供。如果試圖復制這些系統(tǒng)對話框將是一件麻煩的苦差事。幸好</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>
    6 }: ^' b# \  f" O<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>: J* g2 {, Q1 z8 p5 n
    <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>; w& I* S2 L" c8 G1 u
    <P class=MsoNormal><SPAN lang=EN-US>&nbsp;<o:p></o:p></SPAN></P>
    6 N7 m5 H2 k* v4 f<P class=MsoNormal><SPAN style="FONT-FAMILY: 宋體; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">選取圖標</SPAN></P>2 O+ T5 N+ t9 _) e
    <P class=MsoNormal><SPAN lang=EN-US>&nbsp;<o:p></o:p></SPAN></P>% t; R% w9 s' {7 M- Q
    <P class=MsoNormal><SPAN lang=EN-US>BOOL WINAPI PickIconDlg(</SPAN></P>
    # L7 ]' k- Z9 j: g8 O9 ~<P class=MsoNormal><SPAN lang=EN-US>HWND hwndOwner, </SPAN></P>2 f) s' `0 U' L; W2 t
    <P class=MsoNormal><SPAN lang=EN-US>LPSTR lpstrFile, </SPAN></P>) J/ e! I2 I1 x1 x1 J  j& V
    <P class=MsoNormal><SPAN lang=EN-US>DWORD nMaxFile, </SPAN></P>
      @* h" }- |- w& p5 h3 `<P class=MsoNormal><SPAN lang=EN-US>LPDWORD lpdwIconIndex);</SPAN></P>
    7 l) r4 x3 i* L- C8 g<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>/ F8 _# J( L* O) h' e) B
    <P class=MsoNormal><SPAN lang=EN-US>&nbsp;<o:p></o:p></SPAN></P>* x! b0 c  |' L! g; L0 l0 f0 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'">指向一個變量其中包含基于零的圖標的索引。函數(shù)返回后它包含新圖標的索引值。</SPAN> <SPAN style="FONT-FAMILY: 宋體; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">如果用戶選擇了圖標,則返回值為真,如果用戶選擇取消按鈕或是系統(tǒng)菜單的關閉選項則返回值為假。</SPAN></P>3 |/ @6 }1 C1 _! D
    <P class=MsoNormal><SPAN lang=EN-US>&nbsp;<o:p></o:p></SPAN></P>
    6 c: R8 ~2 B0 F: l" }<P class=MsoNormal><SPAN style="FONT-FAMILY: 宋體; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">運行程序對話框</SPAN></P>
    5 W* C  z! ^7 k& e$ }+ A<P class=MsoNormal><SPAN lang=EN-US>&nbsp;<o:p></o:p></SPAN></P># a; w( \( u2 R) J" o9 i
    <P class=MsoNormal><SPAN lang=EN-US>void WINAPI RunFileDlg(</SPAN></P>4 [, M: |5 a, F( d. U3 e
    <P class=MsoNormal><SPAN lang=EN-US>HWND hwndOwner, </SPAN></P>
    ( N8 B7 M' y# }: G! {2 }8 u<P class=MsoNormal><SPAN lang=EN-US>HICON hIcon, </SPAN></P>7 x/ s% s" \" m
    <P class=MsoNormal><SPAN lang=EN-US>LPCSTR lpstrDirectory, </SPAN></P>7 u. K6 s2 l  m" L
    <P class=MsoNormal><SPAN lang=EN-US>LPCSTR lpstrTitle, </SPAN></P>2 m3 x, I5 P* L' ?
    <P class=MsoNormal><SPAN lang=EN-US>LPCSTR lpstrDescription,</SPAN></P>% m6 B& S1 b& f. J/ Z7 d
    <P class=MsoNormal><SPAN lang=EN-US>UINT uFlags);</SPAN></P>* e' j9 H* `0 \0 s! T) C5 n
    <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>
    - `2 y' f6 C3 L5 T( m* S! V/ l<P class=MsoNormal><SPAN lang=EN-US>&nbsp;<o:p></o:p></SPAN></P>
    " D7 A; S) _# }0 b<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>, X9 b0 F6 U5 H7 F. D  S
    <P class=MsoNormal><SPAN lang=EN-US>&nbsp;<o:p></o:p></SPAN></P>
    ! I: _0 s3 Y( D( O  q  R9 L9 M7 |<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>
    9 {2 N% Q$ d$ O* f) ^<P class=MsoNormal><SPAN lang=EN-US>&nbsp;<o:p></o:p></SPAN></P>% P. l# `- |" s, w
    <P class=MsoNormal><SPAN lang=EN-US>RFF_NOBROWSE 0x01 Removes the browse button. </SPAN></P>$ `0 d( O9 P# e# k! ~! }2 O7 A
    <P class=MsoNormal><SPAN lang=EN-US>RFF_NODEFAULT 0x02 No default item selected. </SPAN></P>
    - x2 o8 Q; M! c<P class=MsoNormal><SPAN lang=EN-US>RFF_CALCDIRECTORY 0x04 Calculates the working directory from the file name. </SPAN></P>3 p; N" x/ z! E8 g" @1 I0 i1 J0 a) d, Z
    <P class=MsoNormal><SPAN lang=EN-US>RFF_NOLABEL 0x08 Removes the edit box label. </SPAN></P>
    # r2 Z% T, e1 t" M" H$ K- t# o<P class=MsoNormal><SPAN lang=EN-US>RFF_NOSEPARATEMEM 0x20 Removes the Separate Memory Space check box (Windows NT only). </SPAN></P>




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