b2科目四模拟试题多少题驾考考爆了怎么补救
b2科目四模拟试题多少题 驾考考爆了怎么补救

dialogboxparam_c# dll c 类_win32 子窗体 消息循环

电脑杂谈  发布时间:2017-02-20 14:57:26  来源:网络整理
dialogboxparamdialogboxparam

DialogBoxParam

TheDialogBoxParamfunctioncreatesamodaldialogboxfromadialogboxtemplateresource.Beforedisplayingthedialogbox,thefunctionpassesanapplication-definedvaluetothedialogboxprocedureasthelParamparameteroftheWM_INITDIALOGmessage.Anapplicationcanusethisvaluetoinitializedialogboxcontrols.

INT_PTRDialogBoxParam(

HINSTANCEhInstance,//handletomodule

LPCTSTRlpTemplateName,//dialogboxtemplate

HWNDhWndParent,//handletoownerwindow

DLGPROClpDialogFunc,//dialogboxprocedure

LPARAMdwInitParam//initializationvalue

);

Parameters

hInstance

[in]Handletothemodulewhoseexecutablefilecontainsthedialogboxtemplate.

lpTemplateName

[in]Specifiesthedialogboxtemplate.Thisparameteriseitherthepointertoanull-terminatedcharacterstringthatspecifiesthenameofthedialogboxtemplateoranintegervaluethatspecifiestheresourceidentifierofthedialogboxtemplate.Iftheparameterspecifiesaresourceidentifier,itshigh-orderwordmustbezeroanditslow-orderwordmustcontaintheidentifier.YoucanusetheMAKEINTRESOURCEmacrotocreatethisvalue.

hWndParent

[in]Handletothewindowthatownsthedialogbox.

lpDialogFunc

[in]Pointertothedialogboxprocedure.Formoreinformationaboutthedialogboxprocedure,seeDialogProc.

dwInitParam

[in]SpecifiesthevaluetopasstothedialogboxinthelParamparameteroftheWM_INITDIALOGmessage.

ReturnValues

Ifthefunctionsucceeds,thereturnvalueisthevalueofthenResultparameterspecifiedinthecalltotheEndDialogfunctionusedtoterminatethedialogbox.

IfthefunctionfailsbecausethehWndParentparameterisinvalid,thereturnvalueiszero.ThefunctionreturnszerointhiscaseforcompatibilitywithpreviousversionsofWindows.Ifthefunctionfailsforanyotherreason,thereturnvalueis–1.Togetextendederrorinformation,callGetLastError.

Remarks

TheDialogBoxParamfunctionusestheCreateWindowExfunctiontocreatethedialogbox.DialogBoxParamthensendsaWM_INITDIALOGmessage(andaWM_SETFONTmessageifthetemplatespecifiestheDS_SETFONTorDS_SHELLFONTstyle)tothedialogboxprocedure.Thefunctiondisplaysthedialogbox(regardlessofwhetherthetemplatespecifiestheWS_VISIBLEstyle),disablestheownerwindow,andstartsitsownmessagelooptoretrieveanddispatchmessagesforthedialogbox.

WhenthedialogboxprocedurecallstheEndDialogfunction,DialogBoxParamdestroysthedialogbox,endsthemessageloop,enablestheownerwindow(ifpreviouslyenabled),andreturnsthenResultparameterspecifiedbythedialogboxprocedurewhenitcalledEndDialog.

Windows95/98:Thesystemcansupportamaximumof255controlsperdialogboxtemplate.Toplacemorethan255controlsinadialogbox,createthecontrolsintheWM_INITDIALOGmessagehandlerratherthanplacingtheminthetemplate.


本文来自电脑杂谈,转载请注明本文网址:
http://www.pc-fly.com/a/jisuanjixue/article-33495-1.html

    相关阅读
      发表评论  请自觉遵守互联网相关的政策法规,严禁发布、暴力、反动的言论

      • 卢士政
        卢士政

        选择新的

      • 郭冬冬
        郭冬冬

        总觉得宋茜在里面怪怪的总是不能把宋茜和唱歌联系在一起

      • 陈江秋
        陈江秋

        早上看到系统有更新提示

      热点图片
      拼命载入中...