From: shubhishubhi on 6 Jan 2010 10:44 I want to display normal and state images in my tree control from image list. Generally, treectrl displays checkbox first in a row and it then displays the normal image. Is it possible to reverse this order i.e. to show normal image before the state image ?
From: Ajay Kalra on 6 Jan 2010 11:27 On Jan 6, 10:44 am, shubhishubhi <shubhishu...(a)discussions.microsoft.com> wrote: > I want to display normal and state images in my tree control from image list. > Generally, treectrl displays checkbox first in a row and it then displays the > normal image. Is it possible to reverse this order i.e. to show normal image > before the state image ? I am not fully certain but you may be able to do it using NM_CUSTOMDRAW. -- Ajay
From: Tom Serface on 6 Jan 2010 13:16 Maybe something like this would work for you, or at least give you some ideas: http://www.codeproject.com/KB/tree/CRHTree.aspx Tom "shubhishubhi" <shubhishubhi(a)discussions.microsoft.com> wrote in message news:650D2A4F-CD66-47A3-B1F5-AC64EE9BFA68(a)microsoft.com... > I want to display normal and state images in my tree control from image > list. > Generally, treectrl displays checkbox first in a row and it then displays > the > normal image. Is it possible to reverse this order i.e. to show normal > image > before the state image ?
From: rahul on 6 Jan 2010 23:50 On Jan 6, 11:16 pm, "Tom Serface" <t...(a)camaswood.com> wrote: > Maybe something like this would work for you, or at least give you some > ideas: > > http://www.codeproject.com/KB/tree/CRHTree.aspx > > Tom > > "shubhishubhi" <shubhishu...(a)discussions.microsoft.com> wrote in message > > news:650D2A4F-CD66-47A3-B1F5-AC64EE9BFA68(a)microsoft.com... > > > I want to display normal and state images in my tree control from image > > list. > > Generally, treectrl displays checkbox first in a row and it then displays > > the > > normal image. Is it possible to reverse this order i.e. to show normal > > image > > before the state image ? > > U can subclass CTreeCtrl and do your own painting for each item in your own way
From: Ajay Kalra on 7 Jan 2010 09:54 On Jan 6, 11:50 pm, rahul <hyrahu...(a)gmail.com> wrote: > U can subclass CTreeCtrl and do your own painting for each item in > your own way Thats precisely why NM_CUSTOMDRAW was introduced. Its more structured and lets you draw the portion of the control that you want to draw as opposed to the painting of the whole control. -- Ajay
|
Pages: 1 Prev: Set width of an Cedit control based on required characters Next: CString::GetLength error |