CListCtrl: Changing the Column Header Layout

Hi all,

I'm using a CListCtrl and I need another layout of the column header,
 - 2 lines of header text
 - changed background and forground colours
 - changeable y-Size

I that possible? I cannot find any information about.

Thanks in advance


8/26/2004 11:58:25 AM
vc.mfc 33608 articles. 0 followers. Follow

2 Replies

Similar Articles

[PageSpeed] 15

You should be able to get the header control and do anything with it you want. Go to the
MSDN, look under the topic "ClistCtrl class", and about 17 subitems into it there is a
topic called "header controls" which explains all this. GetHeaderCtrl is what you are
looking for.

On Thu, 26 Aug 2004 13:58:25 +0200, "Richard Rauch" <> wrote:

>Hi all,
>I'm using a CListCtrl and I need another layout of the column header,
> - 2 lines of header text
> - changed background and forground colours
> - changeable y-Size
>I that possible? I cannot find any information about.
>Thanks in advance

Joseph M. Newcomer [MVP]
MVP Tips:
newcomer (15972)
8/26/2004 2:54:39 PM
> I'm using a CListCtrl and I need another layout of the column header,
> especially
>  - 2 lines of header text
>  - changed background and forground colours
>  - changeable y-Size
> I that possible? I cannot find any information about.

Start here for
multiline header controls

For changing the header colors, you'll want to use CustomDraw.  It's the
easiest way to go about it.

There isn't too much information about it because it's not too common.  Most
people just go with the default style.


Alec S.
alec <@> synetech <.> cjb <.> net

8/28/2004 8:02:06 AM

Similar Artilces:

Selective Column deletion #2
Hi, I'm not real familiar with writing code in Excel, so my question is probably fairly simple. I'm working with Census data and before importing it into SAS I want to clean it up a bit in Excel. The problem is that the Census summary tables give me three columns of information (an upper, lower, and estimate), when I only need one (estimate). The matrices I work with a usually in the 52x2000 range, so it gets very tedious to delete them by hand. Can excel handle a 'delete if' or 'select if, then delete' type of command. something like: delete if (column(contains(uppe...

How Do You Change the Font of a Caption Word 2007
How do you change the default font for a caption in Word 2007? Thanks. (B^>)=]=[ Modify the Caption style. Here's one method: In the Styles pane (Ctrl+Alt+Shift+S), click the Manage Styles button. On the Edit tab, locate Caption and click Modify. In the Modify Style dialog box, make the desired changes. Click OK. If you want to transfer the modified style to the attached template, be sure to select "New documents based on this template" before clicking OK in the Manage Styles dialog. If/when you are prompted to save the template, choose to do so. --...

Headings change when sent to email recipeint #3
To Dave Peterson: Thanks for the reply. The spreadsheet is in .xls format, but I do not send it as a attachment. While in Excel, I click the "Send to" button and choose "Mai Recipeint." The ensuing email shows the spreadsheet in the email body. This allow the recipeint to view the spreadsheet without having Excel. There is n need to access the spreadsheet to change anything. It's informationa only. So, I guess you could say the spreadsheet is a type of .em format -- johnf4 ----------------------------------------------------------------------- johnf45's Profile:...

Change bars color
Hello, I have a dinamic chart to show the cash flow position, a scrool bar chagne the data to the past and to the future (estimate), what I am looking for is, to have an easy identification of the estimated period I would like to chage the color of the bar. I am using an Stacked Column chart with two variables. any Ideias? -- regards from Brazil Thanks in advance for your feedback. Marcelo What I usually do when I want to show a column chart with one color within a certain range and another color elsewhere, is create two series, one each color, and use formulas to change on series ...

Suppressing Report Headers or How to Report/Display Parent/Child/Granchild relationships
Ok, So, what I have done is create a set of tables that hold data about terms and their definitions. Each term (except the root term) have a parent. There are 5 tables: Root, Grandparents, Parents, Children and Grandchildren. The children of grandparents are stored in the Parents table, etc. So, I've created queries to rejoin all of this a table where the root and its metadata are in column 1-3, grandparents in 4-6, parents in 7-9, children in 10-12 and grandchildren in 13-15. The problem is that not every parent has a child. So, in the query results there are empty cells/values, that'...

Can the color of the Command Bar be changed?
When you open up a window to show the contents of a folder, just below the usual Menu Bar is the Command Bar with menus like "Organize" and "Views." That Command Bar has a sickly blue-green color. Is there any way to change the color of the Command Bar? At the very least, I would like that color to be less saturated. -- Steven L. ...

Format the columns 30 - 60
Wouldn't ya know after I built all of this the stupid columns are coming out as: >120, 120, 30, 60, 90 I need for them to look this way: 30, 60, 90, 120,>120 I know i've seen a post around here about this but I just couldn't find it again. Joe PS anybody seen a good course online for advanced pivot table training. I already did the Microsoft one. Joe "Anna Wood" wrote: > I need to add values in different columns of data based on due dates. > > Categories of data include: > Current Due Date (say, 2/1/09) > Grace Days (i.e...

CListCtrl Header height change??
CListCtrl Header height change?? Is it possible to change the height of a CListCtrl Header.? Thanks Markus ...

Change Campus to Inactive When There Are No Programs Listed.
I have a form for campuses, with a subform that lists all of the advisors for that particular campus. What I want to have happen is, if after deleting an advisor from the subform, I want the computer to automatically place a check mark in a box marked "Inactive" on the main form, but only if there are no other active advisors for that location. I've tried a number of different things, but nothing is working the way I want. Suggestions? Try this after backing up your database --- UPDATE [campuses] LEFT JOIN [advisors] ON [campuses].campusID = [advisors].campusID SET [campuses].I...

MFC requires C++ compilation (change the compilation setting to
c:\microsoft visual studio\vc98\mfc\include\afx.h(15) : fatal error C1189: #error : MFC requires C++ compilation (use a .cpp suffix) One of my vc6 project has the above error, I check the file, one of my file(myfile.c) include a file util.h which is written in MFC format including .h and .cpp file and all other files are written in c language ,are ..c file and do not have c++ syntax. I compile all the files separately, only the myfile.c have the above error. It seems that I need to change the compilation setting to c++ compile setting to meet the requirement of MFC Class. It seem...

Hi Is it possible to change the window style of a CDialog derived class dynamically ? Which method should be over-ridden ? Thanks. PreCreateWindow. You can't change most of the styles once the dialog is created. There is a constant confusion about this; only some styles, in some controls, can be changed dynamically. Unless otherwise determined, assume that styles cannot be changed dynamically. joe On Tue, 2 Sep 2003 15:44:41 +0530, "SteadySteps" <steadysteps(at)yahoo(dot)com> wrote: >Hi > >Is it possible to change the window style of a CDialog derived ...

Two-Column, Two Axes Chart
Hi Folks - I have some totals in this format: Unit Count Sum Marketing 25 300 Accounting 40 400 IT 100 1000 I'd like to make a Two-column, two-axes chart. When I change either Count or Sum series to the secondary axis, the columns become stacked. Is there a way to keep them as separate columns? Thanks. Michael - Jon ------- Jon Peltier, Microsoft Excel MVP Peltier Technical Services Tutorials and Custom Solutions _______ ...

Lookup one column and sum another column
Hi all,, Hope someone can help me with the following problem. I would like to look up Column C for a specific value (i.e. 19) and then sum the values in Column A that relates directly to the value of 19 in Column C. Thanks in advance. If you mean SUM() values in Column A that are in the same rwo as number 19's in Column C then try: =SUMIF(C1:C9,19,A1:A9) -- HTH Sandy In Perth, the ancient capital of Scotland and the crowning place of kings with "Maddoktor" <> wrote in message ...

Change Cell Background Colour
Some cells in my worksheet are fed from a dropdown (validation) menu. I would like the background colour of individual cells to change automatically depending on which item is selected from the menu. Is this possible with conditional formatting or VBA? I'm very familiar with VBA in Access but haven't yet ventured into the world of Excel/VBA. Could someone point me in the right direction please? TIA Terry WinXP/OXP (design) O2K (runtime) You can set up to four colors (normal background + 3 others) using Conditional Formatting. See XL Help. For more than three colors, check the arc...

Format a column for "True / False"?
Having come from Access I am used to creating a field (column) which can be a "yes\no" or "true\false" but which actually contains "0" or "-1" Is it possible to do this in excel, and is it possible to have a check box on the worksheet which will enter the value for me regards Roga Just use TRUE/FALSE in the column. If you pick a checkbox from the controls toolbox, and link that to a cell, that sets the cell value to TRUE/FALSE. -- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "roga" <...

Problems with CListCtrl
I'm having trouble with a CListCtrl object. I'm trying to automatically set the selected items of the list from my code. I try the following statement: m_List.SetItem (pos, 0, LVIF_STATE, NULL, 0, LVIS_SELECTED, LVIS_SELECTED, 0); The SetItem function returns non-zero, which supposedly means it was successful. However, I don't see any selection showing up. I even called RedrawItem on this list item, but it didn't help either. Anyone know about this? -Eric >I'm having trouble with a CListCtrl object. I'm trying to automatically >set the selected ite...

CTreeCtrl and CListCtrl problem
I use create a single document struct using MFC(explore style).The left of the window is CLeftView class(which inherit CTreeView).The right is CBrowserView which inherit CListView.I want to display the content of a directory in the right(CListview) when user click the item of the ctreectrl. In the LeftViw I add method "void CLeftView::OnClickItem (NMHDR* pNMHDR, LRESULT* pResult)" because I want to know which item be clicked by user. ////////////////Leftview////////////////////// CTreeCtrl& mtree=GetTreeCtrl(); HTREEITEM item=mtree.GetSelectedItem(); data=mtree.GetItemDat...

Changing Investment Names
Does anyone know how to change an Investment name throughout an account with one process? Like find and replace. Investments are like Payees or Categories or Accounts. They have Details pages. R-click on a transaction in that investment. Select the choice that goes to the investment details. Rename it. "Bobd7912" <> wrote in message > Does anyone know how to change an Investment name throughout an account with > one process? Like find and replace. Thanks! "Dick Watson&...

Title Block as a header?
I'd like to create header with my company title block. It was very eas to do in Word, but it doesn't look like the header function works th same way in Excel. Is there a way to use the draw function and impor pictures into the header like you do in Word -- mae177 ----------------------------------------------------------------------- mae1778's Profile: View this thread: xl2002 added support for pictures in the header (and footer). Or you could put the p...

Change default location in Publisher 2007
My research on the web seems to indicate that for some inexplicable reason it is not possible to change the default location in Publisher 2007. This is really annoying as every time I try to open a document Publisher looks in 'My documents' and not the folder I use. I found the following information on the web but when I click on 'Tools' in the 'Open dialogue box' I do not get the option to 'add to my places': "You can only add the folder to 'my places' and cannot choose a default file location in Publisher 2007. When you go to save the file,...

How do I change the SQL instance of CRM from local to a remote one
Hi, I have my crm installed on a local SQL instance. I want to change this to a remote instance. I will backup crm sql config db and my organization db (im talking only about the sql dbs,) and restore to the remote instance. Other than that, what else should I do ? Is this a hard procedure ? Thanks Dan Calinescu Check out the CRM redeployment process. Also make sure you restore the databases with exactly the same names ensuring case is matched as well. -- Rgds Michael MCDBA 2000 | MCITP DBA 2005 |MCBMSS "Dan" wrote: > Hi, > > I have my crm installed on a local...

script for change Mailbox permission
Hi all, I need to bulk change permission on 80 can I do? A script? ADSI Edit? what ever else? Many thanks... Andrea ...

SUMIF with multiple columns in sum range
I have an array that I need to sum multiple columns depending of the value in Col D. The ws containing the array is called 'data'. I must sum cols F,J,N,R,V,Z in rows 7-25. On another ws my formula is: =SUMIF(Data!$D$7:$D$25,$A4,Data!$F$7:$F$25) Of course this only gives me the sum of Col F. Is there a way to put the sum range in one formula? I want to avoid stringing a bunch of SUMIFs together. Thanks, Joe M One way... Assumes no TEXT entries in cols F,J,N,R,V,Z. =SUMPRODUCT(--($D$7:$D$25=$A4),$F$7:$F$25+$J$7:$J$25+$N$7:$N$25+$R$7:$R$25+$V$7:$V$25+$Z$7:$Z$25) -...

CListCtrl and sub item editting
Hi, Is it possible to implement CListCtrl sub item editting without creating a custom ctrl? I am using VS2003. TIA Tony >Is it possible to implement CListCtrl sub item editting without creating a >custom ctrl? Tony , There's no built-in support for this, so no, you have to provide some implementation for this. Have a look on sites such as CodeGuru and CodeProject, they'll have examples. Dave Thanks Dave, I've seen examples, I just wasnt sure if I needed my own ctrl. Regards Tony "David Lowndes" <DavidL@example.invalid> wrote in message news:k...

Excel 2003 Column Chart
Is there anyway to have a column chart show negative numbers above the category axis rather than below? and at the same time when the number is negative to have the column coloured (say) Red to Black? (A bit like conditional formatting I suppose) Sandy Hi, Here is an explanation of how to set the colours used in negative values. The category labels are best positioned out side the plot area in order to avoid clashing with the columns. Cheers Andy Sandy wrote: > Is there anyway to have a column chart show negative numbers above the &g...