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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. MoveWindow()

MoveWindow()

Scheduled Pinned Locked Moved C / C++ / MFC
helpquestion
5 Posts 5 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.
  • K Offline
    K Offline
    Krauze
    wrote on last edited by
    #1

    Under what circumstances will this function not work? I mean using it to change the width of the window. I find it kinda weird that this function sometimes works but sometimes not. Anyone could help? Many thx!

    E E L D 4 Replies Last reply
    0
    • K Krauze

      Under what circumstances will this function not work? I mean using it to change the width of the window. I find it kinda weird that this function sometimes works but sometimes not. Anyone could help? Many thx!

      E Offline
      E Offline
      Eugen Podsypalnikov
      wrote on last edited by
      #2

      // I find it kinda weird that this function sometimes(yes) works but sometimes(no) not. Probably it could be calculated as following :) : needs_to_work = sometimes(yes) - sometimes(no);

      They sought it with thimbles, they sought it with care; They pursued it with forks and hope; They threatened its life with a railway-share; They charmed it with smiles and soap. :)

      1 Reply Last reply
      0
      • K Krauze

        Under what circumstances will this function not work? I mean using it to change the width of the window. I find it kinda weird that this function sometimes works but sometimes not. Anyone could help? Many thx!

        E Offline
        E Offline
        Emilio Garavaglia
        wrote on last edited by
        #3

        If the window is created on a class that doesn't have the CS_HREDRAW and CS_VREDRAW styles, you've also to invalidate the window, since it is not done automatically. Use SetWindowPos to have more control on the possible options.

        2 bugs found. > recompile ... 65534 bugs found. :doh:

        1 Reply Last reply
        0
        • K Krauze

          Under what circumstances will this function not work? I mean using it to change the width of the window. I find it kinda weird that this function sometimes works but sometimes not. Anyone could help? Many thx!

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          It's possible your target windows prevents resizing or changes the behaviour. For example if it answers to the WM_GETMINMAXINFO message like so:

          case WM\_GETMINMAXINFO:
          	((MINMAXINFO\*)lParam)->ptMinTrackSize.x = 200;
          	((MINMAXINFO\*)lParam)->ptMinTrackSize.y = 150;
          	break;
          

          The window will not allow itself to be resized to anything smaller than 200x150 pixels.

          1 Reply Last reply
          0
          • K Krauze

            Under what circumstances will this function not work? I mean using it to change the width of the window. I find it kinda weird that this function sometimes works but sometimes not. Anyone could help? Many thx!

            D Offline
            D Offline
            David Crow
            wrote on last edited by
            #5

            Krauze wrote:

            I find it kinda weird that this function sometimes works but sometimes not.

            And in those instances where it does not, are you calling GetLastError() to find out why?

            "One man's wage rise is another man's price increase." - Harold Wilson

            "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

            "Man who follows car will be exhausted." - Confucius

            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