vishalgupta9x 0 Newbie Poster
/////////////////////////////////////////////////////////////////////////////
//
// Dialog
//

IDD_DIALOG1 DIALOGEX 0, 0, 316, 180
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Dialog"
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
    DEFPUSHBUTTON   "OK",IDOK,205,159,50,14
    PUSHBUTTON      "Cancel",IDCANCEL,259,159,50,14
END
case WM_INITDIALOG:
  RECT rc;
  GetClientRect(hwnd,&rc);
break;

I am unable to get the actual height and width of the dialog box. Here GetClientRect returns

top =0
left =0
bottom = 325
right = 480

where as the size of dialog is 316,180.
what i am doing wrong. How to get the actual size

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.