Click here to Skip to main content
15,887,349 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: LGPL query Pin
Chris Losinger22-Feb-06 16:01
professionalChris Losinger22-Feb-06 16:01 
AnswerRe: LGPL query Pin
Joe Woodbury22-Feb-06 8:26
professionalJoe Woodbury22-Feb-06 8:26 
AnswerRe: LGPL query Pin
Sebastian Pipping22-Feb-06 15:40
Sebastian Pipping22-Feb-06 15:40 
QuestionPassing Arrays of structures from VB.NET to unmanaged C++ Pin
CPop22-Feb-06 5:45
CPop22-Feb-06 5:45 
QuestionListview controls Pin
Waldermort22-Feb-06 5:23
Waldermort22-Feb-06 5:23 
AnswerRe: Listview controls Pin
Joe Woodbury22-Feb-06 5:41
professionalJoe Woodbury22-Feb-06 5:41 
AnswerRe: Listview controls Pin
Gavin Taylor22-Feb-06 6:07
professionalGavin Taylor22-Feb-06 6:07 
AnswerRe: Listview controls Pin
Sebastian Pipping22-Feb-06 10:32
Sebastian Pipping22-Feb-06 10:32 
funny we are working on the same thing at the same time.

i found a function calculating the width of a string
on MSDN. the column here contains numbers only so my code is

HDC hdc = GetDC( _hView );
SIZE size;
BOOL res = GetTextExtentPoint32( hdc, TEXT( "0" ), 1, &size );
ReleaseDC( _hView, hdc );
const int iWidth = res ? ( size.cx * _iDigits ) : 120;

this function can be still helpfull when you want
to size for the largest string of all, not just the visible
ones (which LVSCW_AUTOSIZE does).


also i found out you can size the last column
to take as much space as possible without adding the
horizontal scrollbar (unlike LVSCW_AUTOSIZE_USEHEADER):
RECT r;
GetClientRect( _hView, &r );
const int iWidth = ListView_GetColumnWidth( _hView, 0 );
ListView_SetColumnWidth( _hView, 1, r.right - r.left - iWidth );



best regards, sebastian

-------------------------------------------
My website: http://www.hartwork.org
GeneralRe: Listview controls Pin
Waldermort22-Feb-06 15:13
Waldermort22-Feb-06 15:13 
AnswerRe: Listview controls Pin
Sebastian Pipping22-Feb-06 15:30
Sebastian Pipping22-Feb-06 15:30 
GeneralRe: Listview controls Pin
Waldermort23-Feb-06 1:09
Waldermort23-Feb-06 1:09 
QuestionCComboBox dropdown bit is hidden Pin
rw10422-Feb-06 4:18
rw10422-Feb-06 4:18 
AnswerRe: CComboBox dropdown bit is hidden Pin
Iain Clarke, Warrior Programmer22-Feb-06 4:52
Iain Clarke, Warrior Programmer22-Feb-06 4:52 
GeneralRe: CComboBox dropdown bit is hidden Pin
rw10422-Feb-06 4:56
rw10422-Feb-06 4:56 
Questiondrawing problem Pin
Deviantizh22-Feb-06 4:06
Deviantizh22-Feb-06 4:06 
AnswerRe: drawing problem Pin
Cedric Moonen22-Feb-06 4:33
Cedric Moonen22-Feb-06 4:33 
QuestionDumb question of the week C pointer question. Pin
Maximilien22-Feb-06 3:27
Maximilien22-Feb-06 3:27 
AnswerRe: Dumb question of the week C pointer question. Pin
Cedric Moonen22-Feb-06 3:34
Cedric Moonen22-Feb-06 3:34 
GeneralRe: Dumb question of the week C pointer question. Pin
Sebastian Schneider22-Feb-06 4:19
Sebastian Schneider22-Feb-06 4:19 
GeneralRe: Dumb question of the week C pointer question. Pin
Maximilien22-Feb-06 4:40
Maximilien22-Feb-06 4:40 
AnswerRe: Dumb question of the week C pointer question. Pin
Sebastian Schneider22-Feb-06 4:13
Sebastian Schneider22-Feb-06 4:13 
GeneralRe: Dumb question of the week C pointer question. Pin
Maximilien22-Feb-06 4:45
Maximilien22-Feb-06 4:45 
QuestionApp Path - how to get it Pin
miqel22-Feb-06 3:16
miqel22-Feb-06 3:16 
AnswerRe: App Path - haw to get it Pin
krmed22-Feb-06 3:21
krmed22-Feb-06 3:21 
GeneralRe: App Path - haw to get it Pin
miqel22-Feb-06 3:45
miqel22-Feb-06 3:45 

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.