Click here to Skip to main content
16,007,126 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralLayered Service Provider - WinSock 2 Pin
Cristi17-Oct-02 2:41
Cristi17-Oct-02 2:41 
Generalobtaining a full path filename of a DLL Pin
Debs17-Oct-02 2:22
Debs17-Oct-02 2:22 
GeneralRe: obtaining a full path filename of a DLL Pin
Tomasz Sowinski17-Oct-02 2:25
Tomasz Sowinski17-Oct-02 2:25 
GeneralRe: obtaining a full path filename of a DLL Pin
Debs17-Oct-02 2:42
Debs17-Oct-02 2:42 
GeneralRe: obtaining a full path filename of a DLL Pin
Tomasz Sowinski17-Oct-02 2:47
Tomasz Sowinski17-Oct-02 2:47 
GeneralRe: obtaining a full path filename of a DLL Pin
Debs17-Oct-02 3:02
Debs17-Oct-02 3:02 
GeneralRe: obtaining a full path filename of a DLL Pin
Debs17-Oct-02 2:53
Debs17-Oct-02 2:53 
Generalsizing ListCtrl and columns Pin
Idefix17-Oct-02 1:38
Idefix17-Oct-02 1:38 
hi,

I have a sizeable ListCtrl in a FromView.
The ListCtrl has a report style.
Additionally I want to size the column of the
ListCtrl when sizing.

But the scrollbars don't want what I want.
When the row count grows up and the horizontal
scrollbar is shown the vertical scrollbar
is shown, but it is not nessaray.
Second it is liable to run around. When the first
column width was changed the headerctrl
sends a WM_SIZE to the listctrl.

How can I avoid this.

<br />
MyFormView::OnSize(...)<br />
{<br />
  m_ListCtrl.::MoveWindow(...,..., TRUE);<br />
}<br />
<br />
MyListCtrl::OnSize(UINT nType, int cx, int cy) <br />
{<br />
        int iCol;<br />
	int nCols =GetHeaderCtrl()->GetItemCount();<br />
	int nWidth=0;<br />
	RECT rect;<br />
	float f;<br />
	SCROLLINFO scrinfo={0};<br />
	CHeaderCtrl* pHdr=GetHeaderCtrl();<br />
	HDITEM hdi={0};<br />
<br />
	CListCtrl::OnSize(nType, cx, cy);<br />
<br />
	for(iCol=0;iCol<nCols;iCol++)<br />
	{<br />
		pHdr->GetItemRect(iCol,&rect);<br />
		nWidth+=rect.right-rect.left;<br />
	}<br />
	<br />
	GetScrollInfo(SB_VERT,&scrinfo);<br />
	if(scrinfo.nPage<=scrinfo.nMax)<br />
	{<br />
		GetClientRect(&rect);<br />
		cx=rect.right-GetSystemMetrics(SM_CXVSCROLL);<br />
	}<br />
<br />
	f=(float)(cx)/(float)(nWidth);<br />
	<br />
<br />
	hdi.mask=HDI_WIDTH;<br />
	for(iCol=0;iCol<nCols;iCol++)<br />
	{<br />
		pHdr->GetItem(iCol,&hdi);<br />
		hdi.cxy=f*hdi.cxy;<br />
		pHdr->SetItem(iCol,&hdi);<br />
		<br />
	}<br />
}<br />
<br />

Generalworrisome exception Pin
ns17-Oct-02 1:32
ns17-Oct-02 1:32 
GeneralRe: worrisome exception Pin
Prem Kumar17-Oct-02 1:49
Prem Kumar17-Oct-02 1:49 
GeneralRe: worrisome exception Pin
ns17-Oct-02 1:52
ns17-Oct-02 1:52 
GeneralRe: worrisome exception Pin
Tomasz Sowinski17-Oct-02 1:51
Tomasz Sowinski17-Oct-02 1:51 
GeneralPlease Help! I suddenly get a ton of "missing ')'" and "missing ';'" messages... Pin
Redeemer-dk17-Oct-02 1:23
Redeemer-dk17-Oct-02 1:23 
GeneralRe: Please Help! I suddenly get a ton of "missing ')'" and "missing ';'" messages... Pin
Tomasz Sowinski17-Oct-02 1:26
Tomasz Sowinski17-Oct-02 1:26 
GeneralRe: Please Help! I suddenly get a ton of "missing ')'" and "missing ';'" messages... Pin
Anonymous17-Oct-02 2:33
Anonymous17-Oct-02 2:33 
GeneralRe: Please Help! I suddenly get a ton of "missing ')'" and "missing ';'" messages... Pin
Andreas Saurwein17-Oct-02 1:35
Andreas Saurwein17-Oct-02 1:35 
QuestionHow can i get the Window Handle... Pin
Renjith Ramachandran17-Oct-02 0:46
Renjith Ramachandran17-Oct-02 0:46 
AnswerRe: How can i get the Window Handle... Pin
Tomasz Sowinski17-Oct-02 0:51
Tomasz Sowinski17-Oct-02 0:51 
GeneralRe: How can i get the Window Handle... Pin
Renjith Ramachandran17-Oct-02 0:57
Renjith Ramachandran17-Oct-02 0:57 
GeneralRe: How can i get the Window Handle... Pin
Tomasz Sowinski17-Oct-02 0:58
Tomasz Sowinski17-Oct-02 0:58 
GeneralRe: How can i get the Window Handle... Pin
Renjith Ramachandran17-Oct-02 1:00
Renjith Ramachandran17-Oct-02 1:00 
GeneralRe: How can i get the Window Handle... Pin
Tomasz Sowinski17-Oct-02 1:08
Tomasz Sowinski17-Oct-02 1:08 
GeneralRe: How can i get the Window Handle... Pin
Renjith Ramachandran17-Oct-02 1:58
Renjith Ramachandran17-Oct-02 1:58 
GeneralRe: How can i get the Window Handle... Pin
Tomasz Sowinski17-Oct-02 2:05
Tomasz Sowinski17-Oct-02 2:05 
GeneralRe: How can i get the Window Handle... Pin
Renjith Ramachandran17-Oct-02 6:05
Renjith Ramachandran17-Oct-02 6:05 

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.