我是Visual C++中使用Graphics的新手.我只是想制作一个充满颜色的矩形.需要帮助来纠正这个......
RECT rect;
HDC hdc;
hdc=CreateDC(TEXT("DISPLAY"),NULL,NULL,NULL);
rect.left=30;
rect.right=100;
rect.top=50;
rect.bottom=200;
FillRect(hdc,&rect,(HBRUSH)(RGB(40,151,151)));
Run Code Online (Sandbox Code Playgroud)
错误是:
ERROR: The variable 'rect' is being used without being initialized.