how do u allow user to "draw" in SDK
-
how do u create a dc over ur whole dialog window and allow a user to draw lines on it? help would be appreciated thx:)
Override the
CDialog::OnPaint()
Unless you really mean the WHOLE window in which case useGetWindowDC()
It's frustrating being a genius and living the life of a moron!!! -
Override the
CDialog::OnPaint()
Unless you really mean the WHOLE window in which case useGetWindowDC()
It's frustrating being a genius and living the life of a moron!!! -
how do u create a dc over ur whole dialog window and allow a user to draw lines on it? help would be appreciated thx:)
You could create a custom control that handled the drawing and then insert the control in the dialog. To enable drawing you need to handle mouse messages (button down, mouse move, button up, etc.) and draw in the window accordingly. You can look at Microsoft's scribble sample program to get ideas on how to do it. There are Win32 and .NET versions for this sample, and although they are intended as MFC tutorials, you can still use it to extract useful ideas. -- jlr http://jlamas.blogspot.com/[^]