Click here to Skip to main content
15,900,110 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How to disable WinKey, Ctrl+Alt+Del ... Pin
jmkhael24-Sep-02 7:50
jmkhael24-Sep-02 7:50 
GeneralRe: How to disable WinKey, Ctrl+Alt+Del ... Pin
Wizard_0124-Sep-02 8:04
Wizard_0124-Sep-02 8:04 
GeneralRe: How to disable WinKey, Ctrl+Alt+Del ... Pin
jmkhael24-Sep-02 8:03
jmkhael24-Sep-02 8:03 
AnswerRe: How to disable WinKey, Ctrl+Alt+Del ... Pin
Tomasz Sowinski24-Sep-02 8:05
Tomasz Sowinski24-Sep-02 8:05 
GeneralAnother (different) SendMessage question. Pin
ns24-Sep-02 7:02
ns24-Sep-02 7:02 
GeneralRe: Another (different) SendMessage question. Pin
Tomasz Sowinski24-Sep-02 7:17
Tomasz Sowinski24-Sep-02 7:17 
GeneralRe: Another (different) SendMessage question. Pin
ns24-Sep-02 7:24
ns24-Sep-02 7:24 
GeneralRe: Another (different) SendMessage question. Pin
Tomasz Sowinski24-Sep-02 8:08
Tomasz Sowinski24-Sep-02 8:08 
In your case, hWnd should be the handle of button's parent window, Msg is WM_COMMAND, wParam is the button ID (IDC_SOMETHING), lParam is zero.

You don't send message to button itself. Instead, message is handled by parent (usually dialog). That's why you need to pass control ID as well.

MFC encapsulates HWNDs for you and CWnd::SendMessage has three arguments.

Tomasz Sowinski -- http://www.shooltz.com

*** Vodka. Connecting people. ***

GeneralRe: Another (different) SendMessage question. Pin
ns24-Sep-02 8:16
ns24-Sep-02 8:16 
GeneralRe: Another (different) SendMessage question. Pin
Tomasz Sowinski24-Sep-02 8:27
Tomasz Sowinski24-Sep-02 8:27 
GeneralRe: Another (different) SendMessage question. Pin
ns24-Sep-02 8:47
ns24-Sep-02 8:47 
GeneralRe: Another (different) SendMessage question. Pin
Tomasz Sowinski24-Sep-02 9:05
Tomasz Sowinski24-Sep-02 9:05 
GeneralRe: Another (different) SendMessage question. Pin
ns24-Sep-02 9:20
ns24-Sep-02 9:20 
GeneralRe: Another (different) SendMessage question. Pin
Tomasz Sowinski24-Sep-02 9:28
Tomasz Sowinski24-Sep-02 9:28 
GeneralRe: Another (different) SendMessage question. Pin
ns24-Sep-02 9:36
ns24-Sep-02 9:36 
GeneralRe: Another (different) SendMessage question. Pin
ns24-Sep-02 9:23
ns24-Sep-02 9:23 
GeneralRe: Another (different) SendMessage question. Pin
ns24-Sep-02 8:20
ns24-Sep-02 8:20 
GeneralRe: Another (different) SendMessage question. Pin
Tomasz Sowinski24-Sep-02 8:31
Tomasz Sowinski24-Sep-02 8:31 
GeneralRe: Another (different) SendMessage question. Pin
ns24-Sep-02 8:50
ns24-Sep-02 8:50 
GeneralThanks! It finally works! Pin
ns25-Sep-02 2:47
ns25-Sep-02 2:47 
GeneralRe: Thanks! It finally works! Pin
Ravi Bhavnani25-Sep-02 10:49
professionalRavi Bhavnani25-Sep-02 10:49 
Generalgeneral question on progressbars Pin
ns24-Sep-02 6:56
ns24-Sep-02 6:56 
GeneralRe: general question on progressbars Pin
Tomasz Sowinski24-Sep-02 7:02
Tomasz Sowinski24-Sep-02 7:02 
GeneralRe: general question on progressbars Pin
ns24-Sep-02 7:17
ns24-Sep-02 7:17 
GeneralRe: general question on progressbars Pin
Ravi Bhavnani24-Sep-02 9:11
professionalRavi Bhavnani24-Sep-02 9:11 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.