Click here to Skip to main content
15,889,852 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRe: strcmp for NULL character Pin
CPallini7-Jan-10 20:35
mveCPallini7-Jan-10 20:35 
AnswerRe: strcmp for NULL character Pin
Anu_Bala7-Jan-10 21:17
Anu_Bala7-Jan-10 21:17 
QuestionRe: strcmp for NULL character Pin
CPallini7-Jan-10 21:59
mveCPallini7-Jan-10 21:59 
AnswerRe: strcmp for NULL character Pin
Hamid_RT7-Jan-10 20:53
Hamid_RT7-Jan-10 20:53 
Questionsending click message to child button of a window. Pin
_T("No name")7-Jan-10 18:28
_T("No name")7-Jan-10 18:28 
QuestionRe: sending click message to child button of a window. Pin
Nelek7-Jan-10 20:38
protectorNelek7-Jan-10 20:38 
AnswerRe: sending click message to child button of a window. Pin
_T("No name")11-Jan-10 21:52
_T("No name")11-Jan-10 21:52 
AnswerRe: sending click message to child button of a window. Pin
Roger Allen13-Jan-10 5:12
Roger Allen13-Jan-10 5:12 
Typically its the parent window that handles the BN_CLICKED event for a child window. As you can find the actual window you want to send the BN_CLICKED event for, all you need to do is get the control ID number using the GetDlgCtrlID() function on the button window.

You can then use PostMessage to the buttons parent window using:

parentWindow->PostMessage(WM_COMMAND, MAKELONG(buttonId, BN_CLICKED), buttonHwnd)

(I only had a quick and dirty look at the docs for this but I think it should work, you may have to sort out the parameters to make sure their correct)

If you vote me down, my score will only get lower

GeneralRe: sending click message to child button of a window. Pin
_T("No name")13-Jan-10 5:55
_T("No name")13-Jan-10 5:55 
GeneralRe: sending click message to child button of a window. Pin
Roger Allen13-Jan-10 6:09
Roger Allen13-Jan-10 6:09 
GeneralRe: sending click message to child button of a window. Pin
_T("No name")13-Jan-10 6:20
_T("No name")13-Jan-10 6:20 
QuestionWhy does it print junk characters ? Pin
krish_kumar7-Jan-10 17:50
krish_kumar7-Jan-10 17:50 
AnswerRe: Why does it print junk characters ? Pin
oggenok647-Jan-10 18:34
oggenok647-Jan-10 18:34 
QuestionDifferent (Wrong) answers when not debugging Pin
Brien Smith-Martinez7-Jan-10 17:50
Brien Smith-Martinez7-Jan-10 17:50 
AnswerRe: Different (Wrong) answers when not debugging Pin
Garth J Lancaster7-Jan-10 18:16
professionalGarth J Lancaster7-Jan-10 18:16 
GeneralRe: Different (Wrong) answers when not debugging Pin
Brien Smith-Martinez7-Jan-10 23:08
Brien Smith-Martinez7-Jan-10 23:08 
GeneralRe: Different (Wrong) answers when not debugging Pin
Garth J Lancaster9-Jan-10 14:01
professionalGarth J Lancaster9-Jan-10 14:01 
QuestionRe: Different (Wrong) answers when not debugging Pin
CPallini7-Jan-10 22:09
mveCPallini7-Jan-10 22:09 
AnswerRe: Different (Wrong) answers when not debugging Pin
Brien Smith-Martinez7-Jan-10 23:06
Brien Smith-Martinez7-Jan-10 23:06 
AnswerRe: Different (Wrong) answers when not debugging Pin
KarstenK7-Jan-10 23:20
mveKarstenK7-Jan-10 23:20 
QuestionHow to save content in IPicture to JPG format? Pin
Jingcheng7-Jan-10 9:04
Jingcheng7-Jan-10 9:04 
QuestionRe: How to save content in IPicture to JPG format? Pin
David Crow7-Jan-10 11:02
David Crow7-Jan-10 11:02 
AnswerRe: How to save content in IPicture to JPG format? Pin
Jingcheng7-Jan-10 13:29
Jingcheng7-Jan-10 13:29 
GeneralRe: How to save content in IPicture to JPG format? Pin
Hamid_RT7-Jan-10 20:40
Hamid_RT7-Jan-10 20:40 
Question[Solved]Network messages not being sent to the window procedure when using asynchrnous sockets [modified] Pin
zoopp7-Jan-10 7:53
zoopp7-Jan-10 7:53 

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.