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. Window sizing problem in CFormView app

Window sizing problem in CFormView app

Scheduled Pinned Locked Moved C / C++ / MFC
help
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.
  • R Offline
    R Offline
    RoyceF
    wrote on last edited by
    #1

    Hi, I have a CFormView-based application in which I am having a weird window sizing problem. On startup, my view window is very large vertically. It is so large that I can't see the top or the bottom of the window - it is completely off the screen. In the CView::OnInitialUpdate(), I get the window size by calling GetWindowRect(), then calling OnSize() with the width & height of this rectangle. For some reason, these values are very large (or negative) so that the OnSize() method creates child windows that are way off the screen. Any ideas for helping me get this fixed would be appreciated. Thanks, Royce

    H D 2 Replies Last reply
    0
    • R RoyceF

      Hi, I have a CFormView-based application in which I am having a weird window sizing problem. On startup, my view window is very large vertically. It is so large that I can't see the top or the bottom of the window - it is completely off the screen. In the CView::OnInitialUpdate(), I get the window size by calling GetWindowRect(), then calling OnSize() with the width & height of this rectangle. For some reason, these values are very large (or negative) so that the OnSize() method creates child windows that are way off the screen. Any ideas for helping me get this fixed would be appreciated. Thanks, Royce

      H Offline
      H Offline
      Hamid Taebi
      wrote on last edited by
      #2

      If you use GetWindowRect and ScreenToClientthen size from your window isnt right

      _**


      **_

      WhiteSky


      1 Reply Last reply
      0
      • R RoyceF

        Hi, I have a CFormView-based application in which I am having a weird window sizing problem. On startup, my view window is very large vertically. It is so large that I can't see the top or the bottom of the window - it is completely off the screen. In the CView::OnInitialUpdate(), I get the window size by calling GetWindowRect(), then calling OnSize() with the width & height of this rectangle. For some reason, these values are very large (or negative) so that the OnSize() method creates child windows that are way off the screen. Any ideas for helping me get this fixed would be appreciated. Thanks, Royce

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

        RoyceF wrote:

        For some reason, these values are very large (or negative)...

        Wouldn't that be expected since the window starts out too large for the screen?


        "Money talks. When my money starts to talk, I get a bill to shut it up." - Frank

        "Judge not by the eye but by the heart." - Native American Proverb

        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