获取控件宽高
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);