Home > Software engineering >  Related to consult about the WindowProc
Related to consult about the WindowProc

Time:09-16

May use Public Function WindowProc (ByVal HWND As Long, ByVal iMsg As Long, ByVal wParam As Long, ByVal lParam) As Long As Long
Intercept del \ insert \ heme/end/enter/Alt, CTL, shift, the direction key message, such as how to do, a great god, please give advice or comments

CodePudding user response:

Oneself fumble,
 Case WM_KEYDOWN 

The Select Case HiWord (wParam)
A Case of 46 'del
A Case of 45 'instert
Case of 35 'end
Case 36 'home
Case 8 'backspace
Case of 16 'shift
Case 17 'CTRL
Case of 18 'Alt
A Case of 34 'PgDn
Case of 33 'PgUp

End the Select
The select case

All these above can obtain, hasn't got the Alt in the direction key, another Shift, CTRl can get in WM_KEYDOWN

CodePudding user response:

Alt and four key direction, dialed the wrong number

CodePudding user response:

The above HiWord, goes like this:
 Public Function LoWord (num As Long) As an Integer 
The LoWord=num Mod & amp; H10000
End the Function

Public Function HiWord (num) As Long As the Integer
HiWord=(num And & amp; HFFFF0000)/& amp; H10000
End the Function

CodePudding user response:

Keypress can be achieved, why windowproc
  • Related