Click here to Skip to main content
14,930,087 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Console Output Pin
IronMike28-Jan-05 3:06
MemberIronMike28-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
MemberIronMike28-Jan-05 3:09 
GeneralSolution: Console Output Pin
IronMike31-Jan-05 21:38
MemberIronMike31-Jan-05 21:38 
GeneralHorizental Scroll is not Appearing in CCheckListBox .. Urgent Pin
zahid_ash27-Jan-05 23:38
Memberzahid_ash27-Jan-05 23:38 
GeneralRe: Horizental Scroll is not Appearing in CCheckListBox .. Urgent Pin
tanvon malik28-Jan-05 2:22
Membertanvon malik28-Jan-05 2:22 
GeneralRe: Horizental Scroll is not Appearing in CCheckListBox .. Urgent Pin
zahid_ash28-Jan-05 2:54
Memberzahid_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
Memberzahid_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
Memberzahid_ash28-Jan-05 3:31 
GeneralRe: is it for CheckListbox too Pin
tanvon malik28-Jan-05 3:48
Membertanvon malik28-Jan-05 3:48 
GeneralRe: I tried but not working Pin
tanvon malik28-Jan-05 3:32
Membertanvon malik28-Jan-05 3:32 
GeneralIt works but After Addstring() Pin
zahid_ash30-Jan-05 19:07
Memberzahid_ash30-Jan-05 19:07 
QuestiondWhat is protected inheritance? Pin
phijophlip27-Jan-05 22:53
Memberphijophlip27-Jan-05 22:53 
AnswerRe: dWhat is protected inheritance? Pin
Ryan Binns28-Jan-05 0:49
MemberRyan Binns28-Jan-05 0:49 
GeneralRe: dWhat is protected inheritance? Pin
trelliot28-Jan-05 2:46
Membertrelliot28-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
Membertrelliot28-Jan-05 2:39 
GeneralCode for Hibernate and turn of monitor Pin
Rajesh_K_Sharma27-Jan-05 21:39
MemberRajesh_K_Sharma27-Jan-05 21:39 
GeneralRe: Code for Hibernate and turn of monitor Pin
geo_m27-Jan-05 21:49
Membergeo_m27-Jan-05 21:49 
Generalgamma Pin
viliam27-Jan-05 21:39
Memberviliam27-Jan-05 21:39 
GeneralHelp to debug Error!! Pin
Anonymous27-Jan-05 21:13
MemberAnonymous27-Jan-05 21:13 
GeneralRe: Help to debug Error!! Pin
James R. Twine28-Jan-05 2:44
MemberJames R. Twine28-Jan-05 2:44 
GeneralRe: Help to debug Error!! Pin
Anonymous28-Jan-05 13:43
MemberAnonymous28-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.