trancexx Posted August 3, 2010 Share Posted August 3, 2010 Of course it crashes. You are passing to many parameters to SystemParametersInfo. I have troubles understanding what actually confuses you. For example I've posted correct and different calls to SystemParametersInfo twice in this thread. Yet you constantly call it wrong. For example, what force drives you to use "*" in return type of the function? Or why are you passing 6 parameters to SystemParametersInfo, when it takes only 4? Lose unnecessary parameters. ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
JohnOne Posted August 3, 2010 Author Share Posted August 3, 2010 I've got no answer proper why I added a *, I dont know. Whats confusing me is the last param $WM_WININICHANGE, http://msdn.microsoft.com/en-us/library/ms725497%28v=VS.85%29.aspx says that, that itself has 2 arguments. wParam When the system sends this message as a result of a SystemParametersInfo call, the wParam parameter is the value of the uiAction parameter passed to the SystemParametersInfo function lParam When the system sends this message as a result of a SystemParametersInfo call, lParam is a pointer to a string that indicates the area containing the system parameter that was changed. I'm just confused about it from the ground up. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
trancexx Posted August 3, 2010 Share Posted August 3, 2010 (edited) I've got no answer proper why I added a *, I dont know.Whats confusing me is the last param $WM_WININICHANGE, http://msdn.microsoft.com/en-us/library/ms725497%28v=VS.85%29.aspx says that, that itself has 2 arguments.wParam When the system sends this message as a result of a SystemParametersInfo call, the wParam parameter is the value of the uiAction parameter passed to the SystemParametersInfo functionlParam When the system sends this message as a result of a SystemParametersInfo call, lParam is a pointer to a string that indicates the area containing the system parameter that was changed.I'm just confused about it from the ground up.System sends as a result of your call to SystemParametersInfo, not you. You just say to system send on don't send depending on fWinIni parameter of the SystemParametersInfo. Edited August 3, 2010 by trancexx ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
trancexx Posted August 3, 2010 Share Posted August 3, 2010 Ok thanks trancexx (sorry for testing your patience) I got it right in the end and the calls go smoothly Unfortunately I think it simply does not work. I can disable font smoothing altogether and enable it, but that does not help, This disables/enables font smoothing. $SPI_SETFONTSMOOTHING = 0x004B $aCall = DllCall("user32.dll", "bool", "SystemParametersInfo", _ "dword", $SPI_SETFONTSMOOTHING, _ "dword",0 , _ ; 1 for enable or 0 for disable "dword",0, _ "dword",0 ) ConsoleWrite(_WinAPI_GetLastErrorMessage()) And this is supposed to change font smoothing types $WM_WININICHANGE = 0x001A $SPI_SETFONTSMOOTHINGTYPE = 0x200B ;$SPI_SETCLEARTYPE = 0x1049 $aCall = DllCall("user32.dll", "bool", "SystemParametersInfo", _ "dword", $SPI_SETFONTSMOOTHINGTYPE, _ "dword", 0, _ "dword*", 1, _ ; 1 for standard or 2 for cleartype (default is supposed to be standard) "dword", $WM_WININICHANGE) ConsoleWrite(_WinAPI_GetLastErrorMessage()) So Im finished with this method now and looking for another. Don't worry about my patience. You are still not calling it right. I mean that part that's not working. Following the documentation precisely is very important with DllCall() and related functions. You still have your own (wrong) interpretation of the parameters. Let me quote MSDN about the last parameter: fWinIni [in] UINT If a system parameter is being set, specifies whether the user profile is to be updated, and if so, whether the WM_SETTINGCHANGE message is to be broadcast to all top-level windows to notify them of the change. This parameter can be zero if you don't want to update the user profile or broadcast the WM_SETTINGCHANGE message, or it can be one or more of the following values. Value Meaning SPIF_UPDATEINIFILE Writes the new system-wide parameter setting to the user profile. SPIF_SENDCHANGE Broadcasts the WM_SETTINGCHANGE message after updating the user profile. SPIF_SENDWININICHANGE Same as SPIF_SENDCHANGE.Tell me, where do you see them suggesting you should pass WM_WININICHANGE as last parameter to SystemParametersInfo function? ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
JohnOne Posted August 3, 2010 Author Share Posted August 3, 2010 Ok thanks trancexx (sorry for testing your patience) I got it right in the end and the calls go smoothly Unfortunately I think it simply does not work. I can disable font smoothing altogether and enable it, but that does not help, This disables/enables font smoothing. $SPI_SETFONTSMOOTHING = 0x004B $aCall = DllCall("user32.dll", "bool", "SystemParametersInfo", _ "dword", $SPI_SETFONTSMOOTHING, _ "dword",0 , _ ; 1 for enable or 0 for disable "dword",0, _ "dword",0 ) ConsoleWrite(_WinAPI_GetLastErrorMessage()) And this is supposed to change font smoothing types $WM_WININICHANGE = 0x001A $SPI_SETFONTSMOOTHINGTYPE = 0x200B ;$SPI_SETCLEARTYPE = 0x1049 $aCall = DllCall("user32.dll", "bool", "SystemParametersInfo", _ "dword", $SPI_SETFONTSMOOTHINGTYPE, _ "dword", 0, _ "dword*", 1, _ ; 1 for standard or 2 for cleartype (default is supposed to be standard) "dword", $WM_WININICHANGE) ConsoleWrite(_WinAPI_GetLastErrorMessage()) So Im finished with this method now and looking for another. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now