Change id to IDC_STATIC_1 or something that makes it unique and the code
GetDlgItem(IDC_STATIC_1)->SetRectangleSize(co-ordinates for the rectangle);
should do what you are looking for
The example I have shown stresses on the dialog item id and not the actual method you need to get your job done.