3 simple questions
-
Hi all, I have three simple questions that I just cannot solve : 1. How do I draw text with a transparent background? I have created a CFont structure (with appropriate colour, font and size), but don`t know how to draw its background transparently (it draws the text in a white box and pastes it to the screen) 2. How do I change the MFC default icons that appear in the top left hand corner of the Mainframe and Child frame respectively? 3. How do I change the line that says "MFC Application" when looking at the file in Windows Explorer? Be grateful if someone could help me out, cheers guys, Alan. "When I left you I was but the learner, now I am the Master" - Darth Vader:mad:
-
Hi all, I have three simple questions that I just cannot solve : 1. How do I draw text with a transparent background? I have created a CFont structure (with appropriate colour, font and size), but don`t know how to draw its background transparently (it draws the text in a white box and pastes it to the screen) 2. How do I change the MFC default icons that appear in the top left hand corner of the Mainframe and Child frame respectively? 3. How do I change the line that says "MFC Application" when looking at the file in Windows Explorer? Be grateful if someone could help me out, cheers guys, Alan. "When I left you I was but the learner, now I am the Master" - Darth Vader:mad:
1. i guess you should change the backgroundcolor of your output (e.g. determine the rect, draw a rectangle in this color (using a colored pen) and then use DrawText in this rectangle).. but no real transparency, i know. 2. in the resource editor there is an icon, called IDR_MAINFRAME. Change this and it will work (remember changing both the 32x32 and 16x16 icon) 3. resource edit / version / vs_version_info
"There are three roads to ruin: women, gambling and technicians. The most pleasant is with women, the quickest is with gambling, but the surest is with technicians." Georges Pompidou
-
1. i guess you should change the backgroundcolor of your output (e.g. determine the rect, draw a rectangle in this color (using a colored pen) and then use DrawText in this rectangle).. but no real transparency, i know. 2. in the resource editor there is an icon, called IDR_MAINFRAME. Change this and it will work (remember changing both the 32x32 and 16x16 icon) 3. resource edit / version / vs_version_info
"There are three roads to ruin: women, gambling and technicians. The most pleasant is with women, the quickest is with gambling, but the surest is with technicians." Georges Pompidou
Thanks for the response, your answers to questions 2 and 3 were cool, I didn`t spot the 16x16 icon and thats why I could change the icon for the app, but not the icons in the app. I would still like to know if text backgrounds and transparency is possible? I would be very surprised if it weren't. Many Thanks Bernhard, Alan. "When I left you I was but the learner, now I am the Master" - Darth Vader:mad:
-
Hi all, I have three simple questions that I just cannot solve : 1. How do I draw text with a transparent background? I have created a CFont structure (with appropriate colour, font and size), but don`t know how to draw its background transparently (it draws the text in a white box and pastes it to the screen) 2. How do I change the MFC default icons that appear in the top left hand corner of the Mainframe and Child frame respectively? 3. How do I change the line that says "MFC Application" when looking at the file in Windows Explorer? Be grateful if someone could help me out, cheers guys, Alan. "When I left you I was but the learner, now I am the Master" - Darth Vader:mad:
****Chambers wrote: How do I draw text with a transparent background? Call CDC::SetBkMode(); with TRANSPARENT before drawing text. /ravi "There is always one more bug..." ravib@ravib.com http://www.ravib.com