ListView question #3

Hi,

I've searched on internet to find some tips how to detect when a ListView:

- draw the headers (if it is header, and for which column)
- draw the rows (which row / index)
- draw items (to which column belongs the drawed item)

i've read some articles about subclassing WndProc. I've checked that way 
but it's huge amount of time spent and result is really poor :-(
i would like to know if there is not another way...a little bit easier

Topics behind that are :
- allow different types of items (not only text, but also progress bars, 
spinboxes,..)
- Customize the header (image, color, and so on...)


thanks a lot,
Al.
0
nospam709 (49)
2/8/2007 4:08:28 PM
vc.mfc 33608 articles. 0 followers. Follow

2 Replies
666 Views

Similar Articles

[PageSpeed] 52

Have you read these articles?

Header control customization:
http://www.codeproject.com/listctrl/headerctrl.asp
http://www.codeproject.com/listctrl/skinlist.asp


For row/item drawing customization take a look at NM_CUSTOMDRAW
Here is an example:
http://www.codeproject.com/listctrl/quicklist.asp

AliR.

"--== Alain ==--" <nospam@noemail.com> wrote in message 
news:%234ypet5SHHA.5100@TK2MSFTNGP06.phx.gbl...
> Hi,
>
> I've searched on internet to find some tips how to detect when a ListView:
>
> - draw the headers (if it is header, and for which column)
> - draw the rows (which row / index)
> - draw items (to which column belongs the drawed item)
>
> i've read some articles about subclassing WndProc. I've checked that way 
> but it's huge amount of time spent and result is really poor :-(
> i would like to know if there is not another way...a little bit easier
>
> Topics behind that are :
> - allow different types of items (not only text, but also progress bars, 
> spinboxes,..)
> - Customize the header (image, color, and so on...)
>
>
> thanks a lot,
> Al. 


0
AliR3470 (3235)
2/8/2007 4:52:01 PM
You shouldn't care about when the control draws anything.  If you do care, then you want
to look into owner-draw/custom-draw options, which means that you will not find out "when
it draws", you will be called to DO the drawing.

WndProc would never enter the picture.

It sounds like you want custom-draw.
				joe

On Thu, 08 Feb 2007 17:08:28 +0100, --== Alain ==-- <nospam@noemail.com> wrote:

>Hi,
>
>I've searched on internet to find some tips how to detect when a ListView:
>
>- draw the headers (if it is header, and for which column)
>- draw the rows (which row / index)
>- draw items (to which column belongs the drawed item)
>
>i've read some articles about subclassing WndProc. I've checked that way 
>but it's huge amount of time spent and result is really poor :-(
>i would like to know if there is not another way...a little bit easier
>
>Topics behind that are :
>- allow different types of items (not only text, but also progress bars, 
>spinboxes,..)
>- Customize the header (image, color, and so on...)
>
>
>thanks a lot,
>Al.
Joseph M. Newcomer [MVP]
email: newcomer@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
0
newcomer (15972)
2/8/2007 9:56:37 PM
Reply:

Similar Artilces:

CRM 3.0 How to add statuscode values to activity
Hi, I want to add custom statuscode values to the activity entity. I tried to edit the values of the statuscode using the system customization of attributes. I did the following Settings->customization->Activity->Attributes->statuscode. I get the "Attribute: Staus Reason of Activity" screen. However, all the fields are read-only... I am not allowed to add any additional statuscodes.... can anyone of you help me.... Thanks in advance Prasad Hi Prasad! Prasad wrote: > I want to add custom statuscode values to the activity entity. I > tried to edit th...

Sumproduct question and why cant I find my previous questions?
First...why can I not find my previous posts? Is there a trick to finding them? Second.....I have a long list of data with a date field, I want to be able to sum it up by month and year. So in one tab I have the raw data by date. In another tab, what I want to be able to do is: Year 2009 2010 Month Jan ??? ??? Feb ??? ??? Mar ??? ??? Thanks Apr May "First...why can I not find my previous posts? Is there a trick to finding them?" One way to find them is to put your user name (Paul) i...

Excel Macro Question
I created a Macro in Excel using the macro record option. This macro does about 15 things to the spreadsheet. To explain my problem... I created a program in Access that downloads data to a table and then queries the table for certain information. I then created a macro that sends the query to an Excel spreadsheet. Once I open up the file in Excel it will prompt me whether or not I want to enable or disable the macros and when I select either option Excel crashes. I tried this on another computer and it said that the security level needed to be changed or I need a digital signature...

Mailbox corruption question
We are running a Windows 2003 domain with Exchange 2003 and Outlook 2003. I am the Network/Exchange administrator. I often have to open other people's mailbox to help them troubleshoot issues. However, from time-to-time I get an error saying: "Unable to display the filder. The Inbox folder could not be found". It seems that the mailbox is corrupt and I have to delete the box and create a new one. We can't even POP the box cause we can't connect to it. Anyone know what I can do to clean up the box and gain access? TIA, Clayton By the way, I do have th...

What does that pale blue envelope with a red question mark on it mean?
It shows up in the column marked "!". I have been using Money for years and never saw it once until this month, when it started appearing for a few of my transactions. I checked in Help but couldn't find anything about it. AL from the online help file Money detects if you enter similar transactions on multiple occasions and marks the transactions in the register with a <Blue envelope with red ?> to flag them as potentially recurring. These marked transactions will also be listed on the Accounts & Bills view of the Home page under Potential Recurring Transacti...

exch 2003 question ... please reply !
Please see my comments:- "Ben Winzenz [Exchange MVP]" wrote: > 1. Check DNS. Make sure that both servers can talk to each other (via both > hostname and FQDN). Make sure that message tracking (on both 5.5 and 2003) > is turned on. Once you have done this, what happens when you try and send a > message from 5.5 to 2003? What happens the other way? Do you get NDR's > right away? From the 5.5 server, can you telnet on port 25 to the 2003 > server? What about the other way? Can 2003 telnet to port 25 of 5.5? Jazzy: Message tracking is turned on an...

NDR Question (urgent)
I am going to be sending out a newsletter request today. I will be sending the message using a FROM field populated with a distribution group. The group's only member is another group of which I am a member (transitively I should get mail sent to the original group). I am also the group owner. In tests sending messages from testgroup@domain.com to a known bad email address I would expect by default (send delivery reports to message originator) the NDR messages would come to me or possibly come back to the group, and on to the members (the group of which I'm a member) but in fact t...

Notes field when upgrading from 1.2 to 3.0
Does the new date/time/user stamp in v3.0, effect existing contact notes when upgrading? -- dkeel ...

Question on transferring excel graphs to publisher
I have several graphs created in excel that I place in a newsletter in publisher each week. I am looking for a way to automate the process with a macro or VBA. If I could figure out a way to paste the graph somewhere that publisher could pick it up, I suppose this woudl work. However, any suggestions at all would be welcome. Constantly copy/paste/resize/prosition has to have some way to automate. Thanks ...

Frame question
Hi, In my C# web application, I have a LinkButton lbtnLogout on the Left.aspx. The whole page is composed of Left, Right, Top, Bottom 4 frames. The Left frame's function is for menu and login/logout, while the Right frame is the main page. How do I need to do so that when I click the lbtnLogout, the Left and Right frame will go to their original first page Left.aspx and Right.aspx? Thanks for help. Jason Jason Huang wrote: > Hi, > > In my C# web application, I have a LinkButton lbtnLogout on the Left.aspx. > The whole page is composed of Left, Rig...

Wizard property sheet questions
I'm implementing a bootstrap program (setup.exe) for a new installer that we're creating. Because of our requirements, we need to handle installation of the program suite's prerequisites prior to launching the actual installer, so we've come up with the idea of implementing some of the UI in the bootstrap program. What we need is to be able to implement a wizard-style property sheet without the welcome or completion pages. (Because we're using C++/MFC 8, we're implementing a mini-installer that would install the C++/MFC DLLs, if necessary, before launching the b...

Question #8
Hello, I was wondering if you can tell me how to back-up outlook emails to an "N-drive"? Also, how do you open them, once you have backed them up? I don't know how to open them with a pst extension. Thanks. Bill <Bill@discussions.microsoft.com> wrote: > I was wondering if you can tell me how to back-up outlook emails to an > "N-drive"? Also, how do you open them, once you have backed them up? > I don't know how to open them with a pst extension. Theer are a number of ways to copy files in Windows. One way is as follows: Close Outlook. Bro...

Another "mailto" question -- mailto link that puts body of emails like "reply" does?
This has come up again so thought I'd ask if there was code one could add to the "mailto" link to start new message that would add the email bodies in? I know this one is a long-shot, but since it's a 50/50 type of deal, thought I'd ask anyway. I need to do this when I send an email from home but that the recipient might like to respond to to my work email address. Up till now, I've just put a blurb with a "mailto" with my office email address and left it at that. I'm hoping to get a little more sophisticated, if that is indeed possible. Hopefully s...

Spam Filter question
Outlook 2003 Win XPPro SP 3, no Exchange Server Getting spam (mainly about Viagra) with the senders address munged to be the same as mine. I understand that the Spam filters on Outlook 2003 only work on sender's addy, or do I have this wrong? Anyway I can filter on subject (apart from the other filters built into Outlook)? You can create a filter for that word and set it to delete the mail. Also, make sure you don't have a contact created for yourself - if you do and have enabled the option to trust mail from addresses in your address book, your address is trusted a...

question related to Custom report
When I want to create a custom report should I create my Data Source directly from the model tables or there views which are dedicated to this issue? In the ORG_MSCRM database check out the Views which all named Filtered... e.g. FilteredContact Use these. Alex "Ahmed Maaloul" <AhmedMaaloul@discussions.microsoft.com> wrote in message news:6C82DA22-D6AE-41E4-A8D9-7ACC69363AB4@microsoft.com... > When I want to create a custom report should I create my Data Source > directly > from the model tables or there views which are dedicated to this issue? ...

Geometry Question
In days gone by I would have used Log tables but that's not very helpful in Excell so perhaps someone can guide me. I have a worksheet with 3 columns of data, the third of which is the Sine of an angle calculated from the other 2 columns. Having got the Sine how can I use Excel to work out the angle?? Pass me my Napier tables please!!!! Thanks in advance Mike Have you tried ASIN? Dan E "Mike Hughes" <m.l.hughes@ntlworld.com> wrote in message news:uT2VbpQYDHA.1748@TK2MSFTNGP12.phx.gbl... > In days gone by I would have used Log tables but that's not very helpfu...

Windows Server 2003 R2 Disk Quota questions
Does Windows Server 2003 R2 support setting quotas along with file filtering? For example, I want to set a quota on folder contains folders of User directories yet I don't want their PST archives to be included within their quota. -- sakamura ------------------------------------------------------------------------ sakamura's Profile: http://forums.techarena.in/members/154261.htm View this thread: http://forums.techarena.in/windows-server-help/1270482.htm http://forums.techarena.in You can't do that. But you can assign ownership of .pst files to some other ...

GIC (CD) Question
After reading other questions and responses reagrding the creation and management of CD's, I have the following question: I have been struggling to find the appropriate investmant to use for a Canadian GIC (guaranteed interest), another user suggested using CD's which seems to work fine. My employer deposits an amount monthly to a GIC which is locked in for 5 years at a pre-determined interest rate. This started just over 5 yrs ago, so they are starting to mature. Since then, my employer switched to bi-weekly desposits, so now I have new deposits every 2 weeks, and maturing...

Question on Backup Method
What is the problem on stopping Exchange Services manually and then backing up PRIV and PUB databases elsewhere? Then starting services back up. Just curious because things I've read say its better to have online backup - i.e. NTBackup. Is it because the Information Store down during this process? On Fri, 9 Jun 2006 11:27:28 -0500, "JD" <jd@yahoo.com> wrote: >What is the problem on stopping Exchange Services manually and then backing >up PRIV and PUB databases elsewhere? Then starting services back up. Just >curious because things I've read say i...

Hiding listview columns
What is the best practice for the user to choose what columns to hide? Is there a way to right-click the column header to show an option? -- Thanks. Hi Not sure if there is an easier way to do this When I've needed to do this I am already subclassing the form to control the form minimum size so it's not to tricky to add to the callback routine a trap for mouse down events on the listview, I can then check to see if the click was on the header (nominally the top 18 pixels, there is probably a method to find this out properly but I'm far too lazy to everyth...

Question about enumerate threads of process
Hi all I want to enumerate threads of a process in Winnt4. I know that Toolhelper lib can't work at Nt. someone tell me Psapi.dll also do the same thing. I check it at msdn, but found no function can work. can anybody tell me, how can i do that with psapi.dll. Thanks advance. sincerely. Take a look at the following KB article Q175030 - HOWTO: Enumerate Applications in Win32 -- Cheers Check Abdoul [ VC++ MVP ] ----------------------------------- "LiPei" <zxblp@163.com> wrote in message news:O3VW8T4bDHA.2940@TK2MSFTNGP11.phx.gbl... > Hi all > &g...

Item discount question
I'm running a promotion where if the customer spends more than $20 they get a free lb of ground beef or a free lb of chicken breast. The problem is the packages are often more than a pound. Is there a way to take $4.99 off of the price of ground beef if I scan a code (or coupon)? For example, the customer spends more than $20. They have a package of ground beef that is 1.21 lbs. with a price of $5.93 (4.99 a pound). I want the system to calculate the price to 0.94 cents. All input is greatly appreciated! This is a multi-part message in MIME format. ------=_NextPart_000_0DA7_0...

More of a backup question
Hi, I am doing some DR testing and have a question regarding backups using NetBackup. I assume someone else out there must be using it as well. I did a full backup of one of my storage groups and then did a mail store restore of a small store. Netbackup seemed to do everything correctly but I'm a bit confused by it's output. The file it gave me as my "restore" is a single file named exactly what my mail store is named and is the same size as the ..edb and .stm file combined. I assume all the data for the mail store is in this file (no extension / file type is ap...

Userproperty question
If I don't want to process certain emails is an Inbox folder, is one method of doing so while scanning the folder's emails is to check the value of a userproperty? For example, if the property doesn't exist, process it and add the userproperty else skip? That's one possible way. -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Professional Programming Outlook 2007. Reminder Manager, Extended Reminders, Attachment Options. http://www.slovaktech.com/products.htm "Salad" <salad@oilandvinegar.com> wrote in message news:MY...

ListView
Hi, I would like to know for you, which ListView is the best one ? - ListView from Editor toolbar - ListView from ActiveX - ListView from System namespace (windows::Forms) by the way, does anyone have an example how to use the ListView from System::Windows::Forms ? thx, Maileen I think it would depend on the environment you're working in. For example, if you are using MFC the CListView works just fine and is a reasonably thin layer over the Windows list control. If you are using Forms you will probably want to use that one (it's own version). I am not a fan of ActiveX controls...