Click here to Skip to main content
15,914,416 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: converting text into bitmaps(urgent help needed) Pin
Ravi Bhavnani12-Aug-02 11:08
professionalRavi Bhavnani12-Aug-02 11:08 
Generaldisable enter and escape Pin
Zizilamoroso12-Aug-02 4:41
Zizilamoroso12-Aug-02 4:41 
GeneralRe: disable enter and escape Pin
Chris Losinger12-Aug-02 4:47
professionalChris Losinger12-Aug-02 4:47 
GeneralRe: disable enter and escape Pin
Zizilamoroso12-Aug-02 5:00
Zizilamoroso12-Aug-02 5:00 
GeneralRe: disable enter and escape Pin
Brian Delahunty12-Aug-02 5:38
Brian Delahunty12-Aug-02 5:38 
GeneralRe: disable enter and escape Pin
Chris Losinger12-Aug-02 5:45
professionalChris Losinger12-Aug-02 5:45 
GeneralRe: disable enter and escape Pin
Zizilamoroso12-Aug-02 6:20
Zizilamoroso12-Aug-02 6:20 
GeneralRe: disable enter and escape Pin
Chris Losinger12-Aug-02 6:37
professionalChris Losinger12-Aug-02 6:37 
here's how i handle it in http://www.codeproject.com/property/saprefs.asp[^].

BOOL CSAPrefsSubDlg::PreTranslateMessage(MSG* pMsg) 
{
   // close, on the Escape key.
   if ((pMsg->message == WM_KEYDOWN) && (pMsg->wParam == VK_ESCAPE))
   {
      GetParent()->PostMessage(WM_CLOSE);
      return TRUE;
   }
   
   // Don't let CDialog process the Return key, if a multi-line edit has focus
   if ((pMsg->message == WM_KEYDOWN) && (pMsg->wParam == VK_RETURN))
   {
      // Special case: if control with focus is an edit control with
      // ES_WANTRETURN style, let it handle the Return key.
      
      TCHAR szClass[10];
      CWnd* pWndFocus = GetFocus();
      if (((pWndFocus = GetFocus()) != NULL) &&
         IsChild(pWndFocus) &&
         (pWndFocus->GetStyle() & ES_WANTRETURN) &&
         GetClassName(pWndFocus->m_hWnd, szClass, 10) &&
         (lstrcmpi(szClass, _T("EDIT")) == 0))
      {
         pWndFocus->SendMessage(WM_CHAR, pMsg->wParam, pMsg->lParam);
         return TRUE;
      }
      
      return FALSE;
   }
   
   return CDialog::PreTranslateMessage(pMsg);
}



Conservative:
One who admires radicals centuries after they're dead.
-- Leo C. Rosten

GeneralRe: disable enter and escape Pin
lucy12-Aug-02 9:23
lucy12-Aug-02 9:23 
GeneralRe: disable enter and escape Pin
Zizilamoroso13-Aug-02 6:25
Zizilamoroso13-Aug-02 6:25 
GeneralHelp select custom line in virtual CListView Pin
Stas12-Aug-02 4:28
Stas12-Aug-02 4:28 
Generaltrouble with ifstream - kinda wierd Pin
12-Aug-02 4:18
suss12-Aug-02 4:18 
GeneralRe: trouble with ifstream - kinda wierd Pin
Brian Delahunty12-Aug-02 5:45
Brian Delahunty12-Aug-02 5:45 
Generalsymbols in list box string Pin
kramery12-Aug-02 4:10
susskramery12-Aug-02 4:10 
GeneralRe: symbols in list box string Pin
pépé12-Aug-02 21:53
pépé12-Aug-02 21:53 
QuestionHow can I change the background color on a date/time picker? Pin
DanYELL12-Aug-02 4:03
DanYELL12-Aug-02 4:03 
AnswerRe: How can I change the background color on a date/time picker? Pin
Ranjan Banerji12-Aug-02 6:26
Ranjan Banerji12-Aug-02 6:26 
GeneralGetting the Exact Time (in ms) Pin
LittleYellowBird12-Aug-02 3:18
LittleYellowBird12-Aug-02 3:18 
GeneralRe: Getting the Exact Time (in ms) Pin
Tomasz Sowinski12-Aug-02 3:30
Tomasz Sowinski12-Aug-02 3:30 
GeneralCustom control based on dialog Pin
Wim Jans12-Aug-02 3:12
Wim Jans12-Aug-02 3:12 
GeneralRe: Custom control based on dialog Pin
Tomasz Sowinski12-Aug-02 3:15
Tomasz Sowinski12-Aug-02 3:15 
GeneralRe: Custom control based on dialog Pin
Wim Jans12-Aug-02 5:35
Wim Jans12-Aug-02 5:35 
Generalproblem with propertysheetex Pin
toon12-Aug-02 2:58
toon12-Aug-02 2:58 
GeneralAccess Database mysteries in VC++... Pin
Anonymous12-Aug-02 2:57
Anonymous12-Aug-02 2:57 
GeneralRe: Access Database mysteries in VC++... Pin
Stefan Pedersen12-Aug-02 3:21
Stefan Pedersen12-Aug-02 3:21 

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.