Border Width of a Control
C / C++ / MFC
3
Posts
3
Posters
0
Views
1
Watching
-
If you have a CListCtrl, and you set the option to have a border (either through the GUI interface or WM_BORDER option), how do you find the border width ?
I haven't tried, but I think you can calculate the it by copmuting the difference in width between
GetWindowRect
andGetClientRect
(and dividing by two.) Joaquín M López Muñoz Telefónica, Investigación y Desarrollo -
If you have a CListCtrl, and you set the option to have a border (either through the GUI interface or WM_BORDER option), how do you find the border width ?
Look at ::GetSystemMetrics() in MSDN... int xBorder = GetSystemMetrics(SM_CXBORDER); int yBorder = GetSystemMetrics(SM_CYBORDER);