guinness Posted May 7, 2011 Share Posted May 7, 2011 It works as intented, capture the Desktop and Send to a GUICtrlCreatePic Control, but the ScreenCapture is only resized when the GUI is "repainted" e.g. Minimise and then Restore the GUI. I think it's one of those days where logical reason has gone out the Window & I scoured Help File for the GDIPlus Functions but to no avail. If anyone knows what Function I need e.g. _GDIPlus_GraphicsDrawImageRect() (which I tried but it didn't work! & tried _WinAPI_RedrawWindow() too) then Help would be much appreciated. Thanks. expandcollapse popup#include <Array.au3> #include <ScreenCapture.au3> _GDIPlus_Startup() _Main() Func _Main() Local $aArray, $hGUI $hGUI = GUICreate("_ScreenCapture_CaptureControl()", 400, 400) _ScreenCapture_CaptureControl(5, 5, 390, 390, @DesktopWidth, @DesktopHeight) GUISetState(@SW_SHOW) Do Until GUIGetMsg() = -3 _GDIPlus_Shutdown() EndFunc ;==>_Main Func _ScreenCapture_CaptureControl($iXPos, $iYPos, $iWidth, $iHeight, $icWidth, $icHeight) Local Const $STM_SETIMAGE = 0x0172, $IMAGE_BITMAP = 0 Local $aSize, $hBitmap, $iImage, $hImage, $hBMP $aSize = _ImageRelativeSize($iWidth, $iHeight, $icWidth, $icHeight) _ArrayDisplay($aSize) $iImage = GUICtrlCreatePic("", $iXPos, $iYPos, $aSize[0], $aSize[1]) GUICtrlSetBkColor(-1, 0x000000) $hBitmap = _ScreenCapture_Capture("", 0, 0, $icWidth, $icHeight, 0) $hImage = _GDIPlus_BitmapCreateFromHBITMAP($hBitmap) $hBMP = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hImage) GUICtrlSendMsg($iImage, $STM_SETIMAGE, $IMAGE_BITMAP, $hBMP) _WinAPI_DeleteObject($hBMP) _WinAPI_DeleteObject($hImage) _WinAPI_DeleteObject($hBitmap) Return SetError(0, 0, 1) EndFunc ;==>_ScreenCapture_CaptureControl Func _ImageRelativeSize($iControlWidth, $iControlHeight, $iImageWidth, $iImageHeight) If $iImageWidth < 0 Or $iImageHeight < 0 Then Return SetError(1, 0, 0) EndIf Local $iReturn[2] = [$iControlWidth, $iControlHeight] If $iImageWidth < $iImageHeight Then $iReturn[0] = Int($iControlWidth * $iImageWidth / $iImageHeight) $iReturn[1] = Int($iControlHeight) Else $iReturn[1] = Int($iControlHeight * $iImageHeight / $iImageWidth) $iReturn[0] = Int($iControlWidth) EndIf Return $iReturn EndFunc ;==>_ImageRelativeSize UDF List: _AdapterConnections() • _AlwaysRun() • _AppMon() • _AppMonEx() • _ArrayFilter/_ArrayReduce • _BinaryBin() • _CheckMsgBox() • _CmdLineRaw() • _ContextMenu() • _ConvertLHWebColor()/_ConvertSHWebColor() • _DesktopDimensions() • _DisplayPassword() • _DotNet_Load()/_DotNet_Unload() • _Fibonacci() • _FileCompare() • _FileCompareContents() • _FileNameByHandle() • _FilePrefix/SRE() • _FindInFile() • _GetBackgroundColor()/_SetBackgroundColor() • _GetConrolID() • _GetCtrlClass() • _GetDirectoryFormat() • _GetDriveMediaType() • _GetFilename()/_GetFilenameExt() • _GetHardwareID() • _GetIP() • _GetIP_Country() • _GetOSLanguage() • _GetSavedSource() • _GetStringSize() • _GetSystemPaths() • _GetURLImage() • _GIFImage() • _GoogleWeather() • _GUICtrlCreateGroup() • _GUICtrlListBox_CreateArray() • _GUICtrlListView_CreateArray() • _GUICtrlListView_SaveCSV() • _GUICtrlListView_SaveHTML() • _GUICtrlListView_SaveTxt() • _GUICtrlListView_SaveXML() • _GUICtrlMenu_Recent() • _GUICtrlMenu_SetItemImage() • _GUICtrlTreeView_CreateArray() • _GUIDisable() • _GUIImageList_SetIconFromHandle() • _GUIRegisterMsg() • _GUISetIcon() • _Icon_Clear()/_Icon_Set() • _IdleTime() • _InetGet() • _InetGetGUI() • _InetGetProgress() • _IPDetails() • _IsFileOlder() • _IsGUID() • _IsHex() • _IsPalindrome() • _IsRegKey() • _IsStringRegExp() • _IsSystemDrive() • _IsUPX() • _IsValidType() • _IsWebColor() • _Language() • _Log() • _MicrosoftInternetConnectivity() • _MSDNDataType() • _PathFull/GetRelative/Split() • _PathSplitEx() • _PrintFromArray() • _ProgressSetMarquee() • _ReDim() • _RockPaperScissors()/_RockPaperScissorsLizardSpock() • _ScrollingCredits • _SelfDelete() • _SelfRename() • _SelfUpdate() • _SendTo() • _ShellAll() • _ShellFile() • _ShellFolder() • _SingletonHWID() • _SingletonPID() • _Startup() • _StringCompact() • _StringIsValid() • _StringRegExpMetaCharacters() • _StringReplaceWholeWord() • _StringStripChars() • _Temperature() • _TrialPeriod() • _UKToUSDate()/_USToUKDate() • _WinAPI_Create_CTL_CODE() • _WinAPI_CreateGUID() • _WMIDateStringToDate()/_DateToWMIDateString() • Au3 script parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018 Link to comment Share on other sites More sharing options...
UEZ Posted May 7, 2011 Share Posted May 7, 2011 (edited) Try this guiness: expandcollapse popup#include <Array.au3> #include <ScreenCapture.au3> _GDIPlus_Startup() _Main() Func _Main() Local $aArray, $hGUI $hGUI = GUICreate("_ScreenCapture_CaptureControl()", 400, 400) _ScreenCapture_CaptureControl(5, 5, 390, 390, @DesktopWidth, @DesktopHeight) GUISetState(@SW_SHOW) Do Until GUIGetMsg() = -3 _GDIPlus_Shutdown() EndFunc ;==>_Main Func _ScreenCapture_CaptureControl($iXPos, $iYPos, $iWidth, $iHeight, $icWidth, $icHeight) Local Const $STM_SETIMAGE = 0x0172, $IMAGE_BITMAP = 0 Local $aSize, $hBitmap, $iImage, $hImage, $hBMP ;~ $aSize = _ImageRelativeSize($iWidth, $iHeight, $icWidth, $icHeight) ;~ _ArrayDisplay($aSize) $iImage = GUICtrlCreatePic("", 0, 0, $iWidth, $iHeight) ;~ GUICtrlSetBkColor(-1, 0x000000) $hBitmap = _ScreenCapture_Capture("", 0, 0, $iWidth, $iHeight, 0) ;~ $hImage = _GDIPlus_BitmapCreateFromHBITMAP($hBitmap) ;~ $hBMP = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hImage) GUICtrlSendMsg($iImage, $STM_SETIMAGE, $IMAGE_BITMAP, $hBitmap) ;~ _WinAPI_DeleteObject($hBMP) ;~ _WinAPI_DeleteObject($hImage) _WinAPI_DeleteObject($hBitmap) Return SetError(0, 0, 1) EndFunc ;==>_ScreenCapture_CaptureControl Func _ImageRelativeSize($iControlWidth, $iControlHeight, $iImageWidth, $iImageHeight) If $iImageWidth < 0 Or $iImageHeight < 0 Then Return SetError(1, 0, 0) EndIf Local $iReturn[2] = [$iControlWidth, $iControlHeight] If $iImageWidth < $iImageHeight Then $iReturn[0] = Int($iControlWidth * $iImageWidth / $iImageHeight) $iReturn[1] = Int($iControlHeight) Else $iReturn[1] = Int($iControlHeight * $iImageHeight / $iImageWidth) $iReturn[0] = Int($iControlWidth) EndIf Return $iReturn EndFunc ;==>_ImageRelativeSize Br, UEZ Edited May 7, 2011 by UEZ Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ Link to comment Share on other sites More sharing options...
guinness Posted May 7, 2011 Author Share Posted May 7, 2011 Thanks UEZ for replying, but unfortunately my intentions are to create a small thumbnail like image of the entire desktop You can see with the first post this is achieved but only when the GUI is redrawn. Cheers for answering! UDF List: _AdapterConnections() • _AlwaysRun() • _AppMon() • _AppMonEx() • _ArrayFilter/_ArrayReduce • _BinaryBin() • _CheckMsgBox() • _CmdLineRaw() • _ContextMenu() • _ConvertLHWebColor()/_ConvertSHWebColor() • _DesktopDimensions() • _DisplayPassword() • _DotNet_Load()/_DotNet_Unload() • _Fibonacci() • _FileCompare() • _FileCompareContents() • _FileNameByHandle() • _FilePrefix/SRE() • _FindInFile() • _GetBackgroundColor()/_SetBackgroundColor() • _GetConrolID() • _GetCtrlClass() • _GetDirectoryFormat() • _GetDriveMediaType() • _GetFilename()/_GetFilenameExt() • _GetHardwareID() • _GetIP() • _GetIP_Country() • _GetOSLanguage() • _GetSavedSource() • _GetStringSize() • _GetSystemPaths() • _GetURLImage() • _GIFImage() • _GoogleWeather() • _GUICtrlCreateGroup() • _GUICtrlListBox_CreateArray() • _GUICtrlListView_CreateArray() • _GUICtrlListView_SaveCSV() • _GUICtrlListView_SaveHTML() • _GUICtrlListView_SaveTxt() • _GUICtrlListView_SaveXML() • _GUICtrlMenu_Recent() • _GUICtrlMenu_SetItemImage() • _GUICtrlTreeView_CreateArray() • _GUIDisable() • _GUIImageList_SetIconFromHandle() • _GUIRegisterMsg() • _GUISetIcon() • _Icon_Clear()/_Icon_Set() • _IdleTime() • _InetGet() • _InetGetGUI() • _InetGetProgress() • _IPDetails() • _IsFileOlder() • _IsGUID() • _IsHex() • _IsPalindrome() • _IsRegKey() • _IsStringRegExp() • _IsSystemDrive() • _IsUPX() • _IsValidType() • _IsWebColor() • _Language() • _Log() • _MicrosoftInternetConnectivity() • _MSDNDataType() • _PathFull/GetRelative/Split() • _PathSplitEx() • _PrintFromArray() • _ProgressSetMarquee() • _ReDim() • _RockPaperScissors()/_RockPaperScissorsLizardSpock() • _ScrollingCredits • _SelfDelete() • _SelfRename() • _SelfUpdate() • _SendTo() • _ShellAll() • _ShellFile() • _ShellFolder() • _SingletonHWID() • _SingletonPID() • _Startup() • _StringCompact() • _StringIsValid() • _StringRegExpMetaCharacters() • _StringReplaceWholeWord() • _StringStripChars() • _Temperature() • _TrialPeriod() • _UKToUSDate()/_USToUKDate() • _WinAPI_Create_CTL_CODE() • _WinAPI_CreateGUID() • _WMIDateStringToDate()/_DateToWMIDateString() • Au3 script parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018 Link to comment Share on other sites More sharing options...
UEZ Posted May 7, 2011 Share Posted May 7, 2011 (edited) Ah, I have misunderstood you. Sorry! What about this?: expandcollapse popup#include <Array.au3> #include <ScreenCapture.au3> _GDIPlus_Startup() _Main() Func _Main() Local $aArray, $hGUI $hGUI = GUICreate("_ScreenCapture_CaptureControl()", 400, 400) _ScreenCapture_CaptureControl(5, 5, 390, 390, @DesktopWidth, @DesktopHeight) GUISetState(@SW_SHOW) Do Until GUIGetMsg() = -3 _GDIPlus_Shutdown() EndFunc ;==>_Main Func _ScreenCapture_CaptureControl($iXPos, $iYPos, $iWidth, $iHeight, $icWidth, $icHeight) Local Const $STM_SETIMAGE = 0x0172, $IMAGE_BITMAP = 0 Local $aSize, $hBitmap, $iImage, $hImage, $hBMP, $aResult, $hContext $aSize = _ImageRelativeSize($iWidth, $iHeight, $icWidth, $icHeight) ;~ _ArrayDisplay($aSize) $iImage = GUICtrlCreatePic("", $iXPos, $iYPos, $aSize[0], $aSize[1]) GUICtrlSetBkColor(-1, 0x000000) $hBitmap = _ScreenCapture_Capture("", 0, 0, $icWidth, $icHeight, 0) $hImage = _GDIPlus_BitmapCreateFromHBITMAP($hBitmap) $aResult = DllCall($ghGDIPDll, "uint", "GdipCreateBitmapFromScan0", "int", $aSize[0], "int", $aSize[1], "int", 0, "int", 0x0026200A, "ptr", 0, "int*", 0) $hBMP = $aResult[6] $hContext = _GDIPlus_ImageGetGraphicsContext($hBMP) DllCall($ghGDIPDll, "uint", "GdipSetInterpolationMode", "handle", $hContext, "int", 7) _GDIPlus_GraphicsDrawImageRect($hContext, $hImage, 0, 0, $aSize[0], $aSize[1]) $hThumbnail = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hBMP) GUICtrlSendMsg($iImage, $STM_SETIMAGE, $IMAGE_BITMAP, $hThumbnail) _WinAPI_DeleteObject($hBitmap) _WinAPI_DeleteObject($hImage) _GDIPlus_BitmapDispose($hBMP) _GDIPlus_GraphicsDispose($hContext) _WinAPI_DeleteObject($hThumbnail) Return SetError(0, 0, 1) EndFunc ;==>_ScreenCapture_CaptureControl Func _ImageRelativeSize($iControlWidth, $iControlHeight, $iImageWidth, $iImageHeight) If $iImageWidth < 0 Or $iImageHeight < 0 Then Return SetError(1, 0, 0) EndIf Local $iReturn[2] = [$iControlWidth, $iControlHeight] If $iImageWidth < $iImageHeight Then $iReturn[0] = Int($iControlWidth * $iImageWidth / $iImageHeight) $iReturn[1] = Int($iControlHeight) Else $iReturn[1] = Int($iControlHeight * $iImageHeight / $iImageWidth) $iReturn[0] = Int($iControlWidth) EndIf Return $iReturn EndFunc ;==>_ImageRelativeSize Br, UEZ Edited May 7, 2011 by UEZ Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ Link to comment Share on other sites More sharing options...
Yashied Posted May 7, 2011 Share Posted May 7, 2011 By using GDI. expandcollapse popup#Include <Constants.au3> #Include <WinAPIEx.au3> Global Const $STM_SETIMAGE = 0x0172 Global Const $STM_GETIMAGE = 0x0173 GUICreate('MyGUI', 500, 320) $Pic = GUICtrlCreatePic('', 10, 10, 480, 300) GUISetState() $hBitmap = _GetScreenshot(0, 0, -1, -1, 480, 300) _WinAPI_DeleteObject(GUICtrlSendMsg($Pic, $STM_SETIMAGE, $IMAGE_BITMAP, $hBitmap)) $hObj = GUICtrlSendMsg($Pic, $STM_GETIMAGE, $IMAGE_BITMAP, 0) If $hObj <> $hBitmap Then _WinAPI_DeleteObject($hBitmap) EndIf Do Until GUIGetMsg() = -3 Func _GetScreenshot($iX = 0, $iY = 0, $iSrcWidth = -1, $iSrcHeight = -1, $iDstWidth = -1, $iDstHeight = -1) Local $X, $Y, $W, $H, $K1, $K2, $hSrcDC, $hDstDC, $hDstSv, $hDesktop, $hBitmap, $hScreen If $iSrcWidth = -1 Then $iSrcWidth = @DesktopWidth EndIf If $iSrcHeight = -1 Then $iSrcHeight = @DesktopHeight EndIf If $iDstWidth = -1 Then $iDstWidth = $iSrcWidth EndIf If $iDstHeight = -1 Then $iDstHeight = $iSrcHeight EndIf $K1 = $iDstWidth / $iSrcWidth $K2 = $iDstHeight / $iSrcHeight If $K1 > $K2 Then $K1 = $K2 EndIf $W = $iSrcWidth * $K1 $H = $iSrcHeight * $K1 $X = ($iDstWidth - $W) / 2 $Y = ($iDstHeight - $H) / 2 $hDesktop = _WinAPI_GetDesktopWindow() $hSrcDC = _WinAPI_GetDC($hDesktop) $hBitmap = _WinAPI_CreateCompatibleBitmap($hSrcDC, $iDstWidth, $iDstHeight) $hDstDC = _WinAPI_CreateCompatibleDC($hSrcDC) $hDstSv = _WinAPI_SelectObject($hDstDC, $hBitmap) _WinAPI_SetStretchBltMode($hDstDC, $HALFTONE) _WinAPI_StretchBlt($hDstDC, $X, $Y, $W, $H, $hSrcDC, $iX, $iY, $iSrcWidth, $iSrcHeight, $SRCCOPY) _WinAPI_SelectObject($hDstDC, $hDstSv) _WinAPI_ReleaseDC($hDesktop, $hSrcDC) _WinAPI_DeleteDC($hDstDC) Return $hBitmap EndFunc ;==>_GetScreenshot My UDFs: iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More... Link to comment Share on other sites More sharing options...
guinness Posted May 8, 2011 Author Share Posted May 8, 2011 UEZ >> Thanks for that great example I knew it would involve GdipCreateBitmapFromScan0 and _GDIPlus_GraphicsDrawImageRec() so I wasn't far off Yashied >> Again brilliant custom function using WinAPIEx.au3 I used _WinAPI_SetStretchBltMode($hDstDC, $COLORONCOLOR) instead I hope this was OK? To both of you once again Dankeschön & Спасибо! UDF List: _AdapterConnections() • _AlwaysRun() • _AppMon() • _AppMonEx() • _ArrayFilter/_ArrayReduce • _BinaryBin() • _CheckMsgBox() • _CmdLineRaw() • _ContextMenu() • _ConvertLHWebColor()/_ConvertSHWebColor() • _DesktopDimensions() • _DisplayPassword() • _DotNet_Load()/_DotNet_Unload() • _Fibonacci() • _FileCompare() • _FileCompareContents() • _FileNameByHandle() • _FilePrefix/SRE() • _FindInFile() • _GetBackgroundColor()/_SetBackgroundColor() • _GetConrolID() • _GetCtrlClass() • _GetDirectoryFormat() • _GetDriveMediaType() • _GetFilename()/_GetFilenameExt() • _GetHardwareID() • _GetIP() • _GetIP_Country() • _GetOSLanguage() • _GetSavedSource() • _GetStringSize() • _GetSystemPaths() • _GetURLImage() • _GIFImage() • _GoogleWeather() • _GUICtrlCreateGroup() • _GUICtrlListBox_CreateArray() • _GUICtrlListView_CreateArray() • _GUICtrlListView_SaveCSV() • _GUICtrlListView_SaveHTML() • _GUICtrlListView_SaveTxt() • _GUICtrlListView_SaveXML() • _GUICtrlMenu_Recent() • _GUICtrlMenu_SetItemImage() • _GUICtrlTreeView_CreateArray() • _GUIDisable() • _GUIImageList_SetIconFromHandle() • _GUIRegisterMsg() • _GUISetIcon() • _Icon_Clear()/_Icon_Set() • _IdleTime() • _InetGet() • _InetGetGUI() • _InetGetProgress() • _IPDetails() • _IsFileOlder() • _IsGUID() • _IsHex() • _IsPalindrome() • _IsRegKey() • _IsStringRegExp() • _IsSystemDrive() • _IsUPX() • _IsValidType() • _IsWebColor() • _Language() • _Log() • _MicrosoftInternetConnectivity() • _MSDNDataType() • _PathFull/GetRelative/Split() • _PathSplitEx() • _PrintFromArray() • _ProgressSetMarquee() • _ReDim() • _RockPaperScissors()/_RockPaperScissorsLizardSpock() • _ScrollingCredits • _SelfDelete() • _SelfRename() • _SelfUpdate() • _SendTo() • _ShellAll() • _ShellFile() • _ShellFolder() • _SingletonHWID() • _SingletonPID() • _Startup() • _StringCompact() • _StringIsValid() • _StringRegExpMetaCharacters() • _StringReplaceWholeWord() • _StringStripChars() • _Temperature() • _TrialPeriod() • _UKToUSDate()/_USToUKDate() • _WinAPI_Create_CTL_CODE() • _WinAPI_CreateGUID() • _WMIDateStringToDate()/_DateToWMIDateString() • Au3 script parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018 Link to comment Share on other sites More sharing options...
FMS Posted May 9, 2011 Share Posted May 9, 2011 Nice posts UEZ,Guinness and Yashied @ Yashied : I got a error whit $SRCCOPY ad line 52 :S C:\~\test3.au3(52,101) : WARNING: $SRCCOPY: possibly used before declaration. _WinAPI_StretchBlt($hDstDC, $X, $Y, $W, $H, $hSrcDC, $iX, $iY, $iSrcWidth, $iSrcHeight, $SRCCOPY) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\~\test3.au3(52,101) : ERROR: $SRCCOPY: undeclared global variable. _WinAPI_StretchBlt($hDstDC, $X, $Y, $W, $H, $hSrcDC, $iX, $iY, $iSrcWidth, $iSrcHeight, $SRCCOPY) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\~\test3.au3 - 1 error(s), 1 warning(s) Does anyone know how to resolve this? for learning reasons i want to look what the difrences are between the approach of UEZ and Yashied as finishing touch god created the dutch Link to comment Share on other sites More sharing options...
Yashied Posted May 9, 2011 Share Posted May 9, 2011 Does anyone know how to resolve this?Download the latest version My UDFs: iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More... Link to comment Share on other sites More sharing options...
FMS Posted May 9, 2011 Share Posted May 9, 2011 (edited) Indeed that did the trick.... I readed your post and all i could think = DOH! thnx Edited May 9, 2011 by FMS as finishing touch god created the dutch 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