コントロールの幅と高さを取得します
CRect rc;
CWnd *pWnd = GetDlgItem(IDC_STATIC_WARN);//IDC_picture为picture控件ID
pWnd->GetClientRect(&rc);//rc为控件的大小。
int tmpx = rc.Height();//控件高
int tmpy = rc.Width();//控件宽
コントロール上に描画する
GetDlgItem(IDC_STATIC_WARN)->GetDC()->Ellipse(10, 10,100, 100);