Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to get a staticTextControl on a overlayWindow to show



on 5/15/03 10:49 AM, Eric Schlegel at email@hidden wrote:

> On Wednesday, May 14, 2003, at 08:01 PM, Alfred Van Hoek wrote:
>
>> Is it possible to get a staticTextControl on a overlayWindow to show?
>> Creating the control on such a window seems to be possible, based on
>> noErr
>> results. But it won't show. Am I doing something impossible?
>
> Overlay windows have a kEventWindowPaint handler installed by default,
> which clears the overlay window's context to transparent and returns
> noErr. Because the handler returns noErr, kEventWindowUpdate is never
> sent for overlay windows, and if you're looking for that event as a
> signal to call DrawControls (or if you have the standard window handler
> installed), you'll never get it.
>
> You should be able to make this work by installing your own
> kEventWindowPaint handler, something like this:
>
> case kEventWindowPaint:
> if ( ( err = CallNextEventHandler( callRef, event ) ) == noErr )
> DrawControls( window );
> return err;
>

Hmm, it sounds good, but still nothing is shown. The only way, according to
this protocol, is to return eventNotHandledErr instead of noErr, but it only
shows a white square, not the kControlEditTextTextTag string.

The reason of doing this is to create an overlayWindow of the size of a
staticText. The window and control are dynamically created and destroyed
during a mouse drag of a slider thumb on the parent window.

Would there be another trick, or should I resort to the usage of a
CGContextRef and perform string-drawing there?

Alfred
_______________________________________________
carbon-development mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/carbon-development
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: How to get a staticTextControl on a overlayWindow to show (From: Eric Schlegel <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.