AdmiralAlkex Posted September 2, 2008 Share Posted September 2, 2008 Lets say I create a gui like this: GUICreate("TEST", 320, 240, -1, -1, BitOR($WS_SIZEBOX, $WS_POPUP)) GUISetBkColor(0x000000) You will get a black gui with a whitish/greyish border (atleast on WinXP) around the gui for the "sizebox" and that doesn't look very good, is it possible to change the borders color to black somehow?? .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
martin Posted September 2, 2008 Share Posted September 2, 2008 (edited) Lets say I create a gui like this: GUICreate("TEST", 320, 240, -1, -1, BitOR($WS_SIZEBOX, $WS_POPUP)) GUISetBkColor(0x000000) You will get a black gui with a whitish/greyish border (atleast on WinXP) around the gui for the "sizebox" and that doesn't look very good, is it possible to change the borders color to black somehow??MrCreatoR wrote a udf, (I think it's in example scripts,) for resizing controls and I have copied his idea and changed it to use it for resizing a popup window which doesn't have the sizing borders. My udf needs modifying a bit because it has some code which is only useful for my script and I haven't got time to look at it now. If no-one provides a solution to your problem you are welcome to have my version but it won't be until tomorrow. Edited September 2, 2008 by martin Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
rasim Posted September 2, 2008 Share Posted September 2, 2008 AdmiralAlkexHi! Try this:expandcollapse popup#include <GuiConstantsEx.au3> #include <WindowsConstants.au3> #include <WinAPI.au3> Global Const $PS_SOLID = 0 $hGUI = GUICreate("TEST", 320, 240, -1, -1, BitOR($WS_POPUP, $WS_SIZEBOX)) GUISetBkColor(0x000000) GUIRegisterMsg($WM_NCPAINT, "WM_NCPAINT") GUISetState() Do Until GUIGetMsg() = -3 Func WM_NCPAINT($hWnd, $Msg, $wParam, $lParam) Local $hDC, $hPen, $OldPen, $OldBrush, $aHwndPos $hDC = _WinAPI_GetWindowDC($hWnd) $hPen = DllCall("gdi32.dll", "hwnd", "CreatePen", "int", $PS_SOLID, "int", 5, "int", 0x0000FF) $hPen = $hPen[0] $OldPen = _WinAPI_SelectObject($hDC, $hPen) $OldBrush = _WinAPI_SelectObject($hDC, _WinAPI_GetStockObject($NULL_BRUSH)) $aHwndPos = WinGetPos($hWnd) DllCall("gdi32.dll", "int", "Rectangle", "hwnd", $hDC, "int", 1, "int", 1, "int", $aHwndPos[2], "int", $aHwndPos[3]) _WinAPI_SelectObject($hDC, $OldBrush) _WinAPI_SelectObject($hDC, $OldPen) _WinAPI_DeleteObject($hPen) _WinAPI_ReleaseDC($hWnd, $hDC) Return True EndFunc pixelsearch 1 Link to comment Share on other sites More sharing options...
Zedna Posted September 2, 2008 Share Posted September 2, 2008 @rasim: very nice example! Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
rasim Posted September 2, 2008 Share Posted September 2, 2008 ZednaThanks for feedback! Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted September 2, 2008 Author Share Posted September 2, 2008 @martin Feel free to post yours if you want, but rasim's example for me so it is not necessary. @rasim That works perfect with my script, thank you! .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface 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