Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: Setting Aqua Window Background
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Setting Aqua Window Background



> I'm trying to set my window and dialog backgrounds to the proper them
> color/style (so that we get the proper Appearance background on 8.1-9.x and
> the striped background on X).
>
> Method 1 (as suggested on the Carbon mailing list):
>
> SetThemeWindowBackground( myWindow, kThemeBrushDialogBackgroundActive,
> false);
>
SetThemeWindowBackground is correct. Also call
DrawThemeModelessDialogFrame() with the correct state at draw
time. That's what paints the window background.

> Method 2 (PowerPlant Lwindow method):
>
> mMainWindow->SetThemeData(kThemeBrushDialogBackgroundActive,
> kThemeBrushDialogBackgroundInactive,
> kThemeTextColorBlack, kThemeTextColorBlack);
>
> ... Produces the grey background on 9 and the striped background on X, but
> controls that are drawing over the background seem to cause the stripes in
> the translucent area of the control to draw offset by a few pixels, so that
> they look like they were placed off-kilter. So the stripes aren't continuous
> across the window, but broken up.
>
The PP method is probably not correctly focusing the control so that the
pattern origin is right.


References: 
 >Setting Aqua Window Background (From: "Brian M. Criscuolo" <email@hidden>)



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

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.