#PB_Any in AddKeyboardShortcut()

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
User avatar
jqn
User
User
Posts: 97
Joined: Fri Oct 31, 2003 3:04 pm

#PB_Any in AddKeyboardShortcut()

Post by jqn »

Well, it's very useful if you can provide a "result" for AddKeyboardShortcut(), using #PB_Any in Event number place.

Be careful, I've noted that EventMenu() returns an .w field (2 bytes) only up to 32767.

JOAQUIN
User avatar
Fluid Byte
Addict
Addict
Posts: 2336
Joined: Fri Jul 21, 2006 4:41 am
Location: Berlin, Germany

Post by Fluid Byte »

Be careful, I've noted that EventMenu() returns an .w field (2 bytes) only up to 32767.
Perfectly normal because EventMenu() processes the #WM_COMMAND message. The identifier of a menu item and a notification code are both stored in the wParam field. So they share the same parameter wich has a data type of LONG. This means both values must have a data type of WORD and can only have a maximium size of 32767.
Windows 10 Pro, 64-Bit / Whose Hoff is it anyway?
Post Reply