Jump to content

SendMessage


PaulDG
 Share

Recommended Posts

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

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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

Link to comment
Share on other sites

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!
Link to comment
Share on other sites

$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)
Link to comment
Share on other sites

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.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...