Thumbnail of text document

Thumbnail of text document

Post by Sameer Kha » Wed, 02 Jul 2003 21:11:40



Hi,

I tried creating a thumbnail of a text document and I using TextOut api to
draw the contents of the file in a bitmap. However I would like to wrap the
contents within the bitmap. Any advice to achieve this.

Sameer

 
 
 

Thumbnail of text document

Post by Jim Barr » Wed, 02 Jul 2003 22:51:15



> I tried creating a thumbnail of a text document and I using TextOut api to
> draw the contents of the file in a bitmap. However I would like to wrap the
> contents within the bitmap. Any advice to achieve this.

Try DrawText with DT_WORDBREAK.

--
Jim Barry, MVP for Windows SDK
"For bureaucratic reasons, we settled on one issue, weapons of mass
destruction, because it was the one reason everyone could agree on."
Paul Wolfowitz, US Deputy Defence Secretary

 
 
 

Thumbnail of text document

Post by Sameer Kha » Thu, 03 Jul 2003 16:39:47


Thanks Jim for the snippet .....
I am facing another problem .... I want to set the backgound color of my
thumbnail to yellow.
I tried using floodfill to set the bkcolor to yellow but it remains
white.... Is it possible to change the color?

Try DrawText with DT_WORDBREAK.

--
Jim Barry, MVP for Windows SDK
"For bureaucratic reasons, we settled on one issue, weapons of mass
destruction, because it was the one reason everyone could agree on."
Paul Wolfowitz, US Deputy Defence Secretary

 
 
 

Thumbnail of text document

Post by Jim Barr » Thu, 03 Jul 2003 20:44:51



> I am facing another problem .... I want to set the backgound color
> of my thumbnail to yellow.

Set the background colour or change the background mode to transparent. See SetBkColor and SetBkMode. Flood filling is totally unnecessary.

--
Jim Barry, MVP for Windows SDK