Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Tab Control

Tab Control

Scheduled Pinned Locked Moved C / C++ / MFC
help
2 Posts 2 Posters 9 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    Brigg Thorp
    wrote on last edited by
    #1

    I have a tab control that contains child dialogs. I have been able to add the dialogs OK, and they show up, but when I press Enter or Escape (both mapped to default buttons on the dialog), all of my controls disappear. I have heard that I may have to override EndDialog, since this is probably being called, but I was wondering if anyone else has a better solution. I don't want to use Property Sheets, and I know this can be done with dialogs. Any help would be greatly appreciated.

    S 1 Reply Last reply
    0
    • B Brigg Thorp

      I have a tab control that contains child dialogs. I have been able to add the dialogs OK, and they show up, but when I press Enter or Escape (both mapped to default buttons on the dialog), all of my controls disappear. I have heard that I may have to override EndDialog, since this is probably being called, but I was wondering if anyone else has a better solution. I don't want to use Property Sheets, and I know this can be done with dialogs. Any help would be greatly appreciated.

      S Offline
      S Offline
      softdiy
      wrote on last edited by
      #2

      look this code: BOOL CYouChildDlg::PreTranslateMessage(MSG* pMsg) { // TODO: Add your specialized code here and/or call the base class BOOL bHandledMsg = FALSE; switch (pMsg->message) { case WM_KEYDOWN: { switch (pMsg->wParam) { // hitting escape while searching for password edits // should only stop the search for password edits and // not kill app case VK_ESCAPE: bHandledMsg = TRUE; break; case VK_RETURN : bHandledMsg = TRUE; break; default: break; } // switch (pMsg->wParam) } break; default: break; } // switch (pMsg->message) return (bHandledMsg ? TRUE : CDialog::PreTranslateMessage(pMsg)); }

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups