GetWindowExt
-
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 writeCClientDC dc(this); OnPrepareDC(&dc); CSize size = dc.GetWindowExt();
And size.cy equals to -254! Does anyone know the clue? -
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 writeCClientDC dc(this); OnPrepareDC(&dc); CSize size = dc.GetWindowExt();
And size.cy equals to -254! Does anyone know the clue?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
-
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
-
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.
what happens if you don't call OnPrepareDC ? -c
Conservative: One who admires radicals centuries after they're dead. -- Leo C. Rosten
-
what happens if you don't call OnPrepareDC ? -c
Conservative: One who admires radicals centuries after they're dead. -- Leo C. Rosten