• 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
Re: Icon in window title
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Icon in window title


  • Subject: Re: Icon in window title
  • From: kristin <email@hidden>
  • Date: Tue, 29 May 2001 16:24:50 -0700

I'm afraid there is no good way to do what you are attempting to do, right now. Even if it were possible to get a WindowRef from an arbitrary NSWindow, you would not get the behavior you expect from SetWindowProxyIcon. The AppKit is responsible for drawing the titlebar of AppKit windows, and it does not know about any call you may have made to this function.

I am looking into adding API to NSWindow to allow you to set the icon in the window title.

Kristin

On Saturday, May 26, 2001, at 01:34 PM, Tom Waters wrote:

I just noticed that windowRef is always returning nil.

If you read the comment below carefully, it seems that windowRef only works when you created the window with initWithWindowRef.

Is there no way to get a windowRef back from a window created from a NIB? (mine is a document window).


On Saturday, May 26, 2001, at 12:37 PM, Andreas Monitzer wrote:

On Saturday, May 26, 2001, at 09:18 , Tom Waters wrote:

I found this in MacWindows.h

extern OSStatus SetWindowProxyIcon(WindowRef window, IconRef icon);

It might solve my problem if I knew how to convert an NSWindow to a WindowRef and an NSImage to an IconRef.

Anybody know how to do this?

From NSWindow.h:

@interface NSWindow(NSCarbonExtensions)
// create an NSWindow for a Carbon window - windowRef must be a Carbon WindowRef - see MacWindows.h
- (NSWindow *)initWithWindowRef:(void * /* WindowRef */)windowRef;
// return the Carbon WindowRef passed into initWithWindowRef: - see MacWindows.h
- (void * /* WindowRef */)windowRef;
@end


andy
--
Discussion forthcoming.
_______________________________________________
cocoa-dev mailing list
email@hidden
http://www.lists.apple.com/mailman/listinfo/cocoa-dev


  • Follow-Ups:
    • Re: Icon in window title
      • From: Tom Waters <email@hidden>
References: 
 >Re: Icon in window title (From: Tom Waters <email@hidden>)

  • Prev by Date: [Resend] New Developer CD install problems
  • Next by Date: Currently selected language?
  • Previous by thread: Re: Icon in window title
  • Next by thread: Re: Icon in window title
  • Index(es):
    • Date
    • Thread