Re: Win98 look & feel / removing manifest file effects

new topic     » goto parent     » topic index » view thread      » older message » newer message
mattlewis said...

Take a look at Causing the UxTheme Manager to Ignore Top Level Windows, and in particular, SetThemeAppProperties.

In the interest of debugging, does the issue persist if you translate the code? The translator does not (currently) compile the manifest, so you get a non-themed executable.

I played around a little with this function and the example program from ticket:616. In win32lib, at least, it looks like it's necessary to send the WM_THEMECHANGED message to all of the controls. It doesn't seem to propagate to children automatically. The de-theming definitely works for me (on XP), although it didn't solve the issue brought up in the ticket.

include win32lib.ew  
constant Win1 = create(Window,"Strange",0,Default,Default,400,400,0),  
		TabCtl = create(TabControl,"",Win1,5,5,380,355,0),  
		Tab1 = create(TabItem,"First",TabCtl,0,0,0,0,0),  
		Label1 = create(CText,"Nothing important",Tab1,10,30,360,25,0),  
		Cbox1 = create(Combo,"",Tab1,20,80,250,100,0), 
		StyleButton = create( Button, "Change Style", Tab1, 20, 100, 90, 30, 0 ), 
		$ 
 
include std/dll.e 
include std/machine.e 
constant  
	UXTHEME = open_dll("UxTheme.dll"), 
	xSetThemeAppProperties = define_c_proc( UXTHEME, "SetThemeAppProperties", { C_INT } ) 
 
addItem( Cbox1, "foo") 
integer theme = 3 
constant WM_THEMECHANGED = 0x031A 
procedure StyleButton_onClick(integer self, integer event, sequence parms) 
	theme = 3 - theme 
	c_proc( xSetThemeAppProperties, { theme } ) 
	sendMessage( Win1, WM_THEMECHANGED, 0, 0 ) 
	sendMessage( TabCtl, WM_THEMECHANGED, 0, 0 ) 
	sendMessage( Label1, WM_THEMECHANGED, 0, 0 ) 
	sendMessage( Cbox1, WM_THEMECHANGED, 0, 0 ) 
	sendMessage( StyleButton, WM_THEMECHANGED, 0, 0 ) 
 
end procedure 
setHandler( StyleButton, w32HClick, routine_id("StyleButton_onClick")) 
 
WinMain(Win1,Normal)  

Matt

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu