|
-
March 31st, 1999, 06:25 AM
#1
how to overide onchar in dialogbased application
hai folks,
I am creating a dialog based application. I am overiding(WM_CHAR) On Char()
member function. But that function is not fired when a press a character
I have also tried with accelerator resources also. There also the same
result. Please any one help me to solve the problem. Its very urgent.
regards,
kalyan
-
April 13th, 1999, 03:48 AM
#2
Re: how to overide onchar in dialogbased application
The OnChar-Message is send to the childwnd that has the focus and that's why you don't get it in the Dialog.
Mike
-
April 13th, 1999, 07:47 AM
#3
Re: how to overide onchar in dialogbased application
hai,
Refering to your Ques about OnChar()in dialog.
I think u can't catch OnChar() directly in dlg application.
u do the following..
override virtual PreTranslateMessage
BOOL CMyDialog::PreTranslateMessage(MSG* pMsg)
{
if(pMsg->message==WM_CHAR)
{
AfxMessageBox("RAJJU");
}
return CDialog::PreTranslateMessage(pMsg);
}
remove message box and do what u want .
If u get a better solution ps mail to [email protected]
bye ....
sriram
-
April 14th, 1999, 03:01 AM
#4
Re: how to overide onchar in dialogbased application
if it gets to complicated, use a CFormView based application...
chrislaw
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|