Re: Disable visual themes for Gui4Cli program on Windows 7 (64 bit)

"rene" <[email protected]> Mon, 22 Apr 2013 19:28:16 -0000
Newsgroups gmane.comp.windows.gui4cli
Message-ID <[email protected]>
Hi Dimitris,

Thank you for clarification. 
The call of SetWindowTheme returns now 0 (S_OK - Operation successful).

> .. I can add an internal
> variable like $$event.handle, next upload.

Would be handy to have the variable $$event.handle available.

I will exercise with some more dll functions. Looks interesting enough to invest some more time and effort.

Best Regards, Rene


--- In [email protected], Dimitris Keletsekis <gui4cli@...> wrote:
>
> Hi,
> 
> First - you're calling the function before the window is open, so there is
> nothing to act on. Move the GuiOpen before the CALL command.
> 
> Second - you are not giving the Window Handle to the function, just 0.
> 
> To disable the styles in the window:
> 
> call uxtheme SetWindowTheme $$this.handle "" ""
> 
> However, this only seems to disable the window itself, not the listview,
> probably because the listview is itself a window and has another handle.
> 
> I don't know how to get the listview's handle.. I can add an internal
> variable like $$event.handle, next upload.
> 
> Dimitris
> 
> 
> 
> On Sun, Apr 21, 2013 at 6:34 PM, rene <rene-zimmerli@...> wrote:
> 
> > **
> >
> >
> > Hello,
> > I try to disable visual themes for one of my programs using uxthemes.dll
> > but can't get further ... not even sure that the dll gets loaded
> > ($$func.ret always = -2147024890).
> > Sample code:
> > ------------------------------------------
> > G4C DisableVisualThemes
> > xOnload
> > SysDll Declare uxtheme SetWindowTheme int "int/pstring/pstring"
> > say "The declare uxtheme SetWindowTheme function returned: $$func.ret"
> > call uxtheme SetWindowTheme 0 "" "" // Disable visual themes
> > say "The call uxtheme SetWindowTheme function returned: $$func.ret"
> > // SetWinAttr #this background color "150/150/150" // gray
> > // Change the xCalendar colors and set preferences
> > Use Calendar #this calendar_id
> > Calendar color back "250/150/0" // orange
> > Calendar color bkmonth "250/150/0" // orange => does not work if themes
> > enabled ?
> > Calendar color text "0/0/0" // black
> > Calendar color bktitle "255/0/0" // red
> > Calendar delta 1
> > GuiOpen #this
> > xOnClose
> > SysDll Free uxtheme
> > say "The Free UxTheme function returned: $$func.ret"
> > GuiQuit #this
> > Window #CENTER #CENTER 300 250 "Disable Visual Themes"
> > xButton #CENTER -40 -10 30 "Close"
> > GuiClose #this
> > xCalendar #center 10 200 180
> > Attr id calendar_id
> > Attr style week;Attr frame sunken
> > ------------------------------------------
> >
> > If it works, it should display the background color of the calendar in
> > orange (as set above with 'bkmonth').
> >
> > Does anybody has a clue what I am doing wrong here?
> >
> > Any help is very appreciated.
> > Best Regards, Rene
> >
> >  
> >
>




------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/gui4cli/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/gui4cli/join
    (Yahoo! ID required)

<*> To change settings via email:
    [email protected] 
    [email protected]

<*> To unsubscribe from this group, send an email to:
    [email protected]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/