Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Updating desktop icons (VC++)

I want to change the font of the icons on the desktop. I use this function that wraps SystemParametersInfo:

inline BOOL SPI_SetIconMetrics( ICONMETRICS pIconM, UINT Update )


pIconM.cbSize = sizeof( ICONMETRICS );

return( ::SystemParametersInfo(


sizeof( ICONMETRICS ),


Update ) );


I use a valid ICONMETRICS structure and SPIF_SENDCHANGE (documented in MSDN) as Update parameter. Nothing happens on the desktop, but:

1) The font changes in other windows, for example in the icons displayed in My Computer;

2) In Desktop Properties, in the page where you change system colors, the new font for icons is reported correctly. But icons change only if I click on Apply.

How can I update my icons? Note: Accessing desktop as a CWnd and using UpdateWindow, Redraw ecc. does not work.

Any help will be appreciate.


Sign In or Register to comment.