有两步
1>,什么时候画!
2>,怎么画!
1>在过程procedure WMNCPaint(var Msg:TMessage)
message WM_NCPAINT;中画;
2> 第二最关键
procedure WMNCPaint(var Msg:TMessage)
var
MCanvas:TCanvas;
begin
try
MCanvas:=TCanvas.Create;
MCanvas.Handle:=GetWindowDC(Handle);
MCanvas..//利用画布MCanvas画(小心,别画到客户区);
finally
ReleaseDC(Handle,MCanvas.Handle);
MCanvas.Free;
end;
end;