Erasing The Background

Posted on 2006-04-18
Medium Priority
Last Modified: 2010-05-18
Hi EveryBody.

I'm writing a code to capture the stylus motion on the screen of the PDA, I'm drawing a window using a null brush because I want this window transparent window, this window has a rounded rectangle, the problem appears when I move the window the boundaries in the old position still appear, I want to erase these boundaries in the old position.

Can you help me in this problem?

Thank you.
Question by:MAnkeer
  • 3

Expert Comment

ID: 16493161
i think you will have to send redraw message to all visible windows other than yours.

Author Comment

ID: 16495333
How can I do that?

Accepted Solution

jhshukla earned 1000 total points
ID: 16496655
here is how you get window handles: http://msdn.microsoft.com/msdnmag/issues/02/07/CQA/
then you send a WM_PAINT message to all those windows using either SendMessage or PostMessage. note that SendMessage and PostMessage are part of unmanaged API and can't be called as easily from managed code. read http://msdn2.microsoft.com/en-us/library/26thfadc.aspx on how to call funcs in unmanaged DLLs from managed code.

Expert Comment

ID: 16496695
btw you only need to send messages to visible windows but it would take a lot of effort to detemine which windows need to be redrawn. just redraw all of them and if you don't have a picture that took forever to render the difference would be pretty much unnoticeable.

Featured Post

Prep for the ITIL® Foundation Certification Exam

December’s Course of the Month is now available! Enroll to learn ITIL® Foundation best practices for delivering IT services effectively and efficiently.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The following diagram presents a diamond class hierarchy: As depicted, diamond inheritance denotes when two classes (e.g., CDerived1 and CDerived2), separately extending a common base class (e.g., CBase), are sub classed simultaneously by a fourt…
In Easy String Encryption Using CryptoAPI in C++ (http://www.experts-exchange.com/viewArticle.jsp?aid=1193) I described how to encrypt text and recommended that the encrypted text be stored as a series of hexadecimal digits -- because cyphertext may…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?
Suggested Courses

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question