MerkurAlex Posted September 25, 2008 Share Posted September 25, 2008 I assume it is possible to save a string as a bmp but i cannot figure it out i was thinking something with gdiplus but i cannot even get the stringdraw example to work it worked ONE time then i tried again and the same code will no longer draw a string can anyone help. [quote name='PsaltyDS' post='635433' date='Jan 27 2009, 07:04 AM']Larry is a mass murderer?! It's always the quiet, clean cut, bald guys... [/quote] Link to comment Share on other sites More sharing options...
Szhlopp Posted September 25, 2008 Share Posted September 25, 2008 I assume it is possible to save a string as a bmp but i cannot figure it out i was thinking something with gdiplus but i cannot even get the stringdraw example to work it worked ONE time then i tried again and the same code will no longer draw a string can anyone help.Do some forum searching on how to create and save a bitmap with GDI. Here is my 'Help file' on the DrawString. Does it not work for you? #include <GuiConstantsEx.au3> #include <GDIPlus.au3> Opt('MustDeclareVars', 1) _Main() Func _Main() Local $hGUI, $hWnd, $hGraphic ; Create GUI $hGUI = GUICreate("GDI+", 400, 300) $hWnd = WinGetHandle("GDI+") GUISetState() ; Draw a string _GDIPlus_Startup () $hGraphic = _GDIPlus_GraphicsCreateFromHWND ($hWnd) _GDIPlus_GraphicsDrawString ($hGraphic, "Hello world", 140, 110) ; Loop until user exits Do Until GUIGetMsg() = $GUI_EVENT_CLOSE ; Clean up resources _GDIPlus_GraphicsDispose ($hGraphic) _GDIPlus_Shutdown () EndFunc ;==>_Main RegEx/RegExRep Tester!Nerd Olympics - Community App!Login UDFMemory UDF - "Game.exe+753EC" - CE pointer to AU3Password Manager W/ SourceDataFiler - Include files in your au3!--- Was I helpful? Click the little green '+' Link to comment Share on other sites More sharing options...
LarryDalooza Posted September 26, 2008 Share Posted September 26, 2008 If the text exists in a DC you can use selectobj or some shit to get it into an hbitmap ... to create text DC perhaps search the forum for CreateTextRgn Lar. AutoIt has helped make me wealthy Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted September 26, 2008 Moderators Share Posted September 26, 2008 If you're trying to do this on the fly... something like: CreateCompatibleDC CreateBitmap TextOut or DrawText Would probably work. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. 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