Solved

Using OWL's DrawText function

Posted on 1997-10-27
3
382 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Template syntax for variable length arrays 9 80
Least Squares Curve Fitting 4 134
Gaming Software 1 39
visual C++ 1 43
This article shows you how to optimize memory allocations in C++ using placement new. Applicable especially to usecases dealing with creation of large number of objects. A brief on problem: Lets take example problem for simplicity: - I have a G…
Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

752 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