How to get the width and height of a window? (MFC)
C / C++ / MFC
5
Posts
5
Posters
0
Views
1
Watching
-
CRect rc;
cwnd.GetClientRect ( &rc );
rc.right is the width, and rc.bottom is the height. --Mike-- http://home.inreach.com/mdunn/ "....." -- Silent Bob :love: your :bob: with :vegemite: and :beer:
-
Normally GetClienRect() would work fine, if it doesn´t give you the size in pixels you have to change the viewport HTH Braulio
-
CRect rect; GetWindowRect(&rect); int nWidth=rect.Width(); int nHeight=rect.Height(); Jerzy