Canvas like MS Paint
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5

Thread: Canvas like MS Paint

  1. #1
    Join Date
    May 2013
    Posts
    3

    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

  2. #2
    Join Date
    Apr 2000
    Location
    Belgium (Europe)
    Posts
    3,891

    Re: Canvas like MS Paint

    That's just a memory dc backed by a (memory) bitmap or DIB (depending on how it was implemented).

  3. #3
    Join Date
    May 2013
    Posts
    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

  4. #4
    Join Date
    Apr 2000
    Location
    Belgium (Europe)
    Posts
    3,891

    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.

  5. #5
    GCDEF is offline Elite Member Power Poster
    Join Date
    Nov 2003
    Posts
    12,098

    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
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center