Resizing columns in CHeaderCtrl

Hello,

How can I resize columns in CHeaderCtrl so that their width is equal to the
width in pixels of header string?

Regards,
Vladimir.


0
genisoft (3)
9/15/2003 8:48:53 AM
vc.mfc 33608 articles. 0 followers. Follow

1 Replies
895 Views

Similar Articles

[PageSpeed] 40

I think this was answered well in comp.os.ms-windows.programmer.win32

On Mon, 15 Sep 2003 14:48:53 +0600, "Vladimir" <genisoft@ufacom.ru>
wrote:

>Hello,
>
>How can I resize columns in CHeaderCtrl so that their width is equal to the
>width in pixels of header string?
>
>Regards,
>Vladimir.
>
>

-----------------------------------------
To reply to me, remove the underscores (_) from my email address (and please indicate which newsgroup and message).

Robert E. Zaret
PenFact, Inc.
500 Harrison Ave., Suite 3R
Boston, MA 02118
www.penfact.com
0
r_z_aret (8)
9/15/2003 4:31:05 PM
Reply:

Similar Artilces:

Multi-column lookup
Lets say I have a table with 3 columns of independent variables and one column of dependent data. An example might be: Shape Color Size Price ------------------------------- Square Red Small 1.50 Circle Green Med 2.00 Triangle Green Small 4.50 How do I lookup the price of (say) a Medium Green Circle? =INDEX(Price_Range,MATCH(1,(Size_Range="Med")*(Colour_Range="Green")*(Shape_Range="Circle"),0)) entered with ctrl + shift & enter change the hard coded values like "Green" etc to cell references where you would ...

Adding up a column in a worksheet
I'm having trouble figuring how to add up a column that meet a condition in Sheet1 and having the results show in Sheet 2. Example of what I'm trying to do: Month Amount Category Jan 523.00 JOB1 Jan 121.00 JOB2 Jan 75.00 JOB1 Any assistance would be greatly appreciated, Thanks, Maybe something like this: Sum of Job1 for Jan: =SUMPRODUCT(--(Sheet1!A1:A100="Jan"),--(Sheet1!C1:C100="Job1"),Sheet1!B1:B100) -- Biff Microsoft Excel MVP "Joseph" <Joseph@...

problem with resizing
Hi! I'm writing a MDI application. Child window is splitted in three panes. In the one pane I've got a FormView with some buttons. How to do, that this FormView was in the center of a pane (even during resizing )? And the second problem, how to do, that during resizing, splitters dividing window were always in the same places? Please, help me. I would be appreciate. bart ...

Determine a result of one column based on conditions in two column
Example Col A Col B Count the number of a's in Col B only when an x is in Col A x a x a Result should be 2 y a z p I can't figure it out x t x m Thanks try this =SUMPRODUCT(--(A2:A7="x"),--(B2:B7="a")) -- Hope this help Please click the Yes button below if this post have helped answer your needs Thank You cheers, francis "tel703" wrote: > Example > Col A Col B Count the number of a...

resizing problems
I am using OpenGL in my MFC app. The problem is when I resize the window from the left or top border the whole scene of my OpenGL moves even before my OnPaint event handler is called and when my OnPaint is called after this it repaints the scene so this produces a flicker. If, however I resize the window from the right or bottom border this problem doen't occur. Can anybody please tell me what is happening? Thank you ...

5 columns numbers find lo-hi & % change..
got it? my way would be a long equation.. have (to-fm)/fm% for %change, Thanks ...

Bitmap resize on same DC
I am a little be confused! I have a custom control with a bitmap inside I create the bitmap with this code ************************************************* CClientDC dc(this) ; if (m_dcGrid.GetSafeHdc() == NULL) { m_dcGrid.CreateCompatibleDC(&dc) ; m_bitmapGrid.CreateCompatibleBitmap(&dc, m_nClientWidth,m_nClientHeight) ; m_pbitmapOldGrid = m_dcGrid.SelectObject(&m_bitmapGrid) ; } ************************************************ and in OnPaint i have: ************************************************ CPaintDC dc(this) ; // device context for painting CDC memDC ; CBit...

Return Title to matched column
I have a spreedsheet of data. Bsically it contains various products and various suppliers. The products are listed down the left side and the suppliers along the top row. There is obviously more than one price per product ie from each individual supplier. I have set up a basic min function to return the cheapest price and a VERY complicated IF set of formulas to return the suppliers names at present. However my biggest problem at theminute is that i have more than 7 suppliesr and wish to simply get the minimum number in the row to be represented by the cheapest suppliers name in a set...

Column Heading Text Enlarged in Page Break Preview
I am using Excel 2000 on Win XP Pro and when I save a document in page break preview, close the document and reopen in page break preview, some of the column text/headings on the spreadsheet have a very large font that you cannot read them...when switching to normal view, the text of the column headings becomes the original font again...problem occurs intermittently, there are no page breaks in the document...also there is no special formatting for the column headings....anyone have ideas on what may be causing this? ...

Multiple stacked columns
Hiya, I want to create a stacked column chart comparing 2 sources of data: Stack1 (Data) Stack2 (Budget) Product A Product B Product C Product A Product B Product C Q1 10 50 12 15 45 15 Q2 14 55 11 16 50 14 Q3 23 43 9 20 40 10 Q4 1 4 0 ...

CStatic derived dialog and auto-resize
Hi, I would like to add auto-resizing feature to my Cstatic derived control. I mean when I load a bitmap I would like to adjust size dynamically. I tried to SendMessage WM_SIZE but it doesn't work. >I would like to add auto-resizing feature to my Cstatic derived control. I >mean when I load a bitmap I would like to adjust size >dynamically. >I tried to SendMessage WM_SIZE but it doesn't work. You can resize a window by using the SetWindowPos or MoveWindow APIs. Dave -- MVP VC++ FAQ: http://www.mvps.org/vcfaq ...

auto resize text without resizing cell in excel
format|cells|alignment tab|check "shrink to fit" Ferd wrote: -- Dave Peterson ...

Column-Column on 2 axes
I am using Excel 2003. I see how I can create a Line-Column Graph on 2 Axes. However, can a column-column graph be created on 2 axes? I am trying to mimic this graph style which I saw in another presentation. Hi, Yes, just select one of your column series and assign it to the secondary axis. This is useful if the magnitudes of the two series differ widely. Dave "Kathy - Lovullo" wrote: > I am using Excel 2003. I see how I can create a Line-Column Graph on 2 Axes. > However, can a column-column graph be created on 2 axes? > > I am trying to mimic this gra...

Matching column in different sheet
I have data in different sheet1, sheet2 and sheet3, column A of each sheet have a distinctive number. I need that if any data of sheet 1, sheet 2, sheet 3 a result the whole row will appear in sheet 4 Try the below formula in Sheet4 A1 and copy to the right and down as required..The formula will populate date with reference to Sheet1; if the same colA info is present in Sheet2 and Sheet3 =IF(AND(COUNTIF(Sheet1!$A:$A,Sheet1!$A1), COUNTIF(Sheet2!$A:$A,Sheet1!$A1), COUNTIF(Sheet3!$A:$A,Sheet1!$A1)),Sheet1!A1,"") -- Jacob "Khawajaanwar" wrote: > ...

bulk importing- Number of columns does not match the header row
while importing accounts using the bulk import wizard, and a .txt file as the source file- (an excel worksheet that been saved as a text file) some of the accounts (60%) are created successfully but others are not. (40%) when viewing the result of the bulk import I see the following Reason for each of the accounts that were failed to create: Number of columns does not match the header row. what does the error message means? what could be the reason that some of the records are O.K and the others are not? thanks. Amit Apelboim. Techtrends Inc. There are a few reasons for this 1 - mak...

Drop Down box resizing on open
I'm using Excel 2000 and have created a workbook with lots of drop down boxes which keep resizing when I open up the sheet. I have the drop downs in column B, with linked cells in column A with IF's in column D based on column's A values. I have macro's running in the background autofitting column D (the IF variables can give results which range from 1-10 lines taken from another sheet). The drop down boxes have been positioned in the lower half of the cells so the cell contents can be read. I have made sure that each drop down box has 'move but dont size with cells&...

Help Please: Retrieving the first populated cell value from a specific excel spreadsheet column
I need help with retrieving the first populated cell value from a specific excel spreadsheet column. This value will then be used for later parts in an broader script to mark the entry as used. The 3rd worksheet contains 3 columns. I need this code to go through all the cells in the 2nd column, in order from top to bottom, and have it return the first value found. In this example, it should return 55553. Phone Free Used 55550 55550 55551 55551 55552 55552 55553 55553 55554 55554 55555 55555 ...........

Change Column Name
Can anybody advice me on how to go about change the column name in the worksheet. Instead of currently the column name is A, B, C I would like to change to for example A="Date" , B ="Name", and so forth to be shown on the worksheet. Thanks. LSB, It can't be done. You can change it to "1, 2, 3, etc." as opposed to "A,B,C, etc" by selecting R1C1 reference style. Suggestion......... Use column headers in the first row. If you want, you can get rid of the row and column headings altogether (meaning that your first row/header row will be all that...

column dates
Column B, Rows 5 thru 50 is used to type in dates on a timesheet. Is it possible to auto-fill dates in cells below a cell that a date has been typed in, but then type in another date further down the column and all cells below that reflect the new date? For example there's 4 employees in column C rows 5 thru 8 and we would type 10/15/07 in B5 and all cells below B5 would automatically fill in with 10/15/07. The next day the same 4 employees would be in C rows 9 thru 12 on 10/16/07 and that new date would be typed into cell B9, with all following cells changing to the new date. I...

Format/Column/Autofit selection lost
In Excel 2002 I was trying to put the Format/Column/Autofit Selection option onto the toolbar. In the Customize/Commands window I could not find this command under the Format category (or any other). I then tried to drag the option from the Format/column menu onto the toolbar which effectively deleted the option from that menu. Any ideas? If you hold the control down when you drag that menu item, you'll end up with two copies. I like to do it this way: Tools|customize (just to show that dialog) then expand the menu and control copy the item to its new location. You should be a...

How to resize a CTreeCtl when the dialog window is resized
Hello, Is there any documentation on how to do this? Or does anyone have any suggestions? Thanks, Linda >-----Original Message----- >Hello, > >Is there any documentation on how to do this? Or does anyone have any >suggestions? > >Thanks, >Linda > >. You can handle the message WM_SIZE of dialog to change the size of CTreeCtrl. Use message mapping. Then call the MoveWindow function to change the size: CTreeCtrl::MoveWindow(x, y, width, height) >-----Original Message----- >Hello, > >Is there any documentation on how to do this? Or does anyo...

Resizing trendline title in legend
G'day, Im having trouble resizing the legend from 3 lines to 1. I have used a scatter chart and then Add Trendline>Moving average. The legend that is auto-generated is "10 per. Mov. Avg. (PROJECTED INITIAL YELD" The title is broken up into 3 lines as above, and no matter how much I resize or how much big I make the legend area or how small the font, it INSISTS on using 3 lines. Because the title is auto-generated (10 per. Mov. Avg.....) there is nowhere where I can actually edit the title eg make it shorter, or remove the alt-enter line breaks (if thats what it is). The ...

Code to Color ActiveRow Columns A Through C
We have a macro with the following code: Range("A4:C4").Select With Selection.Interior .ColorIndex = 38 .Pattern = xlSolid End With What the user really wants is whatever cell their cursor is in, for th macro to automatically change the BackColor of Columns A B and C in th Active row the cursor is in to ColorIndex = 38 The code attempted above only affects a specific range, whereas th code we need, needs to be able to work ANYWHERE on the worksheet How do we do this -- Message posted from http://www.ExcelForum.com One way: With Cells(ActiveCell.Row, 1).Resize(1, 3).Inter...

ADJUSTING COLUMNS
I have many worksheets and all have 3 columns but as I go thru each worksheet I notice that the columns are different widths. is there a way to adjust all columns in all worksheets at once? Just me, you could group the sheets, right click on a sheet tab and select all sheets, adjust the column widths, this will adjust them on all sheets, right click on the sheet tab and ungroup sheets -- Paul B Always backup your data before trying something new Please post any response to the newsgroups so others can benefit from it Feedback on answers is always appreciated! Using Excel 2002 & 200...

Resizable CPropertySheet In Resizable CFormView
I'm trying to build an MFC-based SDI app that has a look somewhat like that shown by Joseph M. Newcomer at http://www.flounder.com/proppage.gif in his page "The Graphical Developer Interface" ( http://www.flounder.com/gdi.htm ). The property sheet and the pages in it should be resizable, and it's the resizing that I'm having problems with. I selected a CFormView-based application and put a CPropertySheet in it, with appropriate pages. (I selected a CFormView over a dialog-based app because I wanted the framework's support for all the things you don't get with a...