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

registerhotkey_vb.net 组合键_unregisterhotkey

电脑杂谈  发布时间:2017-02-04 20:01:39  来源:网络整理

registerhotkeyregisterhotkey

RegisterHotKey

TheRegisterHotKeyfunctiondefinesasystem-widehotkey.

BOOLRegisterHotKey(

HWNDhWnd,//windowtoreceivehot-keynotification

intid,//identifierofhotkey

UINTfsModifiers,//key-modifierflags

UINTvk//virtual-keycode

);

Parameters

hWnd

HandletothewindowthatwillreceiveWM_HOTKEYmessagesgeneratedbythehotkey.IfthisparameterisNULL,WM_HOTKEYmessagesarepostedtothemessagequeueofthecallingthreadandmustbeprocessedinthemessageloop.

id

Specifiestheidentifierofthehotkey.Nootherhotkeyinthecallingthreadshouldhavethesameidentifier.Anapplicationmustspecifyavalueintherange0x0000through0xBFFF.Ashareddynamic-linklibrary(DLL)mustspecifyavalueintherange0xC000through0xFFFF(therangereturnedbytheGlobalAddAtomfunction).Toavoidconflictswithhot-keyidentifiersdefinedbyothersharedDLLs,aDLLshouldusetheGlobalAddAtomfunctiontoobtainthehot-keyidentifier.

fsModifiers

SpecifieskeysthatmustbepressedincombinationwiththekeyspecifiedbythenVirtKeyparameterinordertogeneratetheWM_HOTKEYmessage.ThefsModifiersparametercanbeacombinationofthefollowingvalues.ValueMeaning

MOD_ALTEitheraltkeymustbehelddown.

MOD_CONTROLEitherctrlkeymustbehelddown.

MOD_SHIFTEithershiftkeymustbehelddown.

MOD_WINEitherWINDOWSkeywashelddown.ThesekeysarelabeledwiththeMicrosoftWindowslogo.

vk

Specifiesthevirtual-keycodeofthehotkey.

ReturnValues

Ifthefunctionsucceeds,thereturnvalueisnonzero.

Ifthefunctionfails,thereturnvalueiszero.Togetextendederrorinformation,callGetLastError.

Remarks

Whenakeyispressed,thesystemlooksforamatchagainstallhotkeys.Uponfindingamatch,thesystempoststheWM_HOTKEYmessagetothemessagequeueofthethreadthatregisteredthehotkey.Thismessageispostedtothebeginningofthequeuesoitisremovedbythenextiterationofthemessageloop.

vb.net 组合键_unregisterhotkey_registerhotkey

Thisfunctioncannotassociateahotkeywithawindowcreatedbyanotherthread.

RegisterHotKeyfailsifthekeystrokesspecifiedforthehotkeyhavealreadybeenregisteredbyanotherhotkey.

IfthewindowidentifiedbythehWndparameteralreadyregisteredahotkeywiththesameidentifierasthatspecifiedbytheidparameter,thenewvaluesforthefsModifiersandvkparametersreplacethepreviouslyspecifiedvaluesfortheseparameters.

WindowsCE:WindowsCEversions2.0andlatersupportanadditionalflag,calledMOD_KEYUP,forthefsModifiersparameter.IfyousettheMOD_KEYUPflag,thewindowwillbesentaWM_HOTKEYmessageonakeyupeventaswellasonakeydownevent.

RegisterHotKeycanbeusedtoregisterhotkeysacrossthreads.

QuickInfo

WindowsNT:Requiresversion3.1orlater.

Windows:RequiresWindows95orlater.

WindowsCE:Unsupported.

Header:Declaredinwinuser.h.

ImportLibrary:Useuser32.lib.

SeeAlso

KeyboardInputOverview,KeyboardInputFunctions,GlobalAddAtom,UnregisterHotKey,WM_HOTKEY


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

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

      • 川岛得爱
        川岛得爱

        对自己定位清晰的boy

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