Search the Community
Showing results for tags 'spi_geticonmetrics'.
-
In an effort to try to help another member here in the forum, i gained interest in this matter and head in for the dll calls and the api's, This user wants to set the icon size, same as, say, in desktop pressing right mouse button -> view -> and selecting the size, Small Medium or Large Icons. I thought i start with retrieving the current size first. In order to do that the api is: SPI_GETICONMETRICS So my search lead me to IconMetrics, a structure part of SystemParametersInfo. https://msdn.microsoft.com/en-us/library/windows/desktop/ms724947(v=vs.85).aspx https://msdn.microsoft.com/en-us/library/windows/desktop/ms648054(v=vs.85).aspx Now, this is what i tried that led to the best results.. 4 zeroes. Got an issue that i can think may be stopping this from working, im not including "LOGFONT lfFont" in the DllStructCreate. (do i need to include all and every parameter?) And the reason i didn't include it is because i don't know the type, it gives out an error, so it seems after more searching, sorry "im noob" that this is yet another scructure, that includes the sizes of the font and everything about the font. Can anyone point me in the right direction? #include <WinAPI.au3> #include <WinAPIsysinfoConstants.au3> ;LOGFONT lfFont Local Const $tagLOGFONT = DllStructCreate('long lfHeight;long lfWidth;long lfEscapement;long lfOrientation;long lfWeight;byte lfItalic;byte lfUnderline;byte lfStrikeOut;byte lfCharSet;byte lfOutPrecision;byte lfClipPrecision;byte lfQuality;byte lfPitchAndFamily;char lfFaceName;');Recreated but dont know what to do with it. Local Const $ICONMETRICS = DllStructCreate('uint cbSize;int iHorzSpacing;int iVertSpacing;int iTitleWrap') If @error Then MsgBox(64, 'error', @error) EndIf Local $Params = _WinAPI_SystemParametersInfo($SPI_GETICONMETRICS, 'BOOLEAN', $ICONMETRICS) If not @error Then ConsoleWrite(DllStructGetData($ICONMETRICS, 'cbSize')&DllStructGetData($ICONMETRICS, 'iHorzSpacing')&DllStructGetData($ICONMETRICS, 'iVertSpacing')&DllStructGetData($ICONMETRICS, 'iTitleWrap')&@CRLF) Else MsgBox(64, 'error', @error) EndIf