• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Displaying shapes on a second monitor
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Prev by Date: Re: bind imageView data to NSArrayController objectAtIndex:
  • Next by Date: Re: Problem with dataWithContentsOfURL of NSData
  • Previous by thread: Re: Some architecture questions
  • Next by thread: Re: Displaying shapes on a second monitor
  • Index(es):
    • Date
    • Thread