Click here to Skip to main content
16,004,944 members
Home / Discussions / C#
   

C#

 
Generalrefreshing listview content Pin
Paolo Ponzano9-Apr-04 7:35
Paolo Ponzano9-Apr-04 7:35 
GeneralRe: refreshing listview content Pin
Heath Stewart9-Apr-04 7:54
protectorHeath Stewart9-Apr-04 7:54 
GeneralRe: refreshing listview content Pin
Paolo Ponzano9-Apr-04 19:45
Paolo Ponzano9-Apr-04 19:45 
GeneralDrawing RichText on a GDI+ surface Pin
Judah Gabriel Himango9-Apr-04 7:27
sponsorJudah Gabriel Himango9-Apr-04 7:27 
GeneralRe: Drawing RichText on a GDI+ surface Pin
Heath Stewart9-Apr-04 7:53
protectorHeath Stewart9-Apr-04 7:53 
GeneralRe: Drawing RichText on a GDI+ surface Pin
Judah Gabriel Himango9-Apr-04 8:18
sponsorJudah Gabriel Himango9-Apr-04 8:18 
GeneralRe: Drawing RichText on a GDI+ surface Pin
Judah Gabriel Himango9-Apr-04 9:41
sponsorJudah Gabriel Himango9-Apr-04 9:41 
GeneralRe: Drawing RichText on a GDI+ surface Pin
Heath Stewart9-Apr-04 10:04
protectorHeath Stewart9-Apr-04 10:04 
Forget about all the painting-related stuff in the article (the code at the bottom of the article). The important thing is giving the FORMATRANGE.hdc field a valid HDC and passing that struct to the RichTextBox*. It will paint the RTF in that range to the HDC. This device context handle could come from the container control that contains all your little drawing helpers, or they could create their own (though that'd be a little less efficient, but it depends on your circumstances.

* You could use a single RichTextBox to help you paint all your RTF. So long as it's not visible nor added to a container control's Controls property collection, it should be pretty efficient and certainly takes care of the task of parsing and painting the RTF to a device context.

Keep in mind, however, that the RichTextBox merely encapsulates the Rich Edit common control. If you wanted, you could encapsulate that with your own little bare-bones control, just enough to wrap and create the proper window class, or - even better - use Windowless Rich Edit Controls[^].

 

Microsoft MVP, Visual C#
My Articles
GeneralFtpServer Pin
Member 7326719-Apr-04 6:26
Member 7326719-Apr-04 6:26 
GeneralRe: FtpServer Pin
Nick Parker9-Apr-04 6:43
protectorNick Parker9-Apr-04 6:43 
GeneralVertical toolbar Pin
mcgahanfl9-Apr-04 5:33
mcgahanfl9-Apr-04 5:33 
GeneralRe: Vertical toolbar Pin
Heath Stewart9-Apr-04 7:02
protectorHeath Stewart9-Apr-04 7:02 
GeneralRe: Vertical toolbar Pin
mcgahanfl12-Apr-04 2:37
mcgahanfl12-Apr-04 2:37 
GeneralCrystal Reports Merge Modules Pin
kornstyle9-Apr-04 4:36
kornstyle9-Apr-04 4:36 
GeneralRe: Crystal Reports Merge Modules Pin
Heath Stewart9-Apr-04 7:08
protectorHeath Stewart9-Apr-04 7:08 
GeneralRe: Crystal Reports Merge Modules Pin
kornstyle9-Apr-04 10:28
kornstyle9-Apr-04 10:28 
GeneralRe: Crystal Reports Merge Modules Pin
kornstyle9-Apr-04 10:32
kornstyle9-Apr-04 10:32 
GeneralRe: Crystal Reports Merge Modules Pin
Heath Stewart9-Apr-04 10:38
protectorHeath Stewart9-Apr-04 10:38 
GeneralMDI MinimizeBox MaximizeBox Pin
TweeZz9-Apr-04 4:29
TweeZz9-Apr-04 4:29 
GeneralRe: MDI MinimizeBox MaximizeBox Pin
Heath Stewart9-Apr-04 7:17
protectorHeath Stewart9-Apr-04 7:17 
GeneralRe: MDI MinimizeBox MaximizeBox Pin
TweeZz9-Apr-04 8:51
TweeZz9-Apr-04 8:51 
GeneralRe: MDI MinimizeBox MaximizeBox Pin
Heath Stewart9-Apr-04 9:00
protectorHeath Stewart9-Apr-04 9:00 
GeneralEncapsulating SQL Server triggers Pin
gkrish59-Apr-04 3:03
gkrish59-Apr-04 3:03 
GeneralRe: Encapsulating SQL Server triggers Pin
Heath Stewart9-Apr-04 3:42
protectorHeath Stewart9-Apr-04 3:42 
GeneralRe: Encapsulating SQL Server triggers Pin
gkrish59-Apr-04 5:20
gkrish59-Apr-04 5:20 

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.