Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
EN_SETFOCUS question
#2
EN_SETFOCUS and similar messages are sent by a control to its parent window. They are not real messages, but rather are sent in WM_COMMAND message.

SendMessage hwndParent WM_COMMAND EN_SETFOCUS<<16|idControl hwndControl

For idControl, if you don't know it, use GetDlgCtrlID(hwndControl). Or, if you know id but dont't know hwndControl, use id(idControl) to get hwndControl. Note that you must send message to direct parent window, which not always is top-level window. You can use GetParent(hwndControl) to get direct parent window.


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)