Click here to Skip to main content
15,922,584 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: MS Shell Dlg Font Pin
Michael Dunn2-Oct-02 19:20
sitebuilderMichael Dunn2-Oct-02 19:20 
GeneralRe: MS Shell Dlg Font Pin
Daaave2-Oct-02 19:40
Daaave2-Oct-02 19:40 
GeneralGetting absolute URL from relative Pin
Alex Cramer2-Oct-02 18:32
Alex Cramer2-Oct-02 18:32 
GeneralRe: Getting absolute URL from relative Pin
Stephane Rodriguez.2-Oct-02 22:13
Stephane Rodriguez.2-Oct-02 22:13 
QuestionWhats the equivalent of CString.m_pchData in VS.NET? Pin
Alvaro Mendez2-Oct-02 17:54
Alvaro Mendez2-Oct-02 17:54 
AnswerRe: Whats the equivalent of CString.m_pchData in VS.NET? Pin
Alex Cramer2-Oct-02 18:59
Alex Cramer2-Oct-02 18:59 
AnswerRe: Whats the equivalent of CString.m_pchData in VS.NET? Pin
Stephane Rodriguez.2-Oct-02 22:21
Stephane Rodriguez.2-Oct-02 22:21 
AnswerRe: Whats the equivalent of CString.m_pchData in VS.NET? Pin
Jon Hulatt3-Oct-02 2:23
Jon Hulatt3-Oct-02 2:23 
GeneralDiscover Shell Extension Verbs Pin
Paul Farry2-Oct-02 17:05
professionalPaul Farry2-Oct-02 17:05 
GeneralRelease version crashes Pin
Anonymous2-Oct-02 14:40
Anonymous2-Oct-02 14:40 
GeneralRe: Release version crashes Pin
Anonymous2-Oct-02 14:54
Anonymous2-Oct-02 14:54 
GeneralRe: Release version crashes Pin
Dave Bryant2-Oct-02 15:47
Dave Bryant2-Oct-02 15:47 
GeneralRe: Release version crashes Pin
Anonymous2-Oct-02 16:48
Anonymous2-Oct-02 16:48 
GeneralSorting listboxes descending Pin
monrobot132-Oct-02 13:35
monrobot132-Oct-02 13:35 
GeneralRe: Sorting listboxes descending Pin
Ravi Bhavnani2-Oct-02 13:50
professionalRavi Bhavnani2-Oct-02 13:50 
GeneralRe: Sorting listboxes descending Pin
monrobot132-Oct-02 16:41
monrobot132-Oct-02 16:41 
GeneralRe: Sorting listboxes descending Pin
Ravi Bhavnani3-Oct-02 4:59
professionalRavi Bhavnani3-Oct-02 4:59 
GeneralRe: Sorting listboxes descending Pin
monrobot133-Oct-02 13:26
monrobot133-Oct-02 13:26 
GeneralRe: Sorting listboxes descending Pin
Ravi Bhavnani3-Oct-02 15:26
professionalRavi Bhavnani3-Oct-02 15:26 
GeneralRe: Sorting listboxes descending Pin
monrobot135-Oct-02 8:39
monrobot135-Oct-02 8:39 
GeneralRe: Sorting listboxes descending Pin
Debs3-Oct-02 0:00
Debs3-Oct-02 0:00 
GeneralRe: Sorting listboxes descending Pin
monrobot133-Oct-02 2:17
monrobot133-Oct-02 2:17 
GeneralCListBox WM_MEASUREITEM problems Pin
alex.barylski2-Oct-02 13:34
alex.barylski2-Oct-02 13:34 
How can I can force the control to send itself a WM_MEASUREITEM message each time it is resized...?

Currently default implementation only fires off a WM_MEASUREITEM at the time of creation and thats it...I need it to fire whenever the control is resized...???

I have the following code (from which I stole from Changing Row Height in an owner drawn Control
By Uwe Keim ) inside my CListBox::OnSize()

CListBox::OnSize(nType, cx, cy); 
		
// Prepare control for custom WM_MEASUREITEM
CRect rc;
GetWindowRect( &rc );

WINDOWPOS wp;
wp.hwnd  = m_hWnd;
wp.cx    = rc.Width();
wp.cy    = rc.Height();
wp.flags = SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOOWNERZORDER | SWP_NOZORDER;

// Force control to receive WM_MEASUREITEM on resizes
SendMessage( WM_WINDOWPOSCHANGED, 0, (LPARAM)&wp );

// Redraw display
Invalidate(FALSE); 


However when the code executes I get an exception:

First-chance exception in Timeline2.exe (KERNEL32.DLL): 0xC00000FD: Stack Overflow.

Any ideas as to why this is happening...? Or atleast another way of forcing the control to receive WM_MEASUREITEM on control resizes...?

Thanx a million!

Cheers! Smile | :) Smile | :) Smile | :)

"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
GeneralRe: CListBox WM_MEASUREITEM problems Pin
Shog92-Oct-02 14:18
sitebuilderShog92-Oct-02 14:18 
GeneralRe: CListBox WM_MEASUREITEM problems Pin
alex.barylski2-Oct-02 19:59
alex.barylski2-Oct-02 19:59 

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.