Click here to Skip to main content
15,912,329 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: newb question: Pin
8-May-02 22:32
suss8-May-02 22:32 
GeneralMy question more about "C" Pin
Volki8-May-02 15:36
Volki8-May-02 15:36 
GeneralRe: My question more about "C" Pin
8-May-02 16:04
suss8-May-02 16:04 
GeneralRe: My question more about "C" Pin
Nish Nishant8-May-02 17:18
sitebuilderNish Nishant8-May-02 17:18 
GeneralRe: My question more about "C" Pin
Volki9-May-02 14:31
Volki9-May-02 14:31 
GeneralTransparent windows Pin
redeemer8-May-02 12:48
redeemer8-May-02 12:48 
GeneralRe: Transparent windows Pin
Anders Molin8-May-02 13:18
professionalAnders Molin8-May-02 13:18 
GeneralRe: Transparent windows Pin
Christian Graus8-May-02 13:19
protectorChristian Graus8-May-02 13:19 
GeneralRe: Transparent windows Pin
Paul M Watt8-May-02 14:46
mentorPaul M Watt8-May-02 14:46 
GeneralThanks all Pin
redeemer8-May-02 15:21
redeemer8-May-02 15:21 
GeneralCompiler says WS_EX_LAYERED and LWA_ALPHA is unknown... Pin
redeemer8-May-02 15:26
redeemer8-May-02 15:26 
GeneralRe: Compiler says WS_EX_LAYERED and LWA_ALPHA is unknown... Pin
Shog98-May-02 15:58
sitebuilderShog98-May-02 15:58 
GeneralRe: Transparent windows Pin
Michael Dunn8-May-02 17:24
sitebuilderMichael Dunn8-May-02 17:24 
Generalassertion failure Pin
RalfPeter8-May-02 12:16
RalfPeter8-May-02 12:16 
GeneralRe: assertion failure Pin
Roger Allen9-May-02 2:22
Roger Allen9-May-02 2:22 
QuestionDoes anyone know of a good source code control system? Pin
rbc8-May-02 11:42
rbc8-May-02 11:42 
AnswerRe: Does anyone know of a good source code control system? Pin
Anna-Jayne Metcalfe8-May-02 22:02
Anna-Jayne Metcalfe8-May-02 22:02 
GeneralSetWindowLong ( GCL_HBRBACKGROUND ) Pin
Mike Doner8-May-02 11:23
Mike Doner8-May-02 11:23 
GeneralRe: SetWindowLong ( GCL_HBRBACKGROUND ) Pin
Jeremy Falcon8-May-02 11:32
professionalJeremy Falcon8-May-02 11:32 
GeneralListbox, avoid autoscroll Pin
8-May-02 10:26
suss8-May-02 10:26 
GeneralRe: Listbox, avoid autoscroll Pin
Joaquín M López Muñoz8-May-02 10:40
Joaquín M López Muñoz8-May-02 10:40 
GeneralRe: Listbox, avoid autoscroll Pin
10-May-02 19:00
suss10-May-02 19:00 
GeneralRe: Listbox, avoid autoscroll Pin
11-May-02 7:44
suss11-May-02 7:44 
here it is:

// Check if listbox should be scrolled to end
BOOL CListBoxChat::IsAutoScroll()
{
	int nBottom = GetBottomIndex();		
	if(nBottom == LB_ERR) return FALSE;
	return (GetBottomIndex() == GetCount()-1)?TRUE:FALSE;
}

// Returns last visible item in a listbox
int CListBoxChat::GetBottomIndex()
{
	ASSERT(m_hWnd);
	CRect rect;
	GetClientRect(rect);				
	int nIndex = LOWORD(::SendMessage(m_hWnd, LB_ITEMFROMPOINT, 0, MAKELPARAM(0, rect.bottom)));

	//note: ItemFromPoint returns a WORD not a UINT!
	if (nIndex == LOWORD(LB_ERR)) 			
	{
		nIndex = LB_ERR;
	}
	return nIndex;
}

GeneralRe: Listbox, avoid autoscroll Pin
Jack Handy8-May-02 10:41
Jack Handy8-May-02 10:41 
Generalrefrence function ... Pin
Hadi Rezaee8-May-02 9:58
Hadi Rezaee8-May-02 9:58 

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.