Click here to Skip to main content
15,887,340 members
Home / Discussions / C#
   

C#

 
GeneralRe: Regular Expression question Pin
Domenic Denicola1-Mar-03 11:17
Domenic Denicola1-Mar-03 11:17 
GeneralRe: Regular Expression question Pin
Daniel Turini2-Mar-03 2:47
Daniel Turini2-Mar-03 2:47 
GeneralSaving Treeview/Listview selections Pin
vlusardi28-Feb-03 10:06
vlusardi28-Feb-03 10:06 
GeneralRe: Saving Treeview/Listview selections Pin
Stephane Rodriguez.28-Feb-03 20:22
Stephane Rodriguez.28-Feb-03 20:22 
GeneralAdding MDAC and .net framework redistribution to an application. Pin
Anonymous28-Feb-03 9:58
Anonymous28-Feb-03 9:58 
GeneralRe: Adding MDAC and .net framework redistribution to an application. Pin
Stephane Rodriguez.28-Feb-03 20:15
Stephane Rodriguez.28-Feb-03 20:15 
GeneralOwnerDraw TreeView: OnPaint(...) Pin
STW28-Feb-03 4:49
STW28-Feb-03 4:49 
GeneralRe: OwnerDraw TreeView: OnPaint(...) Pin
Carlos H. Perez28-Feb-03 8:59
Carlos H. Perez28-Feb-03 8:59 
You cannot be using OwnerDrawn support and "ControlStyles.AllPaintingInWmPaint|ControlStyles.DoubleBuffer|ControlStyles.UserPaint" because they are two different, mutually exclusive things.

In Windows you usually can paint a control in three ways:

1- OwnerDraw which is when you handle the OnDrawItema and OnMeasureItem messages. In this situation the control ask you to do the drawing of a particular item at right time. Some of the oldest controls support this techinque: menus, combo box, etc.

2- Custom draw. This is a more fine grained version of the OwnerDraw version, here you have the oportunity to draw just part of the item instead of assumming full resposabilty for the whole drawing. Some of the more sophisticated common controls support this technique: TreeView, ListView.

3-. User Paint: You do the whole drawing yourself. In this case you don't have any help but you have full control as to what to paint. This is what you need to use when you are going to write a control from scratch. This is by far the best technique to write powerful controls because you have totally control of the painting.

One last thing: how are you using OwnerDraw techinque for the TreeView control? As far as I known the TreeView control does not support OnMeasureItem or OnDrawItem methods. You could use CustomDraw but only if you hack the support yourselve using the fact that the .NET TreeView is just a wrapper for the native TreeView control in the Common Control library.

Regards,

Carlos H. Perez
GeneralRe: OwnerDraw TreeView: OnPaint(...) Pin
STW28-Feb-03 23:55
STW28-Feb-03 23:55 
GeneralRe: OwnerDraw TreeView: OnPaint(...) Pin
Anonymous5-Mar-03 8:39
Anonymous5-Mar-03 8:39 
GeneralRe: OwnerDraw TreeView: OnPaint(...) Pin
Anonymous8-Mar-03 1:22
Anonymous8-Mar-03 1:22 
GeneralRe: OwnerDraw TreeView: OnPaint(...) Pin
STW8-Mar-03 5:56
STW8-Mar-03 5:56 
GeneralReally annyone event fire order... Pin
Anonymous28-Feb-03 4:14
Anonymous28-Feb-03 4:14 
GeneralRe: Really annyone event fire order... Pin
Paul Riley28-Feb-03 4:22
Paul Riley28-Feb-03 4:22 
GeneralRe: Really annyone event fire order... Pin
James T. Johnson28-Feb-03 4:49
James T. Johnson28-Feb-03 4:49 
GeneralI'm look for a Treeview flicker free and owner draw Pin
STW28-Feb-03 4:12
STW28-Feb-03 4:12 
Questionis this one possible ? Pin
jtmtv1828-Feb-03 2:07
jtmtv1828-Feb-03 2:07 
AnswerRe: is this one possible ? Pin
leppie1-Mar-03 0:00
leppie1-Mar-03 0:00 
GeneralRe: is this one possible ? Pin
jtmtv181-Mar-03 10:58
jtmtv181-Mar-03 10:58 
GeneralRe: is this one possible ? Pin
leppie1-Mar-03 11:23
leppie1-Mar-03 11:23 
GeneralRe: is this one possible ? Pin
jtmtv181-Mar-03 11:46
jtmtv181-Mar-03 11:46 
GeneralRe: is this one possible ? Pin
leppie1-Mar-03 21:36
leppie1-Mar-03 21:36 
GeneralRe: is this one possible ? Pin
jtmtv181-Mar-03 22:50
jtmtv181-Mar-03 22:50 
GeneralRe: is this one possible ? Pin
leppie1-Mar-03 23:16
leppie1-Mar-03 23:16 
GeneralRe: is this one possible ? Pin
jtmtv181-Mar-03 23:26
jtmtv181-Mar-03 23:26 

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.