aldakrys Posted March 3, 2014 Share Posted March 3, 2014 (edited) Hello, I'm having trouble with "Test1"."Test2" works but I would like for "Test1" to work.Clearly I'm doing something wrong so some help would be much appreciated. Thank you in advance.Test1.au3Test2.au3 Edited March 8, 2014 by Melba23 Amended title Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted March 3, 2014 Moderators Share Posted March 3, 2014 Instead of saying "its broke" and expecting us to read through 1000 lines of code, can you please be just a bit more descriptive of what is not working for you, as well as what error checking you have tried? "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
aldakrys Posted March 3, 2014 Author Share Posted March 3, 2014 Instead of saying "its broke" and expecting us to read through 1000 lines of code, can you please be just a bit more descriptive of what is not working for you, as well as what error checking you have tried? Ok, In "Test1" after the GUI is generated when you move the scrollbars the image disappears. I would like to be able to scroll like in "Test2". This works. Func Pr() $AdGUI = GUICreate("Zone Map", $DimL, $DimH, -1, -1, _ BitOR($WS_CAPTION, $WS_SYSMENU, $WS_MAXIMIZEBOX), $WS_EX_COMPOSITED) GUISetState(@SW_SHOW) _GUIScrollbars_Generate($AdGUI, $L, $H, 0, 0, False) $Imagine = GUICtrlCreatePic($PIC, 0, 0, $L, $H) While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Exit EndSelect WEnd EndFunc This doesn't. Func Pr() $AdGUI = GUICreate("Zone Map", $DimL, $DimH, -1, -1, BitOR($WS_CAPTION, $WS_SYSMENU)) GUISetState(@SW_SHOW) _GUIScrollbars_Generate($AdGUI, $L, $H, 0, 0, False) _GDIPlus_Startup() $hImage = _GDIPlus_ImageLoadFromFile($PIC) $hBitmap = DllCall($ghGDIPDll, "uint", "GdipCreateBitmapFromScan0", "int", $L, "int", $H, "int", 0, "int", 0x0026200A, "ptr", 0, "int*", 0) $hBitmap = $hBitmap[6] $hBmpCtxt = _GDIPlus_ImageGetGraphicsContext($hBitmap) $aResult = DllCall($ghGDIPDll, "int", "GdipSetInterpolationMode", "handle", $hBmpCtxt, "int", $iInterpolationMode) _GDIPlus_GraphicsDrawImageRect($hBmpCtxt, $hImage, 0, 0, $L, $H) $hGraphic = _GDIPlus_GraphicsCreateFromHWND($AdGUI) _GDIPlus_GraphicsDrawImage($hGraphic, $hBitmap, 0, 0) _GDIPlus_Shutdown() _GDIPlus_BitmapDispose($hBitmap) _GDIPlus_GraphicsDispose($hBmpCtxt) _GDIPlus_ImageDispose($PIC) While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Exit EndSelect WEnd EndFunc Thank you. 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