Moving a window offscreen
Moving a window offscreen
- Subject: Moving a window offscreen
- From: Jonathan Dann <email@hidden>
- Date: Fri, 6 Mar 2009 19:38:57 +0100
Hi All,
In my application I want to create an image of a document window as a
preview prior to displaying the window to the user. To obtain the
CGImage of a displayed window is simple enough using the CGWindow API
as shown below:
- (CGImageRef)CGImage;
{
return CGWindowListCreateImage(CGRectNull,
kCGWindowListOptionIncludingWindow, [self windowNumber],
kCGWindowImageDefault);
}
The problem comes when trying to display the window initially at a far-
off position so I can create the image and the move the window onto
the screen.
Setting the origin of the window to a point with large +ve or -ve
ordinates causes the window to appear at the edge of the main screen,
partly shown.
Has anybody any experience with either a) rendering an entire window
into a bitmap instead of to the screen, or b) moving the window
offscreen completely? If b) is possible, would the above code work for
such a window?
Thanks for your help,
Jonathan
http://espresso-served-here.com
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden