Click here to Skip to main content
15,908,674 members
Home / Discussions / Managed C++/CLI
   

Managed C++/CLI

 
AnswerRe: Serial Port Pin
Luc Pattyn27-Aug-09 10:46
sitebuilderLuc Pattyn27-Aug-09 10:46 
GeneralRe: Serial Port Pin
jashimu28-Aug-09 5:34
jashimu28-Aug-09 5:34 
QuestionFolder Name Pin
jashimu20-Aug-09 5:27
jashimu20-Aug-09 5:27 
AnswerRe: Folder Name Pin
Mark Salsbery20-Aug-09 5:50
Mark Salsbery20-Aug-09 5:50 
GeneralRe: Folder Name Pin
jashimu20-Aug-09 6:38
jashimu20-Aug-09 6:38 
GeneralRe: Folder Name Pin
Mark Salsbery20-Aug-09 6:53
Mark Salsbery20-Aug-09 6:53 
GeneralRe: Folder Name Pin
jashimu20-Aug-09 8:37
jashimu20-Aug-09 8:37 
QuestionDraw smooth text on Transparent bitmap Pin
xstoneheartx20-Aug-09 0:47
xstoneheartx20-Aug-09 0:47 
How can I draw smooth text on a transparent bitmap using GDI functions?
What I do is:
1- Creating myBitmap
2- Creating Graphics object from myBitmap
3- Getting bitmap hDC
4- Setting background mode to TRANSPARENT
5- Drawing text using DrawText function
6- Releasing bitmap HDC
7- Saving Bitmap
The result is an ugly text! the text is not smoothed but when I set background mode to OPAQ using SetBkMode the result is smoothed.
How can I draw smooth text on a transparent bitmap using GDI functions?

any help will be appreciated.

My code is like this:
Bitmap myBitmap=new Bitmap(100,100,Format32bppArgb);<br />
Graphic g=Graphics.FromImage(myBitmap);<br />
IntPtr hDC=g.GetHDC();<br />
SetBkMode(hDC, TRANSPARENT);<br />
DrawText(hdc, "Test", -1, myrectangle,myflags);<br />
g.ReleaseHdc(hDC);<br />
myBitmap.Save("myBitmap.png",ImageFormat.Png);


modified on Thursday, August 20, 2009 6:54 AM

AnswerRe: Draw smooth text on Transparent bitmap Pin
Luc Pattyn20-Aug-09 14:52
sitebuilderLuc Pattyn20-Aug-09 14:52 
GeneralRe: Draw smooth text on Transparent bitmap Pin
xstoneheartx21-Aug-09 3:07
xstoneheartx21-Aug-09 3:07 
QuestionConvert GlyphIndex to Unicode Pin
xstoneheartx19-Aug-09 23:57
xstoneheartx19-Aug-09 23:57 
QuestionGraphicsPath.AddString Pin
xstoneheartx19-Aug-09 23:56
xstoneheartx19-Aug-09 23:56 
QuestionData in Arrays Pin
VikashGohil12-Aug-09 22:03
VikashGohil12-Aug-09 22:03 
AnswerRe: Data in Arrays Pin
Richard MacCutchan4-Sep-09 0:30
mveRichard MacCutchan4-Sep-09 0:30 
QuestionRead 1000 Lines from text file in a single shot ........ Pin
spalanivel11-Aug-09 6:47
spalanivel11-Aug-09 6:47 
AnswerRe: Read 1000 Lines from text file in a single shot ........ Pin
teejayem11-Aug-09 10:23
teejayem11-Aug-09 10:23 
QuestionInstall x64 & x86 managed assemblies in GAC Pin
Jason Newell10-Aug-09 11:42
Jason Newell10-Aug-09 11:42 
QuestionRead text file line by line.... c++ Pin
spalanivel8-Aug-09 7:22
spalanivel8-Aug-09 7:22 
AnswerRe: Read text file line by line.... c++ Pin
Luc Pattyn8-Aug-09 8:02
sitebuilderLuc Pattyn8-Aug-09 8:02 
AnswerRe: Read text file line by line.... c++ Pin
Mark Salsbery10-Aug-09 9:49
Mark Salsbery10-Aug-09 9:49 
QuestionCommand Write in to separate text file... Pin
spalanivel5-Aug-09 22:33
spalanivel5-Aug-09 22:33 
AnswerRe: Command Write in to separate text file... Pin
N a v a n e e t h6-Aug-09 17:36
N a v a n e e t h6-Aug-09 17:36 
QuestionC++ DLL Dependancy (Microsoft VC80 version) [modified] Pin
davejsmith5-Aug-09 8:24
davejsmith5-Aug-09 8:24 
AnswerRe: C++ DLL Dependancy (Microsoft VC80 version) Pin
davejsmith6-Aug-09 10:59
davejsmith6-Aug-09 10:59 
QuestionOpen Excel in C++ Builder Pin
memorexr3-Aug-09 5:08
memorexr3-Aug-09 5:08 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.