-
June 13th, 2013, 02:19 AM
#1
Canvas like MS Paint
Hi,
Whenever we open MS Paint we see selected white background on which do the paint.
So, I would like to know what we call it and how we can create the same canvas using Visual C++.
Please provide your valuable feedback.
Thanks
CDeveloper
-
June 13th, 2013, 06:47 AM
#2
Re: Canvas like MS Paint
That's just a memory dc backed by a (memory) bitmap or DIB (depending on how it was implemented).
-
June 19th, 2013, 06:12 AM
#3
Re: Canvas like MS Paint
Thanks for your valueable input.
I tried to get the MS Paint like DC (with white background and scrollable area) but its not showing anything.
Could you plz provide the sample code if you have available with you.
Thanks
CDeveloper
-
June 19th, 2013, 06:51 AM
#4
Re: Canvas like MS Paint
Scrolling you'll have to do yourself, these are things that are managed by a window. not by a dc.
A memory DC is just a proxy to paint something into a window, if you want scrolling, you'll have to handle the scrollbars of te window and when the window needs to be painted, you paint/blit the appropriate portion of the bitmap-memory dc into the paintDC.
-
June 19th, 2013, 07:01 AM
#5
Re: Canvas like MS Paint
Scribble is a rudimentary drawing app tutorial. It may help.
http://msdn.microsoft.com/en-us/libr...=vs.80%29.aspx
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|