id of control in Pretranslate message
can anyone tell me which member of MSG structure in PreTranslateMessage method gives the id of the control which has sent the message
[133 byte] By [
myaman] at [2007-11-18 20:34:35]

# 1 Re: id of control in Pretranslate message
What is the exact message ? It depends on the message.
# 2 Re: id of control in Pretranslate message
its a WM_COMMAND message
myaman at 2007-11-11 1:13:21 >

# 3 Re: id of control in Pretranslate message
Do you have access to MSDN ?
# 4 Re: id of control in Pretranslate message
yes but i m unable to find there
myaman at 2007-11-11 1:15:23 >

# 5 Re: id of control in Pretranslate message
Just typing in WM_COMMAND and MSG in the Index will give you all the details you need.
If there is something you do not understand in the explanation, I'd be glad to help you.
I am stressing this just to encourage you to look into MSDN. You need to get into that habit. Once you know how to find, you'll realize that the answers you need are 95% of the time, right there at your finger tips and when you need it. You don't have to go back and forth and you don't have to wait for someone to reply.
Forums like this become a waste when the only thing that happens is provide links to already clearly documented stuff.
I'm sorry if I'm being blunt. But more often than not, I'm doing just this most of the time, punch in the keyword in MSDN and provide the link.
# 6 Re: id of control in Pretranslate message
thanks buddy
i got it there, and infact u r doing the right thing it will develop a habbit to look into MSDN
myaman at 2007-11-11 1:17:23 >

# 7 Re: id of control in Pretranslate message
Cool. Good luck !! :wave:
# 8 Re: id of control in Pretranslate message
u see that i m trying in the pretranslatemessage the following things
if(pMsg->message == WM_COMMAND)
if(LOWORD(pMsg->wParam) == ID_OF_COMBO)
if ( HIWORD(pMsg->wParam) )
return FALSE;
I m returning false so that this message is not handled.
i am putting break point on the second line but even the clicking on the combobox is not taking me to taht breakpoint
I don't think for a combo you'd need the third check.
Anyways, you say, it doesn't even stop for pMsg->message == WM_COMMAND ?
In which class are you doing this pretranslateMessage ?
# 9 Re: id of control in Pretranslate message
i am having a class
CLS1 whish is having a member variable of type CComboBox, i am writing the pretranslate message for CLS1
hey kirants if u have yahoo messanger can we talk on that
myaman at 2007-11-11 1:20:20 >

# 10 Re: id of control in Pretranslate message
Try overriding your CWinApp class' PreTranslateMessage and see if it gets trapped there. Just for checking.
is CLS1 a dialog, and also, is it the parent of the combo box ?
And no, I don't have msgr.
# 11 Re: id of control in Pretranslate message
yes CLS1 is parent of combobox and its a dialog derived from
CDialogImpl
myaman at 2007-11-11 1:22:21 >

# 12 Re: id of control in Pretranslate message
Originally posted by myaman
i am having a class
CLS1 whish is having a member variable of type CComboBox, i am writing the pretranslate message for CLS1
hey kirants if u have yahoo messanger can we talk on that
I check windows handles.
if(pMsg->hwnd == CLS1.GetSafeHwnd())
GCDEF at 2007-11-11 1:23:25 >
