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. Dialog

Dialog

Scheduled Pinned Locked Moved C / C++ / MFC
c++
2 Posts 2 Posters 0 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.
  • A Offline
    A Offline
    act_x
    wrote on last edited by
    #1

    I have a VC++ Dialog App and 1. want the Dialog not be be moved . ie i want to disable moving the window ! 2. If i make the main window movable how should I position the PropertySheet contained within . Assuming I have code like this void CCamProgrammerDlg::OnMove(int x, int y) { CDialog::OnMove(x, y); if(propertySheetCreated){ CRect r ; this->GetWindowRect(&r); mainSheet.SetWindowPos(0,r.left,r.top+30,r.Width(),r.Height()-75,0); } What I am asking is I hate to hardcode the offsets . I want the PropertySheet right below the Title bar of the mainWindow even after the main window moves ____________________________________________________ |__Main Window Title Bar __________________________|x| |__PropertySheet Title bar___________________________| |_Tab1_|Tab2__| | | | | | | PROPERTYSHEET + MAIN WND AREA | | | | | | | |____________________________________________________| | | | | | | | | | | | MAIN WINDOW AREA | | | | | | | |____________________________________________________| 3. IS it possible to create a PropertySheet without a Title Bar but not as a Child ! Engineering is the effort !

    S 1 Reply Last reply
    0
    • A act_x

      I have a VC++ Dialog App and 1. want the Dialog not be be moved . ie i want to disable moving the window ! 2. If i make the main window movable how should I position the PropertySheet contained within . Assuming I have code like this void CCamProgrammerDlg::OnMove(int x, int y) { CDialog::OnMove(x, y); if(propertySheetCreated){ CRect r ; this->GetWindowRect(&r); mainSheet.SetWindowPos(0,r.left,r.top+30,r.Width(),r.Height()-75,0); } What I am asking is I hate to hardcode the offsets . I want the PropertySheet right below the Title bar of the mainWindow even after the main window moves ____________________________________________________ |__Main Window Title Bar __________________________|x| |__PropertySheet Title bar___________________________| |_Tab1_|Tab2__| | | | | | | PROPERTYSHEET + MAIN WND AREA | | | | | | | |____________________________________________________| | | | | | | | | | | | MAIN WINDOW AREA | | | | | | | |____________________________________________________| 3. IS it possible to create a PropertySheet without a Title Bar but not as a Child ! Engineering is the effort !

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

      I will answer 1. Handle OnNcHitTest and tell the system the mouse click was on the client area when it is actual hit on the caption. Here is the code UINT CMyDlg::OnNcHitTest(CPoint point) { UINT ret = CDialog::OnNcHitTest(point); if(ret == HTCAPTION ) return HTCLIENT; else return ret; }

      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