Navigacija
Lista poslednjih: 16, 32, 64, 128 poruka.

Kako Win XP postavlja XP style na kontrole?

[es] :: Art of Programming :: Kako Win XP postavlja XP style na kontrole?

[ Pregleda: 3079 | Odgovora: 4 ] > FB > Twit

Postavi temu Odgovori

Autor

Pretraga teme: Traži
Markiranje Štampanje RSS

Srki_82
Srdjan Tot
Me @ My Home
Ljubljana

Član broj: 28226
Poruke: 1403
82.208.201.*

ICQ: 246436949


+10 Profil

icon Kako Win XP postavlja XP style na kontrole?14.03.2005. u 20:18 - pre 232 meseci
Pisao sam neke programcice za Win jos pre Win XP i sada kada ih pokrenem na XP-u uz dodatni fajl ImePrograma.exe.manifest XP ume lepo da doda style i na stare programcice. Kako se to radi? Da li je komplikovano napisati skin engine sa nekim osnovim mogucnostima (bez alphablendinga, bez nepravilnih oblika prozora...)?
 
Odgovor na temu

vlaiv
Vladimir Vlaisavljevic
Novi Sad

Član broj: 15993
Poruke: 352
*.neobee.net.



+1 Profil

icon Re: Kako Win XP postavlja XP style na kontrole?14.03.2005. u 21:00 - pre 232 meseci
Kompletno iscrtavanje za novi sistem kontrola (6.0 ako se ne varam) postoji u obliku funkcija pod windowsom XP pogledaj funkcije:

CloseThemeData
Closes the theme data handle.

DrawThemeBackground
Draws the background image defined by the visual style for the specified control part.

DrawThemeBackgroundEx
Draws the background image defined by the visual style for the specified control part.

DrawThemeEdge
Draws one or more edges defined by the visual style of a rectangle.

DrawThemeIcon
Draws an image from an image list with the icon effect defined by the visual style.

DrawThemeParentBackground
Draws the part of a parent control that is covered by a partially-transparent or alpha-blended child control.

DrawThemeText
Draws text using the color and font defined by the visual style.

EnableThemeDialogTexture
Enables or disables the visual style of a dialog window's background.

EnableTheming
Enables or disables visual styles for the current user in the current and later sessions.

GetCurrentThemeName
Retrieves the name of the current visual style, and optionally retrieves the color scheme name and size name.

GetThemeAppProperties
Retrieves the property flags that control how visual styles are applied in the current application.

GetThemeBackgroundContentRect
Retrieves the size of the content area for the background defined by the visual style.

GetThemeBackgroundExtent
Calculates the size and location of the background, defined by the visual style, given the content area.

GetThemeBackgroundRegion
Computes the region for a regular or partially transparent background that is bounded by a specified rectangle.

GetThemeBool
Retrieves the value of a BOOL property from the SysMetrics section of theme data.

GetThemeColor
Retrieves the value of a color property.

GetThemeDocumentationProperty
Retrieves the value for a theme property from the documentation section of the Themes.ini file.

GetThemeEnumValue
Retrieves the value of an enumerated type property.

GetThemeFilename
Retrieves the value of a filename property.

GetThemeFont
Retrieves the value of a font property.

GetThemeInt
Retrieves the value of an int property.

GetThemeIntList
Retrieves a list of int data from a visual style.

GetThemeMargins
Retrieves the value of a MARGINS property.

GetThemeMetric
Retrieves the value of a metric property.

GetThemePartSize
Calculates the original size of the part defined by a visual style.

GetThemePosition
Retrieves the value of a position property.

GetThemePropertyOrigin
Retrieves the location of the theme property definition for a property.

GetThemeRect
Retrieves the value of a RECT property.

GetThemeString
Retrieves the value of a string property.

GetThemeSysBool
Retrieves the Boolean value of a system metric such as flat menus, fading tool tips, and so forth.

GetThemeSysColor
Retrieves the value of a system color.

GetThemeSysColorBrush
Retrieves a system color brush.

GetThemeSysFont
Retrieves the LOGFONT of a system font.

GetThemeSysInt
Retrieves the value of a system int.

GetThemeSysSize
Retrieves the value of a system size metric from theme data.

GetThemeSysString
Retrieves the value of a system string.

GetThemeTextExtent
Calculates the size and location of the specified text when rendered in the visual style font.

GetThemeTextMetrics
Retrieves information about the font specified by a visual style for a particular part.

GetWindowTheme
Retrieves a theme handle for a window that has visual styles applied.

HitTestThemeBackground
Retrieves a hit test code for a point in the background specified by a visual style.

IsAppThemed
Reports whether the current application's user interface displays using visual styles.

IsThemeActive
Tests if a visual style for the current application is active.

IsThemeBackgroundPartiallyTransparent
Retrieves whether the background specified by the visual style has transparent pieces or alpha-blended pieces.

IsThemeDialogTextureEnabled
Reports whether the dialog supports background texturing.

IsThemePartDefined
Retrieves whether a visual style has defined parameters for the specified part and state.

OpenThemeData
Opens the theme data for a window and its associated class.

SetThemeAppProperties
Sets the flags that determine how visual styles are implemented in the calling application.

SetWindowTheme
Causes a window to use a different set of visual style information than its class normally uses.

Sto se tice menjanja stylova postoje interesantni programcici koji to rade recimo:

TGTSoft StyleBuilder i sl ...

Zaseban skin u programu (u odnosu na ostatak sistema) je vec druga tema ...
 
Odgovor na temu

Srki_82
Srdjan Tot
Me @ My Home
Ljubljana

Član broj: 28226
Poruke: 1403
82.208.201.*

ICQ: 246436949


+10 Profil

icon Re: Kako Win XP postavlja XP style na kontrole?14.03.2005. u 22:10 - pre 232 meseci
Znam za funkcije koje iscrtavaju Win XP style, ali kako WinXP sam iscrtava komponente u programima koje sam pisao za Win98. Onda nisam ni znao za te funkcije i sigurno ih nisam koristio u programu. Samo sam u folderu gde je moj programcic ubacio Firma.exe.manifest i XP je sam sredio da kontrole imaju XP style. Uopste mi nije jasno kako to uspeva... jedino sto mi pada na pamet je da je ili subclass-ovao moje komponente ili ubacio neki WinHook koje je presretao WM_PAINT poruke i ko zna jos koje.
 
Odgovor na temu

JogyII

Član broj: 29257
Poruke: 623
*.adsl.sezampro.yu.



Profil

icon Re: Kako Win XP postavlja XP style na kontrole?15.03.2005. u 03:45 - pre 232 meseci
EKSTREMNO UPROSCENO :

ti si pozivao windows da ti iscrtava sve kontrole (i iz starih, a radis to i iz novih programa)
windows je ranije to radio preko common controls 5.xxx (stari izgled) a sada to radi tako sto ima dva common controls dll-a (5.xxx i 6.xxx) pa ako nemas manifest dobijes onaj stari (5.xxx sa starim izgledom) a ako imas manifest podmetne ti novi dll (6.xxx sa novim izgledom)





So Long, and Thanks for All the Fish


 
Odgovor na temu

Srki_82
Srdjan Tot
Me @ My Home
Ljubljana

Član broj: 28226
Poruke: 1403
82.208.201.*

ICQ: 246436949


+10 Profil

icon Re: Kako Win XP postavlja XP style na kontrole?15.03.2005. u 18:20 - pre 232 meseci
Hmmmm... mislio sam da XP to drugacije radi, ali dobro. Kako to rade drugi programi kao sto je www.windowblinds.net Oni mogu da promene izgled bilo kog programa koji koristi standardne komponente i u Win 98 i u Win XP. Nije mu bitno koja je verzija comctrls-a. Hteo bih da napravim neki jednostavan skin engine koji bi mogao da radi nesto slicno.
 
Odgovor na temu

[es] :: Art of Programming :: Kako Win XP postavlja XP style na kontrole?

[ Pregleda: 3079 | Odgovora: 4 ] > FB > Twit

Postavi temu Odgovori

Navigacija
Lista poslednjih: 16, 32, 64, 128 poruka.