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. WM_SIZE Question

WM_SIZE Question

Scheduled Pinned Locked Moved C / C++ / MFC
questiontutorial
3 Posts 3 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.
  • Y Offline
    Y Offline
    yellowine
    wrote on last edited by
    #1

    Anybody knows how to mannually send the WM_SIZE message to a window given the handle of that window. In other words, what is the params for SendMessage(WM_SIZE, ...,...)?

    J P 2 Replies Last reply
    0
    • Y yellowine

      Anybody knows how to mannually send the WM_SIZE message to a window given the handle of that window. In other words, what is the params for SendMessage(WM_SIZE, ...,...)?

      J Offline
      J Offline
      Jeremy Falcon
      wrote on last edited by
      #2

      LRESULT CALLBACK WindowProc(
      HWND hwnd, // handle to window
      UINT uMsg, // WM_SIZE
      WPARAM wParam, // resizing flag
      LPARAM lParam // client area
      );

      wParam Specifies the type of resizing requested. This parameter can be one of the following values. SIZE_MAXHIDE Message is sent to all pop-up windows when some other window is maximized. SIZE_MAXIMIZED The window has been maximized. SIZE_MAXSHOW Message is sent to all pop-up windows when some other window has been restored to its former size. SIZE_MINIMIZED The window has been minimized. SIZE_RESTORED The window has been resized, but neither the SIZE_MINIMIZED nor SIZE_MAXIMIZED value applies. lParam The low-order word of lParam specifies the new width of the client area. The high-order word of lParam specifies the new height of the client area. You can use the LOWORD, HIWORD, MAKELPARAM, or MAKEWPARAM macros to assemble the wParam and lParam paramters. Jeremy L. Falcon "You do not know the power of the dumb side." Homepage : Sonork = 100.16311
      Maybe my mangling might misguide malicious miscreants momentarily?

      1 Reply Last reply
      0
      • Y yellowine

        Anybody knows how to mannually send the WM_SIZE message to a window given the handle of that window. In other words, what is the params for SendMessage(WM_SIZE, ...,...)?

        P Offline
        P Offline
        Paul M Watt
        wrote on last edited by
        #3

        If you are interested, you can simply call SetWindowPos or MoveWindow to change the size of the window as well, and windows will take care of the message sending for you.


        Build a man a fire, and he will be warm for a day
        Light a man on fire, and he will be warm for the rest of his life!

        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