#WinGDI winGDI gdi; int pen, brush; ; stringEdit.lock(); stringEdit.lockWindowUpdate(true); gdi = new WinGDI(WINAPI::getWindowDC(stringEdit.hWnd())); brush = gdi.createSolidBrush(WinApi::RGB2int(255, 0, 0)); gdi.fillRect(0, 0, 10, 10, brush); stringEdit.unLock(true); stringEdit.lockWindowUpdate(false);