1)当WM_PAINT不是由InvalidateRect产生时,即由最大化,最小化等产生时,或者移动产生(移动有时只会产生WM_ERASEBKGND消息)系统先发送WM_ERASEBKGND消息,再发送WM_PAINT消息。 如果处理WM_ERASEBKGND消息时返回FALSE,BeginPain Read More
posted @ 2016-02-26 21:49
findumars
Views(474)
Comments(0)
Diggs(0)
一直以来,对于WM_PAINT和WM_ERASEBKGND消息不是很清楚,从书上和网上找了很多资料,大体上有以下几点说法:1>WM_PAINT先产生,WM_ERASEBKGND后产生 2.WM_PAINT产生后,在调用BeginPaint时hdc = BeginPaint(hWnd, &ps); 如 Read More
posted @ 2016-02-26 21:48
findumars
Views(2456)
Comments(0)
Diggs(0)
混个脸熟: Read More
posted @ 2016-02-26 21:39
findumars
Views(333)
Comments(0)
Diggs(0)
新窗体上放一个Button1和Panel1,仅仅Form1就会收到以下消息: procedure TWinControl.DefaultHandler(var Message); begin if FHandle <> 0 then begin with TMessage(Message) do b Read More
posted @ 2016-02-26 21:03
findumars
Views(596)
Comments(0)
Diggs(0)
这是取得DC句柄的其中一种方法(会重定义原点和建立新的剪裁区): function TControl.GetDeviceContext(var WindowHandle: HWnd): HDC; begin if Parent = nil then raise EInvalidOperation.C Read More
posted @ 2016-02-26 20:40
findumars
Views(551)
Comments(0)
Diggs(0)