The MASM Forum Archive 2004 to 2012

General Forums => The Campus => Topic started by: Nilrem on May 05, 2005, 06:43:21 PM

Title: Converting point.x and point.y
Post by: Nilrem on May 05, 2005, 06:43:21 PM
I'm not sure at all on what I have to convert point.x and point.y (of POINT Struct) to make it readable? I try printing it in a messagebox and it comes up as weird characters. Please help? Even if it's documentation to read, really appreciate it. Thanks.
Title: Re: Converting point.x and point.y
Post by: hutch-- on May 05, 2005, 06:51:35 PM
Just remember they are structure members which says memory operands. As long as you have loaded the structure properly, just convert the values in both to string to display them. The usualy method is to declare a LOCAL within a proc to allocate stack space.


LOCAL pt:POINT

  ; run an API to fill a POINT struct
  ; pt.x and pt.y are now filed with values.

  ; display the value in console mode

print ustr$(pt.x),13,10

  ; or in GUI mode

fn MessageBox,hWnd,ustr$(pt.x),"Result",MB_OK
[/ccode]

Title: Re: Converting point.x and point.y
Post by: lamer on May 05, 2005, 07:26:56 PM
Or use VKim's debug

...
include debug.inc
includelib debug.lib
...
PrintDec pt.x


It will print the result into debuger window and not hinder your program
Title: Re: Converting point.x and point.y
Post by: Nilrem on May 05, 2005, 09:10:49 PM
Many thanks, I actually already knew this but forgot, sorry. What I mean is I have done the ustr before but forgot it, apologies and thanks.
Title: Re: Converting point.x and point.y
Post by: pro3carp3 on May 06, 2005, 05:06:30 PM
Where can I get the debug library?  A google search on VKim debug doesn't come up with anything in English.  Thanks.
Title: Re: Converting point.x and point.y
Post by: AeroASM on May 06, 2005, 06:04:10 PM
It is in \masm32\vkdebug