Jump to content
Sign in to follow this  
PaulDG

SendMessage

Recommended Posts

PaulDG

I am trying to send this msg via a dll call

::SendMessage(HWND_BROADCAST ,
        WM_SETTINGCHANGE,SPI_SETNONCLIENTMETRICS,NULL);

I've read through the forums and found some similar stuff but nothing seems to work. i have this so far

DLLCall("user32.dll","int","SendMessage","hwnd","HWND_BROADCAST","int", "WM_SETTINGCHANGE", "int", "SPI_SETNONCLIENTMETRICS", "int", "NULL")

Any Ideas?

Many Thanks

Share this post


Link to post
Share on other sites
Raindancer

I am trying to send this msg via a dll call

::SendMessage(HWND_BROADCAST ,
        WM_SETTINGCHANGE,SPI_SETNONCLIENTMETRICS,NULL);

I've read through the forums and found some similar stuff but nothing seems to work. i have this so far

DLLCall("user32.dll","int","SendMessage","hwnd","HWND_BROADCAST","int", "WM_SETTINGCHANGE", "int", "SPI_SETNONCLIENTMETRICS", "int", "NULL")

Any Ideas?

Many Thanks

<{POST_SNAPBACK}>

Did you replace "HWND_BROADCAST", "WM_SETTINGCHANGE", and "SPI_SETNONCLIENTMETRICS" with the correct parameters? Caus I think these are only placeholders...

Say: "Chuchichäschtli"My UDFs:_PrintImage UDF_WinAnimate UDFGruess Raindancer

Share this post


Link to post
Share on other sites
PaulDG

No i did not :">

How do i go about finding them out?

Share this post


Link to post
Share on other sites
Raindancer

I'm not sure how... never did before...

Where did you find this DLLCall, maybe there are lists... usually the parameters are hexadecimal values, or structs (DLLStruct)...


Say: "Chuchichäschtli"My UDFs:_PrintImage UDF_WinAnimate UDFGruess Raindancer

Share this post


Link to post
Share on other sites
PaulDG

I'm not sure how... never did before...

Where did you find this DLLCall, maybe there are lists... usually the parameters are hexadecimal values, or structs (DLLStruct)...

<{POST_SNAPBACK}>

in one of larrys post's, but it wasnt exactly for this system msg

ill do some more googling

thanks

Share this post


Link to post
Share on other sites
LxP

Lifted from various Google results:

Public Const HWND_BROADCAST As Long = &HFFFF& (I believe to be equivalent to 0xffff)

0x1A is WM_SETTINGCHANGE

Public Const SPI_SETNONCLIENTMETRICS As Long = &H2A (probably = 0x2a)

Hope this helps!

Share this post


Link to post
Share on other sites
PaulDG

Lifted from various Google results:

Hope this helps!

<{POST_SNAPBACK}>

Thems the ones :whistle:

$result = DLLCall("user32.dll","int","SendMessage","long","0xffff", "long", "0x1a", "long", "0x2a")

Thanks Both of you very much.

Share this post


Link to post
Share on other sites
LxP

$result = DLLCall("user32.dll","int","SendMessage","long","0xffff", "long", "0x1a", "long", "0x2a")

<{POST_SNAPBACK}>

I'm not entirely confident that that will work for you as expected (given the hex notation). You may wish to try it without the quotes around the numbers:

dllCall("user32.dll", "int", "SendMessage", "long", 0xffff, "long", 0x1a, "long", 0x2a)

Share this post


Link to post
Share on other sites
PaulDG

It works Perfectly, I guess it will work just as good without the quotes :dance:

If you change a value (any valude) in the winmetrics section of the registry like iconsize then run that command then change the value back again and run that command again it will cause a complete icon cache flush, including the disk and memory cache.

What good is that, well if you want to change the icon for your folders (globally) then you can set a new icon in the registry and when you perform the above the cache will be rebuilt with your new icon instead of the drab yellow one. you can replace any icon in shell32.dll this way, without editing your actual file.

Microsoft says this is not posible, but i assure you it is.

2 things,

You can set that registry entry up during windows install at the t13 min stage and you dont need the cache flush then as it isnt built yet.

Don't play with this unless you are prepared to loose all your custom icon positions, as it wipes them out and they all line up neatly against the left hand edge :whistle: plus i think it resets all the folder view settings but i am not sure.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.