Displaying more shapes in the same client Area

This is a discussion on Displaying more shapes in the same client Area within the Windows Programming forums, part of the Platform Specific Boards category; Dear Friends I am a Teacher. At present I face a problem in drawing different shapes in the client area ...

  1. #1
    Registered User
    Join Date
    Jun 2005
    Posts
    1

    Displaying more shapes in the same client Area

    Dear Friends
    I am a Teacher. At present I face a problem in drawing different shapes in the client area of my window . I am using SDK(WIN32 API).
    My problem: Drawing shapes in the client area
    1. I select a shape from the menu(resource)
    2. I start by dragging the mouse in the client area(the shape keep growing), when I release the mouse the shape will be there.
    3. Now I select another shape and drag, the new shape will keep drawing on the client area, but on invalidation the previous shape disappers.
    How can I retain the previous shape on invalidating only a particular part.
    (I call InvalidateRect() in each WM_MOUSEMOVE with MK_LBUTTON down).
    Please provide me a solution soon.
    Have a nice day
    Bye

  2. #2
    Handy Andy andyhunter's Avatar
    Join Date
    Dec 2004
    Posts
    540
    Well, being a teacher you undoubtedly appreciate the importance of learning a concept for yourself vice just being presented with a solution. Why don't we begin by posting some specific source code you have written for the task at hand and we will go from there.

    Off the top of my head it is apparent that you probably are not saving the client area of your program so that each redrawing simply redraws the client area with the default brush, (WHITE). What needs to happen is that you have a back buffer which is drawn to the front (client area).

    Once I see some code I will be glad to answer with some code.

    Have a nice day.
    i don't think most standard compilers support programmers with more than 4 red boxes - Misplaced

    It is my sacred duity to stand in the path of the flood of ignorance and blatant stupidity... - quzah

    Such pointless tricks ceased to be interesting or useful when we came down from the trees and started using higher level languages. - Salem

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Universal area forumula for equilateral + equiangular shapes?
    By Bird Killer in forum A Brief History of Cprogramming.com
    Replies: 4
    Last Post: 03-05-2006, 01:55 PM
  2. Program with Shapes using Virtual Functions
    By goron350 in forum C++ Programming
    Replies: 12
    Last Post: 07-17-2005, 01:42 PM
  3. MFC: Clear Client Area
    By mrafcho001 in forum Windows Programming
    Replies: 2
    Last Post: 06-27-2005, 01:35 PM
  4. Tab Controls - API
    By -KEN- in forum Windows Programming
    Replies: 7
    Last Post: 06-02-2002, 09:44 AM
  5. Clearing the client area
    By Isometric in forum Windows Programming
    Replies: 15
    Last Post: 01-29-2002, 09:07 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21