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. How to reposition Modeless Dialog box on resizing application window

How to reposition Modeless Dialog box on resizing application window

Scheduled Pinned Locked Moved C / C++ / MFC
questionhelptutorial
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
    Arun AC
    wrote on last edited by
    #1

    Hai all, I use a modeless dialog box in my application. when I resize the application window, I can not change the position of the modeless dialog box, correspondingly. How can i prevent it? Also, the window for the modeless dialog in the task bar is also seen. Simply, I am trying to make the Modeless Dialog box to be a part of my application window. Please help me, With Thanks and Rgds, Arun

    P 1 Reply Last reply
    0
    • A Arun AC

      Hai all, I use a modeless dialog box in my application. when I resize the application window, I can not change the position of the modeless dialog box, correspondingly. How can i prevent it? Also, the window for the modeless dialog in the task bar is also seen. Simply, I am trying to make the Modeless Dialog box to be a part of my application window. Please help me, With Thanks and Rgds, Arun

      P Offline
      P Offline
      Peter Mares
      wrote on last edited by
      #2

      If my understanding of your problem is correct, you are trying to use a modeless dialog to look as if its a "pane" within your application. If this is correct, read on: 1. Make the dialog a CHILD dialog 2. In the parent window, handle the WM_SIZE message and then merely resize the child dialog. For example (a WTL eg): void OnSize(UINT uiCode, CSize sz) { CRect rect; GetClientRect(&rect); if ( ::IsWindow(m_MyChildDialog.m_hWnd) ) { // do some manipulation on the rect if needed... rect.DeflateRect(10,10,10,10); // here I'm just decreasing the overall size of the rect m_MyChildDialog.MoveWindow(&rect); } } That should be all you need to do. Let me know if I've missed your question completely. Cheers, Peter


      controlSHIFT [Glossary Manager] [AfterThought Backup Lite] All good things were meant to be improved

      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