Problem getting the size of my screen Topic is solved

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
jenrique
Experienced Solver
Experienced Solver
Posts: 63
Joined: Mon Apr 24, 2006 10:43 am
Location: Granada, Spain

Problem getting the size of my screen

Post by jenrique » Fri Jun 09, 2006 8:32 am

Good morning

I

Cursor
Earned some good credits
Earned some good credits
Posts: 120
Joined: Sun Aug 29, 2004 3:09 pm
Location: Grenoble, France
Contact:

Post by Cursor » Fri Jun 09, 2006 10:08 am

You can easily compute a window size with wxDC.
You just have to
* get the window client size with wxWindow::GetClientSize [1].
* get a client DC for the windows.
* change the DC map mode with wxDC::SetMapMode [2].
* retrieve the wanted value with wxCoord DeviceToLogicalXRel [3].
If you want a measure in millimeter, use wxMM_METRIC, is you want a more precise metric, use wxMM_LOMETRIC.

[1] : http://www.wxwidgets.org/manuals/2.6.3/ ... clientsize
[2] : http://www.wxwidgets.org/manuals/2.6.3/ ... setmapmode
[3] : http://www.wxwidgets.org/manuals/2.6.3/ ... setmapmode
What is little and green, witch go up and down ??
Yoda playing with the force.

jenrique
Experienced Solver
Experienced Solver
Posts: 63
Joined: Mon Apr 24, 2006 10:43 am
Location: Granada, Spain

Post by jenrique » Fri Sep 08, 2006 4:59 pm

Thank you for your help, it

Post Reply