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. GetWindowExt

GetWindowExt

Scheduled Pinned Locked Moved C / C++ / MFC
question
5 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.
  • S Offline
    S Offline
    Space Ace
    wrote on last edited by
    #1

    Does anyone know how GetWindowExt function works? I've written in my View class: (in OnInitialUpdate) CSize sizeTotal(1000, 1000); SetScrollSizes(MM_LOMETRIC, sizeTotal); then somewhere in the program I write CClientDC dc(this); OnPrepareDC(&dc); CSize size = dc.GetWindowExt(); And size.cy equals to -254! Does anyone know the clue?

    C 1 Reply Last reply
    0
    • S Space Ace

      Does anyone know how GetWindowExt function works? I've written in my View class: (in OnInitialUpdate) CSize sizeTotal(1000, 1000); SetScrollSizes(MM_LOMETRIC, sizeTotal); then somewhere in the program I write CClientDC dc(this); OnPrepareDC(&dc); CSize size = dc.GetWindowExt(); And size.cy equals to -254! Does anyone know the clue?

      C Offline
      C Offline
      Chris Losinger
      wrote on last edited by
      #2

      Space Ace wrote: then somewhere in the program where in the program? are you calling it before the window has been shown ? -c


      Conservative: One who admires radicals centuries after they're dead. -- Leo C. Rosten

      image effects!

      S 1 Reply Last reply
      0
      • C Chris Losinger

        Space Ace wrote: then somewhere in the program where in the program? are you calling it before the window has been shown ? -c


        Conservative: One who admires radicals centuries after they're dead. -- Leo C. Rosten

        image effects!

        S Offline
        S Offline
        Space Ace
        wrote on last edited by
        #3

        Chris Losinger wrote: where in the program? Well, I'm calling it in OnLButtonDown (just as a test). By this time the window is definitely already shown.

        C 1 Reply Last reply
        0
        • S Space Ace

          Chris Losinger wrote: where in the program? Well, I'm calling it in OnLButtonDown (just as a test). By this time the window is definitely already shown.

          C Offline
          C Offline
          Chris Losinger
          wrote on last edited by
          #4

          what happens if you don't call OnPrepareDC ? -c


          Conservative: One who admires radicals centuries after they're dead. -- Leo C. Rosten

          image effects!

          S 1 Reply Last reply
          0
          • C Chris Losinger

            what happens if you don't call OnPrepareDC ? -c


            Conservative: One who admires radicals centuries after they're dead. -- Leo C. Rosten

            image effects!

            S Offline
            S Offline
            Space Ace
            wrote on last edited by
            #5

            Chris Losinger wrote: what happens if you don't call OnPrepareDC ? This way it doesn't work either. In this case it returns 1 which is obvious: if we don't call OnPrepareDC the map mode is not set.

            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