|
case WM_PAINT:
// BeginPaint(p->Win.Wnd,&Paint);
// if (p->Skin[p->SkinNo].Valid)
// SkinDraw(&p->Skin[p->SkinNo],Paint.hdc,&p->SkinArea);
// p->Player->Paint(p->Player,Paint.hdc,p->Offset.x,p->Offset.y);
// EndPaint(p->Win.Wnd,&Paint);
//add by lm
BeginPaint(p->Win.Wnd,&Paint);
myHDC = GetDC(p->Win.Wnd);
myrect.left = 0;
myrect.top = 0;
myrect.right = 300;
myrect.bottom = 200;
FillRect(myHDC, &myrect, RGB(255,0,0));
EndPaint(p->Win.Wnd,&Paint);
printf("\n interface Proc WM_PAINT------ \r\n");
break;
如上代码所示:
我的本意是想在窗口中先刷一块300x200的红色区域测试一下,但程序运行起来后始终看不到这块红色. |
|