SystemParametersInfo

SystemParametersInfo is a powerful function which does and retrieves whole lot of things related to windows general behavior for eg: turning on and off certain features like mouse trails which we normally do via control panel->main.cpl Look up MSDN for more information on SystemParametersInfo. I’ll just show a demo on how to turn on and […]
Continue reading…

 

Applying registry changes without restarting explorer!

You make some changes to windows registry but can’t see the effect on explorer? Well you’ve got to do some more housekeeping to get going, broadcast a setting changed message to all windows to let them know and to get explorer refreshed… [sourcecode language=’cpp’]DWORD dwResult = 0; SendMessageTimeout( HWND_BROADCAST, WM_SETTINGCHANGE, 0, 0, SMTO_ABORTIFHUNG, 100, &dwResult […]
Continue reading…

 

Retrieve work area rectangle using SystemParametersInfo!

Work area is that area of the screen excluding windows task bars and other custom application bars. Simplest way to retrieve this area is to call SystemParametersInfo. Here is an e.g. [sourcecode language=’cpp’]RECT rcWorkArea = { 0 }; SystemParametersInfo( SPI_GETWORKAREA, 0, &rcWorkArea, 0 ); AfxTrace( _T( “Work area: %d, %d, %d, %d” ), rcWorkArea.left, rcWorkArea.top, […]
Continue reading…