国产十八禁AV网站,欧美日韩亚洲国产综合乱,亚洲国产aⅴ成人精品无吗,秋霞午夜福利影院合集
汶上信息港
標(biāo)題:
未公開(kāi)API函數(shù)揭秘——通用對(duì)話框
[打印本頁(yè)]
作者:
hbhdgpyz
時(shí)間:
2008-9-28 16:29
標(biāo)題:
未公開(kāi)API函數(shù)揭秘——通用對(duì)話框
<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'">為我們提供了一些很有用的對(duì)話框,但是仍然有部分我們可能會(huì)用到的系統(tǒng)對(duì)話框它卻沒(méi)有提供。如果試圖復(fù)制這些系統(tǒng)對(duì)話框?qū)⑹且患闊┑目嗖钍隆P液?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'">為我們提供了這些對(duì)話框,本文將帶你去發(fā)掘一些未公開(kāi)的</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ù),以實(shí)現(xiàn)這些對(duì)話框。</SPAN></P>
+ ]$ L+ i! |& E6 U2 x+ D+ j
<P class=MsoNormal><SPAN lang=EN-US> <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></SPAN></P>
* q; q% z9 [2 _, T) g9 S4 V
<P class=MsoNormal><SPAN style="FONT-FAMILY: 宋體; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">在使用未公開(kāi)的</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ù)之前,你必須知道聲明未公開(kāi)的</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ù)與聲明那些公開(kāi)的</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ù)略有不同,那就是,你必須用到未公開(kāi)</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ù)的順序號(hào)</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'">。這個(gè)順序號(hào)就是未公開(kāi)函數(shù)的別名。也就是說(shuō)在聲明未公開(kāi)</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ù)時(shí),必須加上它的別名。例如下面要說(shuō)到的</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ù)的順序號(hào)為</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)會(huì)提示你找不到函數(shù)的入口點(diǎn)。</SPAN></P>
* e$ G3 n# ~4 n. Y5 ]
<P class=MsoNormal><SPAN lang=EN-US> <o:p></o:p></SPAN></P>
6 O1 n! Z- z# c) v1 j3 \- j6 x
<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>
' V) d* f! c' F9 c$ n& B. {
<P class=MsoNormal><SPAN lang=EN-US> <o:p></o:p></SPAN></P>
3 `, `8 E8 j% t5 A) p6 l
<P class=MsoNormal><SPAN lang=EN-US>BOOL WINAPI PickIconDlg(</SPAN></P>
3 g: j+ j' c: l8 `! M
<P class=MsoNormal><SPAN lang=EN-US>HWND hwndOwner, </SPAN></P>
- R4 ~" U5 D) G
<P class=MsoNormal><SPAN lang=EN-US>LPSTR lpstrFile, </SPAN></P>
" K5 |, j6 J- s4 e% { u. T0 Z
<P class=MsoNormal><SPAN lang=EN-US>DWORD nMaxFile, </SPAN></P>
' B5 Q1 {4 t2 d
<P class=MsoNormal><SPAN lang=EN-US>LPDWORD lpdwIconIndex);</SPAN></P>
$ d, @# a( ^' X7 I5 Z
<P class=MsoNormal><SPAN style="FONT-FAMILY: 宋體; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">該函數(shù)的順序號(hào)為</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>
3 }# L: y6 p" a) p1 d& v
<P class=MsoNormal><SPAN lang=EN-US> <o:p></o:p></SPAN></P>
5 Y& j+ E" V5 J4 A6 {
<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'">擁有該對(duì)話框的窗口句柄</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'">指向一個(gè)緩沖,包含初始的文件名。函數(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'">指向一個(gè)變量其中包含基于零的圖標(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)閉選項(xiàng)則返回值為假。</SPAN></P>
& F5 \# w) U1 ?1 m/ T
<P class=MsoNormal><SPAN lang=EN-US> <o:p></o:p></SPAN></P>
z4 s% ?& c6 ~' p, ~' M! O
<P class=MsoNormal><SPAN style="FONT-FAMILY: 宋體; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">運(yùn)行程序?qū)υ捒?lt;/SPAN></P>
7 c/ l. q8 X" O! E% A) i3 A# u
<P class=MsoNormal><SPAN lang=EN-US> <o:p></o:p></SPAN></P>
4 `- k6 q8 n4 l9 x
<P class=MsoNormal><SPAN lang=EN-US>void WINAPI RunFileDlg(</SPAN></P>
6 a3 `; q- k- B* w, D6 O, h6 l1 W; {
<P class=MsoNormal><SPAN lang=EN-US>HWND hwndOwner, </SPAN></P>
/ j) G2 n1 r G% W+ W# K
<P class=MsoNormal><SPAN lang=EN-US>HICON hIcon, </SPAN></P>
2 y2 T9 t7 D' B1 x
<P class=MsoNormal><SPAN lang=EN-US>LPCSTR lpstrDirectory, </SPAN></P>
$ @1 ~% k8 K; M: y' Y7 y
<P class=MsoNormal><SPAN lang=EN-US>LPCSTR lpstrTitle, </SPAN></P>
: u5 U" _& o" Y. w& y5 O8 F- o( n
<P class=MsoNormal><SPAN lang=EN-US>LPCSTR lpstrDescription,</SPAN></P>
. d2 J6 h& o" b3 D! o
<P class=MsoNormal><SPAN lang=EN-US>UINT uFlags);</SPAN></P>
3 @! w5 P/ a h) Q4 Y! Q+ K
<P class=MsoNormal><SPAN style="FONT-FAMILY: 宋體; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">該函數(shù)的順序號(hào)為</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 S2 o9 Q+ m0 G% _3 @# u+ n
<P class=MsoNormal><SPAN lang=EN-US> <o:p></o:p></SPAN></P>
1 s6 v7 Q5 O0 s0 P- x
<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>
; C7 x0 [) {6 T( ~& R) s3 p( ?
<P class=MsoNormal><SPAN lang=EN-US> <o:p></o:p></SPAN></P>
' @7 e, \9 U1 o: n+ D
<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>
& V- Z; y5 V8 o, \, {% X' W
<P class=MsoNormal><SPAN lang=EN-US> <o:p></o:p></SPAN></P>
+ A( o& z; U% f6 U
<P class=MsoNormal><SPAN lang=EN-US>RFF_NOBROWSE 0x01 Removes the browse button. </SPAN></P>
3 Q/ V4 n0 H- b7 p% j
<P class=MsoNormal><SPAN lang=EN-US>RFF_NODEFAULT 0x02 No default item selected. </SPAN></P>
0 L) B1 L L2 D& k9 D
<P class=MsoNormal><SPAN lang=EN-US>RFF_CALCDIRECTORY 0x04 Calculates the working directory from the file name. </SPAN></P>
$ s% _( W& F @* y& }
<P class=MsoNormal><SPAN lang=EN-US>RFF_NOLABEL 0x08 Removes the edit box label. </SPAN></P>
! n* W( [7 m$ N7 d3 |; E
<P class=MsoNormal><SPAN lang=EN-US>RFF_NOSEPARATEMEM 0x20 Removes the Separate Memory Space check box (Windows NT only). </SPAN></P>
歡迎光臨 汶上信息港 (http://yh18.cn/)
Powered by Discuz! X3.5