News:

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

draw in a dialog Image control

Started by Mark_201, June 14, 2006, 10:30:00 PM

Previous topic - Next topic

Mark_201

I have an Image window ( or control?)  in a dialog box.  I know how to get the handle of it but how do I get the rectangle size or coordinates so I can draw lines using LineTo?  Is there an example how to do this?


Casper

Casper says...

To understand this search the help file for Rectangle Coordinates


Mark_201

Quote from: Casper on June 14, 2006, 11:55:02 PM
Casper says...

To understand this search the help file for Rectangle Coordinates



:lol  Thanks for the laugh.

Tedd

No snowflake in an avalanche feels responsible.

Mark_201

Quote from: Tedd on June 15, 2006, 01:15:27 AM
GetWindowRect ?
GetWindowRect - gets RECT coordinates relative to screen
GetClientRect    -  gets RECT coordinates relative to the client or itself (i.e.  width and height )


Siekmanski

Maybe this is what you need ?

   invoke  GetClientRect,hwnd,addr rcScreen

   And then convert the client-area coordinates to screen coordinates:

   invoke  ClientToScreen,hwnd,addr rcScreen.left
   invoke  ClientToScreen,hwnd,addr rcScreen.right