Any way to XOR text?

I want to write text with a TRANSPARENT mode and XOR-ing the text-color so
that writing it twice will leave the underlying drawing undisturbed.  So far
I've tried both TextOut() and DrawText() with just about every possible
combination of things I could think of and haven't been able to do this.  It
may well be impossible and what I simply may need to do is to completely
redraw the underlying window and then rewrite text as required but that
seems quite wasteful of bandwidth.

    TIA
        Norm


0
ndrez (136)
7/21/2003 5:08:50 PM
vc.mfc 33608 articles. 0 followers. Follow

7 Replies
1343 Views

Similar Articles

[PageSpeed] 46

I should definitely change my signature to "GDI+" :-) It is another post
containing one advise:

* use GDI+

Regards,
GDI+... that is Peter :-)

P.S. If you want details, continue asking in this thread.




"Norm Dresner" <ndrez@att.net> wrote in message
news:C6VSa.65659$0v4.4404988@bgtnsc04-news.ops.worldnet.att.net...
> I want to write text with a TRANSPARENT mode and XOR-ing the text-color so
> that writing it twice will leave the underlying drawing undisturbed.  So
far
> I've tried both TextOut() and DrawText() with just about every possible
> combination of things I could think of and haven't been able to do this.
It
> may well be impossible and what I simply may need to do is to completely
> redraw the underlying window and then rewrite text as required but that
> seems quite wasteful of bandwidth.
>
>     TIA
>         Norm
>
>


0
programer (27)
7/21/2003 5:20:47 PM
Your signature also has to include the words "use .NET"

    For those of us who, for a variety of reasons, haven't made [or been
allowed to make] that transition yet, your advice isn't.

    Norm

"Peter M." <programer@o2.pl> wrote in message
news:OByJUy6TDHA.3712@tk2msftngp13.phx.gbl...
> I should definitely change my signature to "GDI+" :-) It is another post
> containing one advise:
>
> * use GDI+
>
> Regards,
> GDI+... that is Peter :-)
>
> P.S. If you want details, continue asking in this thread.
>
>
>
>
> "Norm Dresner" <ndrez@att.net> wrote in message
> news:C6VSa.65659$0v4.4404988@bgtnsc04-news.ops.worldnet.att.net...
> > I want to write text with a TRANSPARENT mode and XOR-ing the text-color
so
> > that writing it twice will leave the underlying drawing undisturbed.  So
> far
> > I've tried both TextOut() and DrawText() with just about every possible
> > combination of things I could think of and haven't been able to do this.
> It
> > may well be impossible and what I simply may need to do is to completely
> > redraw the underlying window and then rewrite text as required but that
> > seems quite wasteful of bandwidth.
> >
> >     TIA
> >         Norm
> >
> >
>
>


0
ndrez (136)
7/21/2003 6:24:12 PM
Try to draw it to a memory context and then apply BitBlt 
with XOR operation to the screen.

>-----Original Message-----
>I want to write text with a TRANSPARENT mode and XOR-ing 
the text-color so
>that writing it twice will leave the underlying drawing 
undisturbed.  So far
>I've tried both TextOut() and DrawText() with just about 
every possible
>combination of things I could think of and haven't been 
able to do this.  It
>may well be impossible and what I simply may need to do 
is to completely
>redraw the underlying window and then rewrite text as 
required but that
>seems quite wasteful of bandwidth.
>
>    TIA
>        Norm
>
>
>.
>
0
alegr (1131)
7/22/2003 12:25:18 AM
"Norm Dresner" <ndrez@att.net> wrote in message
news:gdWSa.65766$0v4.4408735@bgtnsc04-news.ops.worldnet.att.net...
> Your signature also has to include the words "use .NET"
>


Please explain why, I'm really confused! I'm using VC++ 6.0 as well. If you
see any correlation between GDI+ and .NET, you're mistaken.
Regards,
Peter


0
programer (27)
7/22/2003 12:43:10 AM
"Peter M." <programer@o2.pl> wrote in message
news:%23m3KWp%23TDHA.2260@TK2MSFTNGP12.phx.gbl...
>
> "Norm Dresner" <ndrez@att.net> wrote in message
> news:gdWSa.65766$0v4.4408735@bgtnsc04-news.ops.worldnet.att.net...
> > Your signature also has to include the words "use .NET"
> >
>


You did really confuse me. Anyway, to use GDI+ and stop fighting small wars
with GDI _YOU DO NOT HAVE TO BUY_ Visual C++ .NET! Just download FREE SDK
from Microsoft site!


Please, if you had something else on mind, let me know promptly.
Regards,
Peter





0
programer (27)
7/22/2003 12:50:18 AM
I'll definitely give that a try and report results here.

    Thanks
        Norm

"Alex Grigoriev" <alegr@earthlink.net> wrote in message
news:043e01c34fe7$ba987860$a601280a@phx.gbl...
> Try to draw it to a memory context and then apply BitBlt
> with XOR operation to the screen.
>
> >-----Original Message-----
> >I want to write text with a TRANSPARENT mode and XOR-ing
> the text-color so
> >that writing it twice will leave the underlying drawing
> undisturbed.  So far
> >I've tried both TextOut() and DrawText() with just about
> every possible
> >combination of things I could think of and haven't been
> able to do this.  It
> >may well be impossible and what I simply may need to do
> is to completely
> >redraw the underlying window and then rewrite text as
> required but that
> >seems quite wasteful of bandwidth.
> >
> >    TIA
> >        Norm
> >
> >
> >.
> >


0
ndrez (136)
7/22/2003 4:22:26 AM
"Norm Dresner" <ndrez@att.net> wrote in message
news:lZ2Ta.66164$3o3.4409673@bgtnsc05-news.ops.worldnet.att.net...
> My MSDN library help stuff explicitly says that GDI+ is part of .NET but
it
> doesn't say that it's not available any other way -- perhaps that's my
> confusion.  I'll check it out.
>
>     Thanks
>         Norm
>


Hey,

This is definitely not a part of old (done for VC++ 6.0) MSDN. You should
seek for "Platform SDK" on Microsoft site and download it - if you want to
of course. Microsoft's site is running a small ActiveX that takes care of
installation of help system (it's new and look very similar to .NET's) and
all library/header files required to compile code that requires GDI+ under
both Visual C++ 6.0 or VC++ .NET.
Only thing you have to do after downloading Platform SDK is to redistribute
small DLL, "gdiplus.dll" - this is not required however under Windows XP
family.
Have fun, Platform SDK want harm your system. Sometimes, with new headers
problems with OpenGL occur, but this is rare (library file does not contain
a function which name I don't remember now).

Should you have any further questions - do not hesitate to write. GDI+ is
really improved and it is worthy to take advantage of it. You said something
about speed issue - from my knowledge all functions supported by your driver
are hardware accelerated (such as alpha blending).

Regards,
Peter


0
programer (27)
7/22/2003 6:07:26 AM
Reply:

Similar Artilces:

text and date concatenation
I'm using the following formula to concatenate some text and a date into a single cell =Concatenate("End Date for the period is; ", Data!W2) where cell W2 on the data sheet is the date I want to use. Unfortunately the result is always "End Date for the Period is: 39327". I can't seem to make it display in the x/x/2007 date format. What am I doing wrong? Thanks. Try ="End Date for the period is; "&TEXT(Data!W2,"dd mmm yy") You dont really need the CONCATENATE function, just use the '&' to join the parts, obviously ch...

Printing colored text
I have different colored text in different cells, however none of it is printing in color. All Text comes out black and white. I can however print fill colors. When I give my file to someone else to print it comes out fine. So I assume it is a setting on my specific computer or excel program. Please help. This is just a wild guess. Maybe it's not excel--maybe it's the printer driver. Can you reinstall it (or even get a fresh copy from the manufacturer's web site)? It really seems weird that the fill prints colors, but not the font. Tonda wrote: > > I have different colo...

Best Way ?
G'day All, Looking for some information. With Outlook you can have all your contacts...address, email address, yada, yada, yada. Can I use this information in to say mail merge with Word and email a letter to the ppl with email addresses? Or is this better done with a Access? The reason I ask is that we want to deliver an email to all our clients with the latest promotions. And want it to be a bit more automated? Any information or pointers in the right direction would be appreciated. Have a good one, Scott V You can use either Access or Outlook as the data source for a ma...

A way to create sub-categories?
I want to group contacts by category and then a sub-category for easy viewing. Apart from creating a new field for sub-category is there a way of doing this? Outlook doesn't seem to support sub-categories. Thanks Nope. -- Patricia Cardoza Outlook MVP Author - Special Edition Using Microsoft Office Outlook 2003 Lead Author - Access 2003 VBA Programmer's Reference Author - Absolute Beginner's Guide to Microsoft OneNote 2003 http://blogs.officezealot.com/cardoza http://www.cardozasolutions.com "Casebase" <junkmail@casebase.net> wrote in message news:%23rx5a...

Is there a way to color code Outlook Contact File Folder Labels?
Is there a way to color code Outlook Contact File Folder Labels? No. -- Diane Poremsky [MVP - Outlook] Author, Teach Yourself Outlook 2003 in 24 Hours Coauthor, OneNote 2003 for Windows (Visual QuickStart Guide) Author, Google and Other Search Engines (Visual QuickStart Guide) Outlook Tips: http://www.outlook-tips.net/ Outlook & Exchange Solutions Center: http://www.slipstick.com Join OneNote Tips mailing list: http://www.onenote-tips.net/ "isailhbca" <isailhbca@discussions.microsoft.com> wrote in message news:4DBD10F7-FAA0-4102-A4C3-E2697908EFE8@microsoft.com... >...

Word X text converter for WordPerfect (wpd) files
Is there a text converter available for Word X that converts WordPerfect (spd) files? In article <0b1e01c39a76$b3cad9e0$a001280a@phx.gbl>, "JPS" <anonymous@discussions.microsoft.com> wrote: > Is there a text converter available for Word X that converts WordPerfect > (spd) files? No. Check out Dataviz' MacLinkPlus: http://www.dataviz.com/products/maclinkplus/ ...

replace phone text in several eml files how?
I have 400 eml files, those are some 200 floders with 2 email messages in each, basically a commercial response to answer repetitive emails quickly. The problem is I need to change the conact phone in those emails text, and doing one by one is a huge task. I couldn't find any way to search and replace that text in a quicker way. Is there any solution / workaround? Not that I know of. Maybe someone can come up with a script for this or have a better idea -- Peter Please Reply to Newsgroup for the benefit of others Requests for assistance by email can not and ...

is there a way to crop a corner out of a rectangular image in Visi
Using subtract on two shapes accomplishes what i want to do, but when the first shape is a .gif image, it does not work. No, the "boolean operations", as they're called, do not operate on foreign objects like bitmaps and controls. Visio has crop functionality for imported graphics, but it is only rectangular. You could draw a small white triangle and give it "no line". Then place it over the corner of your bitmap. -- Hope this helps, Chris Roth Visio MVP "doug" <doug@discussions.microsoft.com> wrote in message news:29D479A6-6099-4051-B7A0-1...

Function In A Text Box
Hi, I am trying to put a concatenate function in a text box. The error message is as follows: The text you have entered is not a valid reference or defined name. I want to concatenate some text with a number from the cell, A2. Any ideas would greatly appreciated. Regards Tubbsy -- tubbsy ------------------------------------------------------------------------ tubbsy's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=24743 View this thread: http://www.excelforum.com/showthread.php?threadid=388332 Its not a perfect solution but you could perform the concat...

Merge/consolidate text cells based on unique keys ?
Hi all. I hope someone can help me out. I have an Excel worksheet with 2 columns: 'Client #' and 'Invoice #'. Every time the accounting dept. generates an invoice, a new row is added in this worksheet. Obviously this is chronological not per Client #. But for the sake of simplicity, let's assume the worksheet is already sorted by Client #, like so: A B Client # Invoice # 231 5929 231 4358 231 2185 231 6234 464 1166 464 1264 464 3432 464 1720 464 9747 791 1133 791 4930 791 5496 791 6291 989 8681 989 3023 989 7935 989 8809 989 8873 My goal is to achieve...

is there a way to change the time card repor format?
i'm using activereports in RMS to generate a custome timecard report. for my timein and timeout colums, the datatype i have assigned to the columns is vbDate. when I generate the report, the columns only show the date as mm/dd/yyyy, they do not show the time of day piece for exactly when the cashier punched in or out. is there any way to change the formatting of this so that in the report the time shows up? for example, instead of showing 2/6/2005 in the time in column, it would show 2/5/2005 8:00:00 AM. thanks in advance, kevin There is a timecard report on the Reports Library...

Can You Count This Way?
I have some cells with note type data: For ex: ax,3b7,22,xy,zz, Is there a way to count every item between the commas? Thanks. Hi try =LEN(A1)-LEN(SUBSTITUTE(A1,",","")+LEN(A1)>0 -- Regards Frank Kabel Frankfurt, Germany Timothy Wright wrote: > I have some cells with note type data: > > For ex: > > ax,3b7,22,xy,zz, > > Is there a way to count every item between the commas? > > Thanks. On Wed, 19 May 2004 20:13:53 +0200, "Frank Kabel" <frank.kabel@freenet.de> wrote: >Hi >try >=LEN(A1)-LEN(SUBSTITUTE(A1,&q...

best way to deserialize xml
I'm at a quandry as to what's the best/fastest way to deserialize an incoming xml stream? I ran a small test on xmlserializer and on a small file it performed 10 times worse then when I used the XMLDocument and deserialized the values myself. Is the xmlserializer really that slow? I'm expecting a file about 1 MB in length and if it's that slow on a 2 K file then I can't phantom how it's going to behave on a 1 MB file. Should I just skip the xmlserializer and XML Dom and go straight to xmlreader and do the deserialization myself? This has been discussed a few times...

Html to Text Convertor?
Hello, How can i get any www sites text with mfc functions? or is there another way to get side's text? thanks It depends on what you mean by "text". The rendering of html is fairly complex, and I'm not sure that the "text" even has much meaning in this context. You can use the various WinINet functions to build something that can download html, but since html can contain frames, tables, etc., deciding what is "text" can be tricky. joe On 13 Feb 2007 12:31:30 -0800, halmuratov@gmail.com wrote: >Hello, > >How can i get any www sit...

Is there a way to Sort data by color in Excel?
I am trying to sort data by color, is that possible? see http://www.xldynamic.com/source/xld.ColourCounter.html#sorting -- HTH Bob Phillips "SRTUC" <SRTUC@discussions.microsoft.com> wrote in message news:B5121232-FB1D-46AF-94F8-04B7EAA2D90C@microsoft.com... > I am trying to sort data by color, is that possible? You're gonna need a User defined function to get the value of a color. See Chip Pearson's site for a nice version: http://www.cpearson.com/excel/colors.htm Look for: Returning The ColorIndex Of A Cell Then you could use that UDF in a separate colu...

Text to Columns ???
Hello All The results of my formulas are time worked in the format of 12.00 or 8.00 etc As the results are centered in the cell, is it possible to have the decimal point in line every time. Obvioulsy if the results are less than 10 hours, they would line up normally. If however, the results are over 10 hours, the whole figure is centered in the cell misaligining the decimal point. If this is possible, please can you explain how. I have tried using Text To Columns, but cannot seem to get it to work. Thanking you in anticipation -- Big Rick Format | Cells | Number | Category: Number | Set...

How to keep leading zero without changing field to text field?
I've already tried to customize the number 0#### - the leading zero remains in Excel but as soon as I save this file and try to use it as a merge document with word the leading zero is gone again. I then have to go back and make this a text in order for the zero to remain when merging with word. http://office.microsoft.com/en-ca/assistance/HA011164951033.aspx -- tj "Deni" wrote: > I've already tried to customize the number 0#### - the leading zero remains > in Excel but as soon as I save this file and try to use it as a merge > document with word the lea...

Fastest way to load an xml file into an array in .net
Hi All VS 2005 SP1 (C#, VB.NET) I need the absolut fastest way of loading an xml-file of about 700KB into an array. I need to load about 1500 of those xml-Files into arrays on startup of my application. Therefore it needs to be as fast as possible. Please also tell me if the xml structure can be improved. the xml looks like: y: Year m: Month h: Hour value <data> <v y="1998" m="1" h="1">0.227777109151971</v> <v y="1998" m="1" h="2">0.206573903224972</v> <v y="1998" m="1"...

Option to shadow shapes & text boxes in Publisher 2003
MS Office help offers the following instructions referencing a SHADOW STYLE OPTION; THIS OPTION DOES NOT APPEAR ON MY DROP DOWN LIST OF OPTIONS!!! Select the picture, AutoShape, WordArt or text box that you want to change. On the Formatting toolbar, click Shadow Style , and do one of the following: Add or remove a shadow To add a shadow, click the shadow style you want. To remove a shadow, click No Shadow. Change the direction of the shadow To change the direction of a shadow, click a shadow that goes the direction you want. Change the distance of the shadow from...

Strange characters in text fields of Crystal Reports 10
I have loaded Crystal 10 on clients machines and upgraded all reports from Crystal v8.5 to v10. Now it seems that on certain machines, all text fields display as strange characters. Other fields (ie database, formulas,etc) are fine. On right clicking on the text field and formatting text, the text appears in English but as soon as you tab out of this field it reverts back to the "Chinese" looking language. I have looked at all set up options on the 3 machines that have this problem but cannot find anything strange. These same reports look fine when opened on other machines...

Is there a convenient way to save data
Is there a convenient way to save dialog data so it remembers the users last selection? I have a dialog based application that only has three user variables all of which are ints. What is the best way to make theses variables persistent for a given user on a given machine? Thanks "Jeff B" <jb@nospan.net> wrote in message news:fpDif.10451$Ay6.2336@fe13.lga... > > Is there a convenient way to save dialog data so it remembers the users last > selection? I have a dialog based application that only has three user > variables all of which are ints. What is the best w...

Time to text conversion
I have Mac's version of Office (Office 2004), but it shouldn't matter.. The problem: I have a column in a table containing times (for some events). Data found in the cells looks like this: 1) "20:00 2) "20:00/22:00" (starting/ending time) Excel has automatically formated type 1 cells as "time", and type 2 cells as "text". I need all the cells to be formatted as "text". How? If i change the formatting of a cell, it displays something like "0.833333" (20.00 divided by 24). The only solution I came out with is copying the whole co...

Is there a way
G'Day, Is there a way to turn off NDR's in Ex5.5 SP4 on an NT server running SP6a ? Also, can the ability for the server to receive TELNET connections be turned off? My server isn't an open relay, but, I know it's being used to SPAM using DNR's and I can see TELNET connections in the log files.... Thank You, Admin_In_Syd i know that u can turn off the ndrs to be sent from exchange at the standard poliy setting, thats how i configured it at exchange 2000 .... there must be also a setting at exch 5.5, actually i dont remeber it .... "Steve@Home" <sprob@...

way to verify time stamp?
Is there a way to verify when a forwarded message to you had originally been sent? I suspect someone is mis- representing themselves and simply typed new fields into the "original message" time and date. If not - is it possible (or at all likely) that someone sent me two emails days ago and they never bounced back and never made it to my inbox, while all other email functions appear completely normal?? Thanks! "Julie" <anonymous@discussions.microsoft.com> wrote in message news:27d701c49d00$dd3315d0$a401280a@phx.gbl... > Is there a way to verify when a for...

VB6 Code 1/2 way finished......any suggestions
Have a issue with a VB6 program, had someone write some code, he got 1/2 way thru and decided to work on other projects and keeps putting us on the back burner, been waiting 4 months now, looking at what he has put together looks very nice, but is trademarked? so we cant get to the code, any ideas or suggestions? Thanks Bill On 4/1/2010 12:48 AM, David Kaye wrote: > "Bill"<got2believe@msn.com> wrote: > >> trademarked? so we cant get to the code, any ideas or suggestions? Thanks > > If it'...