|
-
April 29th, 1999, 04:47 AM
#1
When someone types one character on an edit control, how can I know wich character has been written
Hi !,
When someone types one character on an edit control, how can I know wich character has been written ?
Thanks, Bye !
Braulio
-
April 29th, 1999, 05:52 AM
#2
Re: When someone types one character on an edit control, how can I know wich character has been writ
by subclassing the edit control and trapping the WM_CHAR message...
-
April 29th, 1999, 07:29 AM
#3
Re: When someone types one character on an edit control, how can I know wich character has been writ
Use PreTranslateMessage() !
Override PreTranslateMessage() in that class using classwizard and type code like this
......::PreTranslateMessage(MSG* pMsg)
{
CEdit *pEdit = (CEdit *)GetDlgItem(IDC_EDIT1);
if(pMsg->message == WM_CHAR)
{
if(GetFocus()==pEdit) {
// here code to find character
}
}
}
by nfuox
-
April 29th, 1999, 08:05 AM
#4
THANKS !!!! Works Very good !
SUPER !! WORKS QUITE GOOD !
Hi,
Thanks for your help, it works good !!
One question more about this "PreTranslateMessage", is possible too, to put out message that I don't want ?, for example I have a problem with DropDown and SetSelEndOk, of the combo boxes, every time DorpDown is called, SetSelEndOk is called after, is possible to take the message that recieves SetSelEndOk, and put it out ? What Happens with the function that has sended the "SendMessage" keeps waiting always or not ?...
Another question ( a little bit more silly ;-) ), is there something like a "PosTranslateMessage" ( when the message has been received and proccessed capture it and set somethings...).
Thanks very much for your help Bye !
Braulio
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
|