News:

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

sketch in a dialog control item

Started by Mark_201, June 16, 2006, 01:00:53 PM

Previous topic - Next topic

Mark_201

I know how to sketch (draw with a mouse) in a window. I'm using a dialog as a main window. So now I want to draw in a custom control of the dialog box. I think I need to link a callback procedure to sketch in the custom control but I'm not sure how.

Do I CreateWindow (custom control) after CreateDialogParam?

Or do I do this during WM_CREATE or WM_INITDIALOG  in the callback procedure of the dialog?

Any suggestions?


TNick

I'm not shure I understand your problem. If you have a problem creating your new control, here it is:
As far as I know, you must create a new thread for each window (control, dialog, ...) you want to use. So, after (!!! - not in your WM_CREATE) your CreateWindow, use CreateThread:


.DATA?
   IDThControl1   DWORD    ?
.CODE

.
.
.

mov    eax,      offset WinControl1
invoke CreateThread,   0,0,eax,0,0, addr IDThControl1



WinControl1      proc     DummyParam:DWORD

invoke CreateWindow .......

WinControl1 endp