News:

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

Converting point.x and point.y

Started by Nilrem, May 05, 2005, 06:43:21 PM

Previous topic - Next topic

Nilrem

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.

hutch--

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]

Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

lamer

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

Nilrem

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.

pro3carp3

Where can I get the debug library?  A google search on VKim debug doesn't come up with anything in English.  Thanks.
LGC

AeroASM