Displaying shapes on a second monitor
Displaying shapes on a second monitor
- Subject: Displaying shapes on a second monitor
- From: Linda Glennie <email@hidden>
- Date: Tue, 14 Aug 2007 14:22:45 -0500
I would like to display various shapes on a second monitor.
I have been successful in creating a window on the second monitor
using the following code
}
[window setLevel:NSScreenSaverWindowLevel-1];
// Get all screens
windows = [[NSMutableArray alloc] init];
NSArray *screens = [NSScreen screens];
int i;
NSWindow *newWindow = [self addWindowOnScreen:[screens
objectAtIndex:1]];
[windows addObject:newWindow];
}
- (NSWindow *)addWindowOnScreen:(NSScreen *)screen
{
// Create new window
NSRect size;
size = [screen frame];
size.origin = NSZeroPoint;
newWindow = [[NSWindow alloc] initWithContentRect:size //[screen frame]
styleMask:NSBorderlessWindowMask
backing:NSBackingStoreBuffered
defer:NO
screen:screen];
// Define new window
[newWindow setBackgroundColor:[NSColor redColor]];
[newWindow setAlphaValue:1.0];
// [newWindow setLevel:NSScreenSaverWindowLevel-2];
[newWindow makeKeyAndOrderFront:nil];
return newWindow;
}
I cannot draw into that window using Quartz drawing APIs. Is there
any sample code for this?
Any Suggestions?
Thanks
_______________________________________________
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