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

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

      • 邢群
        邢群

        或许会误射

      • 魏孟巾
        魏孟巾

        请你永远做千纸鹤心里完美的小王子#1128迈全员加速中#

      • 摩奇
        摩奇

        我们的原则是不惹事人怕事

      每日福利
      热点图片
      拼命载入中...