Unable to fetch CListCtrl header information(Header title)

Hi,
I am trying to fetch header information(header title) of CListCtrl
using GetColumn function. GetColumn function is not populating the
LVCOLUMN structure.

I am running my code in release mode on Win2k and Win2k3 clients. I
have also attached the code snippet that I'm using..

Please let me know what is worng here..

Thanks..

code snippet :

int ColumnCount = m_ListCtrl.GetHeaderCtrl()->GetItemCount();

	LVCOLUMN col;
	col.mask = LVCF_TEXT;
	col.pszText = new(char[50]);
	TmpText = "";
    for (int j=0; j< ColumnCount; j++)
	{
		m_ListCtrl.GetColumn(j, &col);
		TmpText += (LPCTSTR)col.pszText;
		TmpText += "\t";
 		
	}
            
    TmpText += "\r\n";
    CopyText += TmpText;

0
nishantnow (15)
11/6/2006 2:08:03 PM
vc.mfc 33608 articles. 0 followers. Follow

2 Replies
401 Views

Similar Articles

[PageSpeed] 30

"NKH" <nishantnow@gmail.com> wrote in message 
news:1162822083.847622.283750@e3g2000cwe.googlegroups.com...
> Hi,
> I am trying to fetch header information(header title) of CListCtrl
> using GetColumn function. GetColumn function is not populating the
> LVCOLUMN structure.
>
> Please let me know what is worng here..
>
> LVCOLUMN col;
> col.mask = LVCF_TEXT;
> col.pszText = new(char[50]);
> m_ListCtrl.GetColumn(j, &col);

Maybe, "...the cchTextMax member must specify the size of the buffer"?
-- 
Jeff Partch [VC++ MVP]


0
jeffp (1712)
11/6/2006 2:23:11 PM
Hi,

Thanks for the reply..

Actually we are encountering this problem in Win 2K and Win 2K3 release
mode..In Win XP its working fine..
We have tried giving size of the buffer in cchTextMax..this did not
make a difference in Win XP..we shall try it in 2K and 2K3..

Thanks..

Jeff Partch wrote:
> "NKH" <nishantnow@gmail.com> wrote in message
> news:1162822083.847622.283750@e3g2000cwe.googlegroups.com...
> > Hi,
> > I am trying to fetch header information(header title) of CListCtrl
> > using GetColumn function. GetColumn function is not populating the
> > LVCOLUMN structure.
> >
> > Please let me know what is worng here..
> >
> > LVCOLUMN col;
> > col.mask = LVCF_TEXT;
> > col.pszText = new(char[50]);
> > m_ListCtrl.GetColumn(j, &col);
>
> Maybe, "...the cchTextMax member must specify the size of the buffer"?
> -- 
> Jeff Partch [VC++ MVP]

0
nishantnow (15)
11/7/2006 8:38:08 AM
Reply:

Similar Artilces:

Help New Headers
Hi i run a windows 2000 network, i am trying to set up Imap accounts for my users, they all have sufficient rights. When i create the account then try to recieve mail i get the following error: checking for mail: reported error (0x800ccc0e) : Could not fetch new headers in the folder inbox for account, Erro Unable to connect to server checking for mail: reported error (0x800ccc0e) : Could not fetch new headers in the folder(Null)for account, Erro Unable to connect to server Any help would be extremely grateful ...

Duplicate information
I am importing information from another program and I end up with duplicate rows of information in my spreadsheet. Is there some way to tell excel to eliminate duplicate rows either in the import process or afterward? Stephanie Data>Filter>Advanced Filter. Check "copy to a new location" and "unique records only" For more on this see Debra Dalgleish's site. http://www.contextures.on.ca/xladvfilter01.html Gord Dibben Excel MVP On Thu, 31 Mar 2005 11:52:16 -0800, "Stephanie" <anonymous@discussions.microsoft.com> wrote: >I am importing i...

Unable to open Outlook2003. Error: MAPI unable loading msncon.dll
I am trying to set up Outlook 2003 on home computer but keep getting the following message when trying to open application. MAPI was unable to load the information service msncon.dll. Since I am not open to open, I cannot get to the help feature. Please advise Have you downloaded the latest MSN Connector from their site? Or, if not using it, have you uninstalled it? Try opening Outlook in Safe mode (start->run->outlook.exe /safe) and go into the Advanced options and uncheck it from add-in manager or COM add-ins. --� Milly Staples [MVP - Outlook] Post all replies to the group to ...

Header must grow same amount as detail
I know this may seem odd, but honestly, this is what I need to make the layout proper. I have GroupHeader1. It Can Grow. I have GroupHeader2. It Can Grow. I have Detail. It Can Grow. The layout results in: GroupHeader1 GroupHeader2 Detail Item1 Detail Item2 Detail Item3 GroupHeader2 Detail Item1 Detail Item2 GroupHeader1 GroupHeader2 Detail Item1 The report requires a horizontal row at each Detail Item...

Unable to Edit/Add records on Form in a New ADP
I just started playing around with rebuilding a MDB file as an ADP. I built a form and subform from scratch, but I'm unable to edit or add records. SELECT Id, LoadDate, TrailerDOTNumber, SealNumber, SealDate, SealId, LoadLocation, LoadStatus, DispatchStatus, DispatchLocationId, DispatchUserId FROM TrailerActivityHeaders ORDER BY LoadDate Recordset Type: Updatable Snapshot I'm getting the 'This recordset is not updatable' Ideas? Never mind... (Does anyone have a spare bandage btw? I cut my head banging it on the wall due to my stupidity...) "D...

Unable to open calendar
Folks, i cannot open or view my calendar. When I start Oultook a Pop Up appears saying "Could not read the Calendar" On clicking Ok, the pop up vanishes and nothing happens. If i then go over to my calendar, it says "Cannot display the folder" I have run Oultook Diagnostics and nothing shows up as irregular. I ran the repair function (off my setuo CD) and nothing happened. I also re-installed Outlook and rebooted my comp and nada. When staring in safe mode i also get he same errors. I am using Off 2007, Win 7 TIA, P "phamiltonsmith" <...

Prevent information copied in one Excel window to be pasted in another windows
Hello. Since Excel is not multicore aware, I am forced to have two different windows running Excel, ie, i start Excel in one window and start another session of Excel in another window, not in the same window by doing file\new). But since I am running macros in each, and because my macro copy and paste information, sometime the windows interfere ith each other which prevent one of the macro from running. Is there a way to make Excel not able to paste in another window? Thanks for the tip. ...

Publisher and different headers
Using Publisher, how do I create different headers between pages? The section breaks don't seem to help. cmatson <cmatson@discussions.microsoft.com> was very recently heard to utter: > Using Publisher, how do I create different headers between pages? The > section breaks don't seem to help. If you want a different header on each page, then it is not headers and footers that you really need, just a text box on each page with different content. If it is only every so often, then multiple Master Pages may be your thing. This requires Publisher 2003. -- Ed Bennett -...

Possible to change chart title and label box widths?
This seems like a basic question, but is it possible to change the width of chart tables or series labels? I can select the label text boxes, but I can't resize the text boxes. >From searching the forum, it appears that for some reason Excel doesn't let you change the widths?! Any creative solutions? Thanks. John You could delete the built in chart text elements (chart title, axis titles, data labels) and insert text boxes instead. Select the chart before clicking on the text box button, so the text box becomes part of the chart, not just another floating graphic element. ...

unable to download emails and unable to stop synchronization
I am going to try one more time to get this fixed. My Outlook 2003 has been unable to download emails. While it is trying, a small box in the tray section shows up and it states that it is trying to synchronize folders. After a time out time Outlook gives me errors. This is the error message. It has these numbers 0X800CCC15 , or 0X8004210A, or 0X8004210B, which these error messages state that either I did not have enough timeout or look and see if server name is wrong. All of you have given me these suggestions. no joy. Thank you very much however. I went ahead and finally found a sect...

unable to scroll the page
on microsoft office frontpage 2003 - when i up loaded my web pages to my web site www.millertimeauction.com , there is no sroll bar for up & down of page - any help what browser? it scrolls for me in IE8 scroll bar will only appear if it needs to -- ~~~~~~~~~~~~~~~~~~ Rob Giordano Microsoft MVP Expression Web "FrontPage Error" <FrontPageError@discussions.microsoft.com> wrote in message news:EC19C7CE-1C5A-4872-A47B-2C04BD7E96A7@microsoft.com... > on microsoft office frontpage 2003 - when i up loaded my web pages to my > web > s...

Formatting As Table with OUT header row formatting
I am on Windows XP and Excel 2007. I would like to be able to just format Data rows, however, when I Format As Table, it insists on using a header row or creating one for me. Because it also automatically turns on filtering for the header column it totally screws up my column widths! I have worked hard on these widths and do not want them to change. My end goal is to apply every other row shading that changes to maintain the everyother row shading when I insert or paste rows in the middle somewhere. Thanks in advance for your help, magmike On 1/3/2012 2:30 PM, magmike wrote: > I am on W...

Show names and present/absent information
Dear all, I am looking for a solution to show information about logged-on users. We already store phone and address information in Active Directory on our Windows Server 2003 network, so we can retrieve that from there. And we should be able to retrieve information about users being logged on from the Event Logs. I would like to be able to show that information on some screen in Microsoft Outlook 2003. I think the solution has to do the following: 1. Get present/absent information from the Event Logs. 2. Get phone and address information from Active Directory. 3. Show the names, present/abse...

Worksheets not retaining information
I created a worksheet "250" and then I clicked on approved, I reopened to look at the information because after I tried to run this for over an hour the worksheet did not go through in HQ Client and noticed that the information including the department were gone so there was only a blank worksheet, I tried to run it again and it keeps adding the department over and over everytime I tried and after clicking approve the same thing happens again and again. Also I tried running a different type and it does the same. Is anyone else having this problem? ...

Unable to start POP3, NNTP, IMAP4...
Dear all, I'm evaluating to install Exchange 2003. After the installation I find the said protocol haven't been started. I tried to start them in "Servers --> Server Name --> Protocols" but no help. Please comment.... Thanks!! Background: Windows 2003, Exchange 2003, Active Directory DC with all roles of FSMO as it's the first DC in the forest. Thank you very much!! -- Are you boring? Let's come to talk together... ^^ news://news.hk4u.com/hk4u.2hit6 Those services are disabled by default in Exchange 2003. Go to Administrative Tools, Services and enable...

Unable to conect
Hi, I have set up my email account to work with aol using the guidlines for outlook 2002 but it is still unable to connect. Any suggestions? Thanks. John <John@discussions.microsoft.com> wrote: > I have set up my email account to work with aol using the guidlines > for outlook 2002 but it is still unable to connect. Any suggestions? Since you pay AOL for their service, my suggestion is to ask AOL. -- Brian Tillman ...

Unable to click on charts & unable to create any new charts Excel
Hi Just started using Microsoft Excel 2007 and I seem to have done something that means the chart option is unavailable. The chart section is now grey and all charts I have created are 'locked' I cannot click on them anywhere. I'm working on a project and need it finished by Monday. Do you mean that if you click on a chart it does not get a border to show it is activated and there are no range-finder borders around the data that makes the chart? This is a bit odd. Have you tried a new workbook to see if the problem is with just this one? My advice with all odd things is...

Lookup Values, etracting Row header and column header.
Hi all, I have a dat matrix having 100 rows and 100 columns. The data is dynamic and keeps changing. 3500 3550 3600 3650 3700 3550 - - - - 3600 - - - - 3650 - - - - 3700 - - - - 3750 - - - - 3800 - 20 - - 3850 - - - - 3900 - - - 15 For eg: the data in row 3800 and column 3600 shows a value of 20. Is there any function by which i can extract any positive values in the data matrix such that it gives a summary in another worksheet: # Row Column Value 1 3800 3600 20 2 3900 3700 15 Note: th...

Strip/Modify Mail headers (not telnet banner)?
Hi all, Is there anyway to strip or modify the headers (not banner seen when telnetting) that are sent in an email via Exchange Server? As you all know, information (possibly about the internal network) is disclosed with every email generated as is displayed in the headers (Exchange Server Name, IP Address, Version). These headers can be used as a recon activity by "baddies". If this can't be done in Exchange, can someone please recommend a thrid party solution that would allow us to modify these headers? Thanks! In my opinion, only the paranoid need be worried about such ...

I am unable to send e-mails -unable to download files from IMAP.
Please help. I am so frustrated with this In news:4564BC25-92D9-4094-A598-A23848856E5F@microsoft.com, ajmtextiles <ajmtextiles@discussions.microsoft.com> typed: > Please help. > > I am so frustrated with this I can understand why you might be frustrated, but you've provided no useful information for anyone to go on, so I doubt anyone can help you. When you post in here, always include your version, SP level, and mode (if applicable) of Outlook - you can find this information in Help | About. Also include the type of mail account(s) you use and any other pertinent de...

MSXML6 C++ unable to locate node
Hi, I am new to using the MSXML functions in C++. I found this on MSDN as an example of what I wanted to do, http://msdn2.microsoft.com/en-us/library/ms765465.aspx. I have tried a number of XPATH examples to try and retrieve the "><Code>12455</Code>", but have been unable to do so. The MSDN example works fine. So, I am wondering if it's a namespace issue? Any help would be appreciated. Thanks. Jeff I have changed the code as follows: int _tmain(int argc, _TCHAR* argv[]) { CString sResponse = "<?xml version=\"1.0\" encoding=\"utf...

Download Free Church Information System , built in MS Access
Download Free Church Information System , built in MS Access , its in the ATTACHMENTS , after registering it will appear : http://access-forum.com/plus/viewtopic.php?t=189 Enjoyt ... ...

Excel Copy and Paste Custom Header and Footer
1. Enter an Excel Workbook complete with 2 worksheets. 2. Sheet1 has a set of custom header and footer. 3. Please show that the custom header and footer of Sheet1 could be Copy-and-Paste'd onto Sheet2. 4. Regards. Try the following code: Worksheets("Sheet2").PageSetup.LeftHeader = _ Worksheets("Sheet1").PageSetup.LeftHeader -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com <tkt_tang@hotmail.com> wrote in message news:1136939976.818751.135180@g47g2000cwa.googlegroups.com... > 1. Enter an Excel Wor...

Displaying Parameters in the Report Title
I would like to have a dynamic Report Title that includes the Start_Date and End_Date parameters I have for a report. I have had no luck finding this information elsewhere on the internet. So, the report title would be "Number of Letters between @Start_Date and @End_Date" Thanks. Use the expression builder. This is very common thing to do. Select expression for the text box. Put in =""Number of Letters between " & Then select the parameter that you are interested in. -- Bruce Loehle-Conger MVP SQL Server Reporting Services "CSwa...

'OWA was unable to get to your inbox'
Hello, OWA is working fine for everyone on my domain (and has been for years) except for one person. When he logs in it gives the error mentioned above in the subject line. I've checked his exchange account and it doesn't seem to differ from anyone else's... Does anyone know how to solve this problem? Thanks, John Repost in an Exchange group as OWA is a function of Exchange, not Outlook. When you do, include the Exchange/Windows versions, and SP-level for each. -- Milly Staples [MVP - Outlook] Post all replies to the group to keep the discussion intact. Due to the (in...