6

I need to create a HUD-like window programmatically when the user press on my main view. Here's the code I use, but I only get a standard window.

videoWindow= [[NSPanel alloc]
      initWithContentRect:NSMakeRect(200.0, 200.0, 300, 200) 
      styleMask:NSTitledWindowMask | NSClosableWindowMask 
      backing:NSBackingStoreBuffered defer:YES];
[videoWindow makeKeyAndOrderFront:nil];

Perhaps I'm not using the right flags, but I didn't find in the documentation or on Google. Any thoughts?

Chris Smith
  • 18,244
  • 13
  • 59
  • 81

1 Answers1

10

You need to use NSPanel with the NSHUDWindowMask style mask.

Mike Abdullah
  • 14,933
  • 2
  • 50
  • 75