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. Other Discussions
  3. Article Writing
  4. Resizing a dialog

Resizing a dialog

Scheduled Pinned Locked Moved Article Writing
help
3 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.
  • T Offline
    T Offline
    TSI
    wrote on last edited by
    #1

    Alright I was going to try and solve this problem on my own, but with school I just don't have the time and its really starting to bug me. Here it is. I want to have a menu item that when selected will change the dimensions of the main dialog. I'd like it to be able to resize the dialog to fit the screen. I'd also like to have a 640x480, 800x600, and a 1024x768 item that when selected will change the dialog to these sizes. I've tried using MoveWindow(), but this only seems to work in the dialogs initialization. I'd like to solve this myself, but it's gotten to the point that not having the answer is too annoying. Thank you.

    M 1 Reply Last reply
    0
    • T TSI

      Alright I was going to try and solve this problem on my own, but with school I just don't have the time and its really starting to bug me. Here it is. I want to have a menu item that when selected will change the dimensions of the main dialog. I'd like it to be able to resize the dialog to fit the screen. I'd also like to have a 640x480, 800x600, and a 1024x768 item that when selected will change the dialog to these sizes. I've tried using MoveWindow(), but this only seems to work in the dialogs initialization. I'd like to solve this myself, but it's gotten to the point that not having the answer is too annoying. Thank you.

      M Offline
      M Offline
      Michael Dunn
      wrote on last edited by
      #2

      Use SetWindowPos() to set the position and size of the dialog at the same time: SetWindowPos ( hwndDialog, NULL, 0, 0, nWidth, nHeight, SWP_NOZORDER ); --Mike-- http://home.inreach.com/mdunn/ "That probably would've sounded more commanding if I wasn't wearing my yummy sushi pajamas."   --Buffy

      T 1 Reply Last reply
      0
      • M Michael Dunn

        Use SetWindowPos() to set the position and size of the dialog at the same time: SetWindowPos ( hwndDialog, NULL, 0, 0, nWidth, nHeight, SWP_NOZORDER ); --Mike-- http://home.inreach.com/mdunn/ "That probably would've sounded more commanding if I wasn't wearing my yummy sushi pajamas."   --Buffy

        T Offline
        T Offline
        TSI
        wrote on last edited by
        #3

        Thanks Mike. It works! :)

        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