Older Newer
Fri, 03 Sep 2021 04:23:04 . . . . SyneRyder [Initial function definition]


Changes by last author:

Added:
= setDialogTheme =

== Syntax ==

int setDialogTheme(int state)

== Arguments ==

:state

::Theme state of the control. Set to 0 to disable themes, or 1 to enable Windows Themes on this control.

== Return ==

Returns -1 if the dialog is out of range or not in use, otherwise it returns S_OK if the function succeeded, or an HRESULT error code as returned by the [SetWindowTheme Win32 API function].

== Description ==

Enables or disables the modern Windows UI theme (from XP/Vista onwards) on the filter dialog window. Note that setting the dialog theme does not apply the theme to the controls on the interface, use setCtlTheme on each control to do this. Note that the dialog might not adopt the modern theme if your host graphics program is running in a compatibility mode emulating an older version of Windows.

== Example ==

<code>

%ffp

Category: "FilterMeister"

Author: "Harald Heim"

Title: "Theme Demo"

Filename: "ThemeDemo.8bf"

Copyright: "No Copyright"

Description:"Theme Demo"

Version: "1.0"

URL: "http://thepluginsite.com"

About: "!T \n!D\n"

"!c\n!U"

Dialog: Theme=on

ctl(0): "Slider"//,theme=off

ctl(1): CHECKBOX, "Checkbox"//, color=COLOR_BTNFACE

ctl(2): STATICTEXT, "statictext"

ctl(3): PUSHBUTTON, "Button"//,theme=on

ctl(5): COMBOBOX, "Combobox", val=0

ctl(8): CHECKBOX, "Activate Theme"

OnCtl(n):{

if (n==8 && e==FME_CLICKED){

setDialogTheme(ctl(8));

setCtlTheme(CTL_PROGRESS,ctl(8));

setCtlTheme(CTL_ZOOM,ctl(8));

setCtlTheme(CTL_FRAME,ctl(8));

refreshCtl(CTL_FRAME);//Avoid Redraw problems

setCtlTheme(0,ctl(8));

setCtlTheme(1,ctl(8));

setCtlTheme(2,ctl(8));

setCtlTheme(3,ctl(8));

setCtlTheme(5,ctl(8));

//Info ("%d",getCtlColor(1));

}

return false;

}

</code>

== See Also ==

setCtlTheme