Click here to Skip to main content
16,011,784 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Can CListCtrl select all the row (not only the iSubItem=0 part)? Pin
Daniel Ferguson28-Feb-01 3:49
Daniel Ferguson28-Feb-01 3:49 
GeneralRe: Can CListCtrl select all the row (not only the iSubItem=0 part)? Pin
Ariel28-Feb-01 19:52
Ariel28-Feb-01 19:52 
AnswerRe: Can CListCtrl select all the row (not only the iSubItem=0 part)? Pin
Joe Moldovan28-Feb-01 4:17
Joe Moldovan28-Feb-01 4:17 
GeneralRe: Can CListCtrl select all the row (not only the iSubItem=0 part)? Pin
Ariel28-Feb-01 7:03
Ariel28-Feb-01 7:03 
GeneralRe: Can CListCtrl select all the row (not only the iSubItem=0 part)? Pin
Joe Moldovan28-Feb-01 11:37
Joe Moldovan28-Feb-01 11:37 
GeneralRe: Can CListCtrl select all the row (not only the iSubItem=0 part)? Pin
Ariel28-Feb-01 19:31
Ariel28-Feb-01 19:31 
QuestionHOW to resize the DataGrid columns? - Answer PLEASE Pin
27-Feb-01 11:31
suss27-Feb-01 11:31 
AnswerRe: HOW to resize the DataGrid columns? - Answer PLEASE Pin
Christian Graus27-Feb-01 14:29
protectorChristian Graus27-Feb-01 14:29 
Welcome to hell. You'll find most of the MSDN documentation on ActiveX controls is geared to VB. Apparently we VC people are smart enough to work it out for ourselves. Sadly, I know this from using FlexGrid, not DataGrid, so I don't know how much help I can offer, but the online help says

If a cell's text is too long to be displayed in the cell, the text wraps to the next line within the same cell. To display the wrapped text, you must increase the cell's Column object's Width property and/or the DataGrid control's RowHeight property. At design time, you can change the column width interactively by resizing the column or by changing the column's width in the Column object's property page.

Actually, it's pretty easy if you have a look around. Make sure you include "Column.h" and "Columns.h" ( but I bet you already did anyhow )

Then, do this:


// Grab the columns
CColumns cols = m_DataGrid.GetColumns();
VARIANT v;
v.vt = VT_I4;
v.lVal = 0; // this is the column I want

CColumn col = cols.GetItem(v);

// Now you have a column, you can call any of the methods in CColumns on it.
col.SetWidth(100);

I just created a dummy project and this definately works.

Christian

The content of this post is not necessarily the opinion of my yadda yadda yadda.

To understand recursion, we must first understand recursion.
QuestionFont and size? Pin
27-Feb-01 11:20
suss27-Feb-01 11:20 
AnswerRe: Font and size? Pin
Christian Graus27-Feb-01 14:09
protectorChristian Graus27-Feb-01 14:09 
GeneralCouple of questions. . . Pin
27-Feb-01 11:15
suss27-Feb-01 11:15 
GeneralRe: Couple of questions. . . Pin
Chris Losinger27-Feb-01 11:27
professionalChris Losinger27-Feb-01 11:27 
GeneralRe: Couple of questions. . . Pin
Tim Deveaux27-Feb-01 13:08
Tim Deveaux27-Feb-01 13:08 
GeneralRe: Couple of questions. . . Pin
Christian Graus27-Feb-01 14:05
protectorChristian Graus27-Feb-01 14:05 
GeneralRe: Couple of questions. . . Pin
l a u r e n27-Feb-01 19:51
l a u r e n27-Feb-01 19:51 
GeneralIntersetOption parameter Pin
27-Feb-01 5:24
suss27-Feb-01 5:24 
GeneralHelp with CSocket Server APP hanging while recieving data Pin
Brad Chase27-Feb-01 5:11
Brad Chase27-Feb-01 5:11 
GeneralRe: Help with CSocket Server APP hanging while recieving data Pin
l a u r e n27-Feb-01 8:14
l a u r e n27-Feb-01 8:14 
GeneralRe: Help with CSocket Server APP hanging while recieving data Pin
James R. Twine27-Feb-01 8:30
James R. Twine27-Feb-01 8:30 
QuestionHelp:How to use VC++ to actualize the registration number's location of a car's digital image? Pin
27-Feb-01 4:21
suss27-Feb-01 4:21 
AnswerRe: Help:How to use VC++ to actualize the registration number's location of a car's digital image? Pin
l a u r e n27-Feb-01 7:57
l a u r e n27-Feb-01 7:57 
GeneralActiveX and events Pin
Ivan Polak27-Feb-01 4:07
Ivan Polak27-Feb-01 4:07 
GeneralRe: ActiveX and events Pin
l a u r e n27-Feb-01 8:05
l a u r e n27-Feb-01 8:05 
GeneralExporting a function from a DLL Pin
confalonieri27-Feb-01 3:10
confalonieri27-Feb-01 3:10 
GeneralRe: Exporting a function from a DLL Pin
l a u r e n27-Feb-01 8:02
l a u r e n27-Feb-01 8:02 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.