Solved

Using OWL's DrawText function

Posted on 1997-10-27
3
393 Views
Last Modified: 2012-08-14
I used DrawText function to write some text on a specific DC on my client window.
Now I want to erase that text only by giving a reference to the DC.
I used SetROP2( R2_NOTXORPEN ) an it works with rectangles, for example, but not with DrawText.

How should I do it? And why does it not work the other way ?
0
Comment
Question by:sagitarian
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 2

Accepted Solution

by:
JensUniweb earned 150 total points
ID: 1172119
I'm not 100% sure but the text functions does not use the pen. You use SetTextColor(). And there you can not set the NOTXOR. What you can do is write the text to a DC in memory and use BitBlt() to copy the text into your normal DC. And there you can use mask and so to get the effect you want. I could get you some example code. But not today.
0
 

Author Comment

by:sagitarian
ID: 1172120
I'm definitly sure that text functions do not use the pen. I tried to change the pen color and text still came out in black.
About the SetTextColor() function, I end up with another problem I have which is to find out the way to get the system background color. If I could do that, it would be simple.
The BitBlt() function seems to be more complicated and would need an example.

Thanks very much for the answer!
0
 

Expert Comment

by:zaWasp
ID: 7886438
hmm, I have a similar question. In my app, I have a splitter, and I want to display the splitting percentage between two panels, using DrawText (or TextOut), right beside the mouse cursor. However, when I move the mouse, the text written at previous cursor position is not erased. How can I do that?
0

Featured Post

Ready to get started with anonymous questions?

It's easy! Check out this step-by-step guide for asking an anonymous question on Experts Exchange.

Question has a verified solution.

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

Often, when implementing a feature, you won't know how certain events should be handled at the point where they occur and you'd rather defer to the user of your function or class. For example, a XML parser will extract a tag from the source code, wh…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

635 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