FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Fivewin Uxtheme
Posts: 1772
Joined: Thu Sep 05, 2019 05:32 AM

Fivewin Uxtheme

Posted: Sat Oct 29, 2022 07:35 AM
hi,

as TFolder() seems not to use "visual Style" i search for uxtheme
now i found in fwh\source\function\c5cnew.c some HB_FUNC()

when search under \classes i found only
\fwh\source\classes\btnbmp.prg
which use "OpenThemeData"

so only Type "BUTTON" have Theme :?:

---

how to "Set" Theme under Fivewin for TFolder() :?:
Code (fw): Select all Collapse
   ::hTheme := @UxTheme:OpenThemeData( 0, Str2Unicode( "Tab" ) + CHR( 0 ) )
greeting,

Jimmy
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM

Re: Fivewin Uxtheme

Posted: Sat Oct 29, 2022 10:42 AM

Jimmy,

Please try it this way:

C5_OpenThemeData( oTabs:hWnd, "SysTabControl32" )

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1772
Joined: Thu Sep 05, 2019 05:32 AM

Re: Fivewin Uxtheme

Posted: Sat Oct 29, 2022 10:38 PM
hi Antonio,
Antonio Linares wrote: Please try it this way:
C5_OpenThemeData( oTabs:hWnd, "SysTabControl32" )
thx for Answer

as i can say "Name" for Theme come from TMSCHEMA.H
"Button"
"Rebar"
"Toolbar"
"Status"
"Menu"
"ListView"
"Progress"
"Tab"
"Trackbar"
"Tooltips"
"TreeView"
"Spin"
"Page"
"Scrollbar"
"Edit"
"ComboBox"
"Taskbar Clock"
"Tray Notify"
"TaskBar"
"TaskBand"
"StartPanel"
"ExplorerBar"
"TaskBand"
but only "Button" is used and all other Controls have no "visual Style" under Fivewin :?:

---

as also "other C5_*" Function also are need like C5_DrawThemeBackground() for Control, so i need to re-write Control if i want to use "visual Style"

missing (for Ownerdraw)
IsThemeBackgroundPartiallyTransparent()
DrawThemeParentBackground()
Code (fw): Select all Collapse
         nRet := @UxTheme:IsThemeBackgroundPartiallyTransparent(::hTheme, BP_PUSHBUTTON, iStateId)
         IF .NOT. EMPTY(nRet)
            nRet := @UxTheme:DrawThemeParentBackground(::hButton,::oDrawItemStruct:hDC, ::oDrawItemStruct:rcItem)
         ENDIF

         nRet := @UxTheme:DrawThemeBackground(::hTheme,;
                       ::oDrawItemStruct:hDC   ,;
                       BP_PUSHBUTTON           ,;
                       iStateId                ,;
                       ::oDrawItemStruct:rcItem,;
                       0 )
greeting,

Jimmy
Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM

Re: Fivewin Uxtheme

Posted: Sun Oct 30, 2022 07:32 AM
Jimmy wrote:but only "Button" is used and all other Controls have no "visual Style" under Fivewin :?:
Can I see a sample of a controls without "visual style" and the same with "visual style"?
Posts: 1772
Joined: Thu Sep 05, 2019 05:32 AM

Re: Fivewin Uxtheme

Posted: Sun Oct 30, 2022 10:20 AM
hi Enrico,
Enrico Maria Giordano wrote:Can I see a sample of a controls without "visual style" and the same with "visual style"?
a Button get "other" Style when Manifest is "enable", that you can "see"
but what about "hover" ( when Mouse is over Control but not click ) when have no Manifest or not "enable" :?:

Visual Style for "PUSHBUTTON are
Code (fw): Select all Collapse
BEGIN_TM_PART_STATES(PUSHBUTTON)
     TM_STATE(1, PBS, NORMAL)
     TM_STATE(2, PBS, HOT)
     TM_STATE(3, PBS, PRESSED)
     TM_STATE(4, PBS, DISABLED)
     TM_STATE(5, PBS, DEFAULTED)
END_TM_PART_STATES()
so it is more as only "look like" when it is "in Action"
have a look into TMSCHEMA.H where every Control have those Constant to "ask" when Mouse move or click
greeting,

Jimmy
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM

Re: Fivewin Uxtheme

Posted: Sun Oct 30, 2022 08:15 PM

Dear Jimmy,

Could you please post some screenshots ?

many thanks

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1772
Joined: Thu Sep 05, 2019 05:32 AM

Re: Fivewin Uxtheme

Posted: Mon Oct 31, 2022 04:56 AM
hi Antonio,
Antonio Linares wrote:Could you please post some screenshots ?
i can only talk about Controls which i have used until now ... and that are not much

---

CLASS TFolder() is the latest Control where i notice that it does not show "Hot" Style when "hover"

btw. TFolderEx() seems not documented in Help File
greeting,

Jimmy
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM

Re: Fivewin Uxtheme

Posted: Mon Oct 31, 2022 07:17 AM

Dear Jimmy,

> CLASS TFolder() is the latest Control where i notice that it does not show "Hot" Style when "hover"

Could you please post a screenshot, using another GUIs, of such "Hot" Style when "hover" ?

Class TFolderEx was a usar (Daniel Garcia Gil) contribution to FWH and its quite similar to the Windows standard "folder", but with extras (colors on tabs, etc)

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1772
Joined: Thu Sep 05, 2019 05:32 AM

Re: Fivewin Uxtheme

Posted: Thu Nov 03, 2022 01:37 PM
hi Antonio,

as i say i just have use "some" Control so i can´t say "more"

---
have search in Source for
InitCommonControlsEx / InitCCEx / InitCommon() / InitCommonControls()
which seems used by
CLASS TReBar() / CLASS TToolBar()
CLASS TCalendar() / CLASS TDatePick() / Class TTimePick()
and Listview Header which have ICC_* Setting
https://learn.microsoft.com/en-us/windows/win32/api/commctrl/ns-commctrl-initcommoncontrolsex

as i know each Control have own ICC_* Constant which belong to Constant in TMSCHEMA.H
greeting,

Jimmy

Continue the discussion