News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

need help for GdipDrawString

Started by alax, June 23, 2009, 02:17:11 PM

Previous topic - Next topic

alax

hello everyone, i need your kind help for my gdi+ study

i have struggled for days for a gdi+ function - GdipDrawString - the error code is 1 - GpStatusGenericError

i cant find out any mistakes in this simple program 'cause i am new to masm, and i followed the suggestions from a previous thread but i cant work it out :'(

i attach the program below and thank you very much in advance for your time and any suggestions

[attachment deleted by admin]

ToutEnMasm


Something is missing in my masm32 v10,gdiplus_structs.inc ???
Perhaps if can have it ?

alax

thanks ToutEnMasm, i attach the header & lib files here
this can be downloaded from the radasm website, but i cant remember exactly
the RectF structure in the gdiplus_structs.inc is probably not the same as in the cpp header file, so you may need to do a little change to it
thank you for your time and kind help!

[attachment deleted by admin]

ToutEnMasm


There is something wrong here
Quote
Assembling: gdiptest.asm
;-----------------------------------------------
    local @r    :RectF
;-------------------------------------------------
RectF STRUCT
    Left REAL4 ?
    Top REAL4 ?
    Right REAL4 ?
    Bottom REAL4 ?
RectF ENDS
;-----------------------------------------------------
gdiptest.inc(72) : fstp @r.X :error A2006: undefined symbol : X
gdiptest.inc(75) : fstp @r.Y :error A2006: undefined symbol : Y
gdiptest.inc(78) : fstp @r.W:error A2006: undefined symbol : W
gdiptest.inc(81) : fstp @r.H :error A2006: undefined symbol : H

ToutEnMasm


Sdk define of structure is

Quote
RectF STRUCT
      x REAL4 ?
      y REAL4 ?
      awidth REAL4 ?
      height REAL4 ?
RectF ends
NOT THE SAME !
Seems you have a patchwork of this structure

ToutEnMasm

Here is a sample using the sdk rc7 translate and the libcmt,math functions atof.
all the gdiplus code is in OnPaint proc

[attachment deleted by admin]