Click here to Skip to main content
15,923,376 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionHosting Band objects? Pin
Nick Hodapp12-May-00 10:52
sitebuilderNick Hodapp12-May-00 10:52 
AnswerRe: Hosting Band objects? Pin
Buck12-May-00 20:12
Buck12-May-00 20:12 
GeneralRe: Hosting Band objects? Pin
Nick Hodapp15-May-00 5:53
sitebuilderNick Hodapp15-May-00 5:53 
GeneralListView control Pin
hitokiribattousai12-May-00 7:35
hitokiribattousai12-May-00 7:35 
GeneralRe: ListView control Pin
Mark Swann12-May-00 10:32
Mark Swann12-May-00 10:32 
GeneralRe: ListView control Pin
hitokiribattousai12-May-00 17:52
hitokiribattousai12-May-00 17:52 
GeneralRe: ListView control Pin
Mark Swann13-May-00 16:38
Mark Swann13-May-00 16:38 
GeneralRe: ListView control Pin
Mark Swann13-May-00 17:42
Mark Swann13-May-00 17:42 
I must appologize. I went through the steps that I previously gave you and didn't find LVM_SETCOLUMNWIDTH.

After further thought I feel that you will have to subclass the ListView control (CListCtrl) with your own class that inherits from CListCtrl. Override the WindowProc function. (You'll find WindowProc in class CWnd.) The prototype should look as follows: (I hope all this formatting doesn't get lost. I'll double space to be certain.)

LRESULT CYourClass::WindowProc(UINT message, WPARAM wParam, LPARAM lParam);

And the body should appear somewhat as follows: (I have not actually done this with CListCtrl but it should work.)

// Begin Body

{

int nFixedWidth = 100; // Hard-coded width

switch ( message ) {

case LVM_SETCOLUMNWIDTH:

// override lParam

lParam = MAKELPARAM( nFixedWidth, 0);

break;

}

return CListCtrl::WindowProc(message, wParam, lParam);

}

// End body

The value assigned to nFixedWidth is in list view coordinates.



It looks fairly simple. I hope this works for you


GeneralRe: ListView control Pin
Kurt15-May-00 3:01
Kurt15-May-00 3:01 
GeneralInternet Pin
Alpesh Makwana12-May-00 2:13
Alpesh Makwana12-May-00 2:13 
GeneralRe: Internet Pin
Alex Gorev16-May-00 4:31
Alex Gorev16-May-00 4:31 
GeneralRe: Internet Pin
Alfadhly19-May-00 8:47
sussAlfadhly19-May-00 8:47 
GeneralRe: Internet Pin
Alfadhly19-May-00 8:49
sussAlfadhly19-May-00 8:49 
GeneralRe: Internet Pin
Alfadhly19-May-00 8:50
sussAlfadhly19-May-00 8:50 
QuestionHow to simulate/automate user input? Pin
Ra11-May-00 23:42
Ra11-May-00 23:42 
AnswerRe: How to simulate/automate user input? Pin
TBK12-May-00 5:07
TBK12-May-00 5:07 
GeneralPreTranslateMessage, how to check key combination like Ctrl+R Pin
Chris Vischer11-May-00 22:11
Chris Vischer11-May-00 22:11 
GeneralRe: PreTranslateMessage, how to check key combination like Ctrl+R Pin
Kurt11-May-00 22:17
Kurt11-May-00 22:17 
GeneralRe: PreTranslateMessage, how to check key combination like Ctrl+R Pin
Mike Dunn12-May-00 16:21
Mike Dunn12-May-00 16:21 
GeneralBitmaps And Palettes Pin
Mark Swann11-May-00 19:05
Mark Swann11-May-00 19:05 
GeneralRe: Bitmaps And Palettes Pin
Chris Maunder12-May-00 13:20
cofounderChris Maunder12-May-00 13:20 
GeneralRe: Bitmaps And Palettes Pin
Mark Swann12-May-00 16:58
Mark Swann12-May-00 16:58 
GeneralRe: Bitmaps And Palettes Pin
Chris Maunder13-May-00 17:20
cofounderChris Maunder13-May-00 17:20 
GeneralModeless Dialogs Pin
frank11-May-00 13:56
frank11-May-00 13:56 
QuestionHow to Subclass PropertySheet buttons ? Pin
Mario M.11-May-00 13:00
Mario M.11-May-00 13:00 

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.