richedit窗体不在最上层的情况下保存图片
TRect Rect = redt1->ClientRect;
TControlCanvas* RCanvas = new TControlCanvas;
RCanvas->Control = redt1;
Graphics::TBitmap* Bmp = new Graphics::TBitmap;
Bmp->Width = Rect.Width();
Bmp->Height = Rect.Height();
Bmp->Canvas->CopyRect(Rect, RCanvas, Rect);
Bmp->SaveToFile("C:\\Test.bmp");
delete Bmp; delete RCanvas;
上面程序可以保存richedit成图片,但必须是richedit窗体在顶层(不能被其它窗口挡住).如果想这些情况下(比如richedit所在的窗体隐藏)保存正确的图片有什么办法?
[解决办法]
NO。没办法。
[解决办法]
用了很多种方法试了一下,还是不行,只好帮你顶一下,坐等高人指点