News:

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

Help with assembler

Started by SepulRise, May 04, 2005, 06:51:42 PM

Previous topic - Next topic

SepulRise

Hi.

How can i make a program in assembler to draw a line with angles, etc...

Is Urgent

Thanks

pbrennick

SepulRise,

According to the API, this might be close to what you want, there are othere search results you can scope out:

The following would be used by BeginPaint and then you would issue an EndPaint.  The RECT parameter can be set to do what you need.
Quote
The PAINTSTRUCT structure contains information for an application. This information can be used to paint the client area of a window owned by that application.

typedef struct tagPAINTSTRUCT { // ps 
    HDC  hdc;
    BOOL fErase;
    RECT rcPaint;
    BOOL fRestore;
    BOOL fIncUpdate;
    BYTE rgbReserved[32];
} PAINTSTRUCT;


Members

hdc

Identifies the display DC to be used for painting.

fErase

Specifies whether the background must be erased. This value is nonzero if the application should erase the background. The application is responsible for erasing the background if a window class is created without a background brush. For more information, see the description of the hbrBackground member of the WNDCLASS structure.

rcPaint

Specifies a RECT structure that specifies the upper left and lower right corners of the rectangle in which the painting is requested.

fRestore

Reserved; used internally by Windows.

fIncUpdate

Reserved; used internally by Windows.

rgbReserved

Reserved; used internally by Windows.

hth:
Paul

AeroASM

To draw the line, use BeginPaint,PolyLine,EndPaint

To work out the line points from the angles, use trigonometry with the FPU.
raymond's tutorial: http://www.website.masmforum.com/tutorials/fptute/

QvasiModo

Sounds like homework. Is it for DOS or Windows?

Bieb

Sounds very much like homework.  Anyhow, if you don't know assembler, you're not going to get this done very quickly.  It took me months to get used to it.  Anyhow, if you need to learn the basics, check out Iczelion's tutorials, at win32asm.cjb.net.

pbrennick

I hope it isn't homework, this forum is starting to give me a pain with all these homework requests!  Anyway, to be safe, I only point to the API, I am not willing to surrender code examples to unknown users.

Paul