SPI_SETNONCLIENTMETRICS behaves incorrectly with Windows XP Theme causing inccorect icon sizes

  • Thread starter Thread starter Anthony Wieser
  • Start date Start date
A

Anthony Wieser

If you run the following code sequence, when using the Windows XP theme:

NONCLIENTMETRICS ncm, *pNCM;
ncm.cbSize = sizeof(ncm);

::SystemParametersInfo(SPI_GETNONCLIENTMETRICS, sizeof(ncm), &ncm, 0);
::SystemParametersInfo(SPI_SETNONCLIENTMETRICS, ncm.cbSize, &ncm,
SPIF_SENDCHANGE);

the icons in the system tray are grow by about 50% in size. The same does
not happen if you run it with windows classic style?

If I kill explorer.exe to restart the taskbar, and then restart it with the
run command it remains in the enlarged size, but if I log off the current
user and log back on again, the taskbar and icons revert to their normal
size. Additionally, if you start regedit after this, it will also have very
large icons shown.

Is there a known fix or workaround for this problem?

Anthony Wieser
Wieser Software Ltd
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top