Click here to Skip to main content
16,005,121 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionCEdit WM_CHAR question Pin
followait24-Nov-05 19:35
followait24-Nov-05 19:35 
AnswerRe: CEdit WM_CHAR question Pin
Rage24-Nov-05 22:18
professionalRage24-Nov-05 22:18 
GeneralRe: CEdit WM_CHAR question Pin
followait24-Nov-05 22:46
followait24-Nov-05 22:46 
AnswerRe: CEdit WM_CHAR question Pin
Marc Soleda25-Nov-05 0:49
Marc Soleda25-Nov-05 0:49 
GeneralRe: CEdit WM_CHAR question Pin
followait25-Nov-05 7:02
followait25-Nov-05 7:02 
GeneralRe: CEdit WM_CHAR question Pin
PJ Arends25-Nov-05 7:36
professionalPJ Arends25-Nov-05 7:36 
GeneralRe: CEdit WM_CHAR question Pin
followait25-Nov-05 20:21
followait25-Nov-05 20:21 
GeneralRe: CEdit WM_CHAR question Pin
PJ Arends26-Nov-05 10:03
professionalPJ Arends26-Nov-05 10:03 
Why not use GetClassName() instead. It will return the class name of the window, regardless of whether it is a MFC class or not.
BOOL CTest_WM_CHARDlg::PreTranslateMessage(MSG* pMsg) 
{
   if (pMsg->message == WM_CHAR)
   {
      TCHAR ClassName[5] = {0};
      GetClassName(pMsg->hwnd, ClassName, 5);
      if (_tcsnicmp(ClassName, _T("EDIT"), 4) != 0)
      {
         // window is not an edit control, kill the WM_CHAR message
         return TRUE;
      }
   }
 
   return CDialog::PreTranslateMessage(pMsg);
}




"You're obviously a superstar." - Christian Graus about me - 12 Feb '03

"Obviously ???  You're definitely a superstar!!!" - mYkel - 21 Jun '04

"There's not enough blatant self-congratulatory backslapping in the world today..." - HumblePie - 21 Jun '05

Within you lies the power for good - Use it!
GeneralRe: CEdit WM_CHAR question Pin
followait26-Nov-05 20:29
followait26-Nov-05 20:29 
QuestionRetrieving results of SQL's 'WITH STATS' Pin
NeoHobbit24-Nov-05 19:08
NeoHobbit24-Nov-05 19:08 
QuestionScrollview flickering problem Pin
Variganji24-Nov-05 18:56
Variganji24-Nov-05 18:56 
AnswerRe: Scrollview flickering problem Pin
Blake Miller28-Nov-05 12:44
Blake Miller28-Nov-05 12:44 
Questionmore help fromthe article "Easy to use class for ScreenCapture to printer" by Albert Hermann Pin
a_david12324-Nov-05 18:52
a_david12324-Nov-05 18:52 
QuestionFile Copy Problem Pin
Jagadeesh VN24-Nov-05 18:48
Jagadeesh VN24-Nov-05 18:48 
QuestionInvokin anothr process from my app Pin
whizano24-Nov-05 18:37
whizano24-Nov-05 18:37 
AnswerRe: Invokin anothr process from my app Pin
Cool Ju24-Nov-05 18:44
Cool Ju24-Nov-05 18:44 
AnswerRe: Invokin anothr process from my app Pin
sanket.patel25-Nov-05 22:46
sanket.patel25-Nov-05 22:46 
QuestionHow to get the IShellBrowser interface of a open file dialog (new style)? Pin
ragavan24-Nov-05 17:52
ragavan24-Nov-05 17:52 
QuestionReading a file? Pin
Lord Kixdemp24-Nov-05 14:19
Lord Kixdemp24-Nov-05 14:19 
AnswerRe: Reading a file? Pin
PJ Arends24-Nov-05 16:26
professionalPJ Arends24-Nov-05 16:26 
GeneralRe: Reading a file? Pin
Lord Kixdemp25-Nov-05 22:14
Lord Kixdemp25-Nov-05 22:14 
AnswerRe: Reading a file? Pin
ThatsAlok29-Nov-05 1:09
ThatsAlok29-Nov-05 1:09 
GeneralRe: Reading a file? Pin
Lord Kixdemp29-Nov-05 8:50
Lord Kixdemp29-Nov-05 8:50 
QuestionHow to transfer the filename defined as CString in CreateProcess to load the specified file Pin
greenwyx24-Nov-05 14:03
greenwyx24-Nov-05 14:03 
AnswerRe: How to transfer the filename defined as CString in CreateProcess to load the specified file Pin
PJ Arends24-Nov-05 16:29
professionalPJ Arends24-Nov-05 16:29 

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.