From: AliR (VC++ MVP) on 29 Aug 2007 01:32 Its going to be very difficult to accomplish because of the way the list control scrolls. Here is an example of what I had to go through to make a listbox transparent: http://www.codeproject.com/combobox/TransListBox.asp AliR. "Scott Kraemer" <skraemer8(a)cox.net> wrote in message news:%23qss7Sf6HHA.536(a)TK2MSFTNGP06.phx.gbl... > Anyone have a example of how to make a CListCtrl Transparent? I see > example os setting a background image, but I want the image from my dialog > to show through. > > My attempts to set the extended style didn't work. I event tried to use: > SetWindowLong(m_chat.m_hWnd, GWL_EXSTYLE, WS_EX_TRANSPARENT); > > and that didnt work. I am guessing I have to use some sort of OwnerDraw. > > Thanks! > > Scott >
From: Tom Serface on 29 Aug 2007 10:54 I wanted to do something similar where I put a bitmap on the back of a list control when it didn't have any items in it and I just used a big bitmap button that I show or hide depending on the number of items in the list control (0 or more). You might find this to be an interesting approach, although I'm not a big fan of busy backgrounds like this article illustrates: http://www.czvc.com/tech/MFC%20Programmer's%20SourceBook/listview/background_image.shtml.htm Tom "Scott Kraemer" <skraemer8(a)cox.net> wrote in message news:%23qss7Sf6HHA.536(a)TK2MSFTNGP06.phx.gbl... > Anyone have a example of how to make a CListCtrl Transparent? I see > example os setting a background image, but I want the image from my dialog > to show through. > > My attempts to set the extended style didn't work. I event tried to use: > SetWindowLong(m_chat.m_hWnd, GWL_EXSTYLE, WS_EX_TRANSPARENT); > > and that didnt work. I am guessing I have to use some sort of OwnerDraw. > > Thanks! > > Scott >
From: David Ching on 29 Aug 2007 12:37 "Tom Serface" <tom.nospam(a)camaswood.com> wrote in message news:ef4SOyk6HHA.3264(a)TK2MSFTNGP02.phx.gbl... >I wanted to do something similar where I put a bitmap on the back of a list >control when it didn't have any items in it and I just used a big bitmap >button that I show or hide depending on the number of items in the list >control (0 or more). > > You might find this to be an interesting approach, although I'm not a big > fan of busy backgrounds like this article illustrates: > > http://www.czvc.com/tech/MFC%20Programmer's%20SourceBook/listview/background_image.shtml.htm > Doesn't the listview control now support background watermarks? -- David
|
Pages: 1 Prev: Template collection classes Next: LoadBarState() & SaveBarState() |