Click here to Skip to main content
15,885,278 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
To whom it may concern,

Guys I have a bit of a curious problem. I've had a custom control I've been using to edit text entries. I have implemented this using the Custom Control in the dialog toolbox, and then placing reference to my control. I have found this to be not a problem in dialogs, and in the last page of a Property Sheet. The way I have implemented this is in the dialog I have over ridden the PreTranslateMessage in the dialog/property sheet to do this,

BOOL CMyProp_page::PreTranslateMessage(MSG* pMsg)
{
// TODO: Add your specialized code here and/or call the base class
if((pMsg->message == WM_KEYDOWN) && (m_MyCtrl.GetFocus() != NULL) )
{
m_MyCtrl.PreTranslateMessage(pMsg);
}
else if(pMsg->message == WM_CHAR)
{
m_MyCtrl.PreTranslateMessage(pMsg);
}
else
return CPropertyPage::PreTranslateMessage(pMsg);
}

The only drawback I have with this is OK and escape functions are inactive but I can live with that.


The problem I am encountering is that when I am implementing this in a property sheet. The situation is that I have two of these controls that is one in one property page and the other in another property page, the first one is utterly unresponsive while the one at the end is fine.

Would anyone have any ideas why this would be?

Many thanks

Danny
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900