andr_mozg
29-06-2011, 17:53
есть код
#include <array.au3>
#include <Encoding.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <GDIPlus.au3>
_GDIPlus_Startup()
$hImage2 = _GDIPlus_ImageLoadFromFile(@TempDir & "\1temp.jpg")
$iOldWidth = _GDIPlus_ImageGetWidth($hImage2)
$iOldHeight = _GDIPlus_ImageGetHeight($hImage2)
_GDIPlus_Shutdown()
$Form1 = GUICreate("Form1", 520, 660, -1, -1)
$Pic1 = GUICtrlCreatePic(@TempDir & "\1temp.jpg", 10, 10, 500, 366)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd
я получаю значения, но вот потом они не отрисовываются, если убрать все с _GDIPlus_Startup() до _GDIPlus_Shutdown() то все отрисовывает..
как зделать так чтоб и показывало разрешение а потом еще и отрисовывало???
спасибо
#include <array.au3>
#include <Encoding.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <GDIPlus.au3>
_GDIPlus_Startup()
$hImage2 = _GDIPlus_ImageLoadFromFile(@TempDir & "\1temp.jpg")
$iOldWidth = _GDIPlus_ImageGetWidth($hImage2)
$iOldHeight = _GDIPlus_ImageGetHeight($hImage2)
_GDIPlus_Shutdown()
$Form1 = GUICreate("Form1", 520, 660, -1, -1)
$Pic1 = GUICtrlCreatePic(@TempDir & "\1temp.jpg", 10, 10, 500, 366)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd
я получаю значения, но вот потом они не отрисовываются, если убрать все с _GDIPlus_Startup() до _GDIPlus_Shutdown() то все отрисовывает..
как зделать так чтоб и показывало разрешение а потом еще и отрисовывало???
спасибо