Click here to Skip to main content
15,895,546 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Console Output Pin
IronMike28-Jan-05 3:06
IronMike28-Jan-05 3:06 
GeneralRe: Console Output Pin
V.28-Jan-05 2:47
professionalV.28-Jan-05 2:47 
GeneralRe: Console Output Pin
IronMike28-Jan-05 3:09
IronMike28-Jan-05 3:09 
GeneralSolution: Console Output Pin
IronMike31-Jan-05 21:38
IronMike31-Jan-05 21:38 
GeneralHorizental Scroll is not Appearing in CCheckListBox .. Urgent Pin
zahid_ash27-Jan-05 23:38
zahid_ash27-Jan-05 23:38 
GeneralRe: Horizental Scroll is not Appearing in CCheckListBox .. Urgent Pin
tanvon malik28-Jan-05 2:22
tanvon malik28-Jan-05 2:22 
GeneralRe: Horizental Scroll is not Appearing in CCheckListBox .. Urgent Pin
zahid_ash28-Jan-05 2:54
zahid_ash28-Jan-05 2:54 
GeneralRe: Horizental Scroll is not Appearing in CCheckListBox .. Urgent Pin
V.28-Jan-05 2:57
professionalV.28-Jan-05 2:57 
You have to set the show Horizontal Toolbar and implement a function like following:
call it when you have added the items...

good luck.

PS: Although probably not intended, your mail almost seems unpolite. Don't sweat it, It won't keep me up at night Smile | :) , but try to take care of your language.Big Grin | :-D

void DlgFlexListSelectValue::SetHorizontalScrollBar(){<br />
	//Next is to set the horizontal scroll bar<br />
	//Find the longest string in the list box.<br />
	CString str;<br />
	CSize sz;<br />
	int dx = 0;<br />
	TEXTMETRIC tm;<br />
	CDC* pDC = m_valueList.GetDC();<br />
	CFont* pFont = m_valueList.GetFont();<br />
<br />
	//Select the listbox font, save the old font<br />
	CFont* pOldFont = pDC->SelectObject(pFont);<br />
	//Get the text metrics for avg char width<br />
	pDC->GetTextMetrics(&tm); <br />
<br />
	for(int i = 0; i < m_valueList.GetCount(); i++){<br />
		m_valueList.GetText(i, str);<br />
		sz = pDC->GetTextExtent(str);<br />
<br />
		//Add the avg width to prevent clipping<br />
		sz.cx += tm.tmAveCharWidth;<br />
<br />
		if(sz.cx > dx){<br />
			dx = sz.cx;<br />
		}											//end if<br />
	}												//end for<br />
<br />
	//Select the old font back into the DC<br />
	pDC->SelectObject(pOldFont);<br />
	m_valueList.ReleaseDC(pDC);<br />
	//Set the horizontal extent so every character of all strings <br />
	//can be scrolled to.<br />
	m_valueList.SetHorizontalExtent(dx);<br />
}													//end function SetHorizontalScrollBar


"If I don't see you in this world, I'll see you in the next one... and don't be late." ~ Jimi Hendrix
GeneralI tried but not working Pin
zahid_ash28-Jan-05 3:02
zahid_ash28-Jan-05 3:02 
GeneralRe: I tried but not working Pin
V.28-Jan-05 3:07
professionalV.28-Jan-05 3:07 
Generalis it for CheckListbox too Pin
zahid_ash28-Jan-05 3:31
zahid_ash28-Jan-05 3:31 
GeneralRe: is it for CheckListbox too Pin
tanvon malik28-Jan-05 3:48
tanvon malik28-Jan-05 3:48 
GeneralRe: I tried but not working Pin
tanvon malik28-Jan-05 3:32
tanvon malik28-Jan-05 3:32 
GeneralIt works but After Addstring() Pin
zahid_ash30-Jan-05 19:07
zahid_ash30-Jan-05 19:07 
QuestiondWhat is protected inheritance? Pin
phijophlip27-Jan-05 22:53
phijophlip27-Jan-05 22:53 
AnswerRe: dWhat is protected inheritance? Pin
Ryan Binns28-Jan-05 0:49
Ryan Binns28-Jan-05 0:49 
GeneralRe: dWhat is protected inheritance? Pin
trelliot28-Jan-05 2:46
trelliot28-Jan-05 2:46 
AnswerRe: dWhat is protected inheritance? Pin
Selvam R28-Jan-05 1:09
professionalSelvam R28-Jan-05 1:09 
AnswerRe: dWhat is protected inheritance? Pin
trelliot28-Jan-05 2:39
trelliot28-Jan-05 2:39 
GeneralCode for Hibernate and turn of monitor Pin
Rajesh_K_Sharma27-Jan-05 21:39
Rajesh_K_Sharma27-Jan-05 21:39 
GeneralRe: Code for Hibernate and turn of monitor Pin
geo_m27-Jan-05 21:49
geo_m27-Jan-05 21:49 
Generalgamma Pin
viliam27-Jan-05 21:39
viliam27-Jan-05 21:39 
GeneralHelp to debug Error!! Pin
Anonymous27-Jan-05 21:13
Anonymous27-Jan-05 21:13 
GeneralRe: Help to debug Error!! Pin
James R. Twine28-Jan-05 2:44
James R. Twine28-Jan-05 2:44 
GeneralRe: Help to debug Error!! Pin
Anonymous28-Jan-05 13:43
Anonymous28-Jan-05 13:43 

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.