Search the Community
Showing results for tags '_winapi_systemparametersinfo'.
-
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
-
Hi, I'm trying to retrieve each $SPI_GETWINARRANGING parameter = true or false and then apply the actual return with $SPIF_SENDCHANGE Just trying to understand how _WinAPI_SystemParametersInfo can be used Thanks #include <Array.au3> #include <WinAPI.au3> Local Const $SPI_GETWINARRANGING = 130 Local Const $SPI_SETWINARRANGING = 131 Local Const $SPI_GETDOCKMOVING = 0x0090 Local Const $SPI_GETMOUSEDOCKTHRESHOLD = 0x007E Local Const $SPI_GETMOUSEDRAGOUTTHRESHOLD = 0x0084 Local Const $SPI_GETMOUSESIDEMOVETHRESHOLD = 0x0088 Local Const $SPI_GETPENDOCKTHRESHOLD = 0x0080 Local Const $SPI_GETPENDRAGOUTTHRESHOLD = 0x0086 Local Const $SPI_GETPENSIDEMOVETHRESHOLD = 0x008A Local Const $SPI_GETSNAPSIZING = 0x008E Local $WINARRANG[9][2] $WINARRANG[0][0] = 9 $WINARRANG[1][0] = 0x0090 $WINARRANG[2][0] = 0x007E $WINARRANG[3][0] = 0x0084 $WINARRANG[4][0] = 0x0088 $WINARRANG[5][0] = 0x0080 $WINARRANG[6][0] = 0x0086 $WINARRANG[7][0] = 0x008A $WINARRANG[8][0] = 0x008E ;Determines whether window arrangement is enabled. The pvParam parameter must point to a BOOL variable that receives TRUE if enabled, or FALSE otherwise. For $i = 1 To UBound($WINARRANG) - 1 If _WinAPI_SystemParametersInfo($SPI_GETWINARRANGING, 0, $WINARRANG[$i][0]) Then $WINARRANG[$i][1] = 1 Else $WINARRANG[$i][1] = 0 EndIf Next _ArrayDisplay($WINARRANG) ;~ For $i = 1 To UBound($WINARRANG) - 1 ;~ _WinAPI_SystemParametersInfo($SPI_SETWINARRANGING, $WINARRANG[$i][0], $WINARRANG[$i][1], $SPIF_SENDCHANGE) ;~ Next