Esempio n. 1
0
void CLanguagesDlg::OnClickLanguagesList(NMHDR* pNMHDR, LRESULT* pResult) 
{
	UNREFERENCED_PARAMETER(pNMHDR);
	*pResult = 0;

	CPoint mousePoint;
	GetCursorPos(&mousePoint);
	m_listLang.ScreenToClient(&mousePoint);

	UINT nFlags = 0;
	const int iHitItem = m_listLang.HitTest(mousePoint, &nFlags);
	if((iHitItem < 0) || ((nFlags & LVHT_ONITEM) == 0)) return;

	CString strLang = m_listLang.GetItemText(iHitItem, 0);
	_LoadLanguage(strLang);
}
Esempio n. 2
0
void CLanguagesDlg::OnClickLanguagesList(NMHDR* pNMHDR, LRESULT* pResult) 
{
	UNREFERENCED_PARAMETER(pNMHDR);

	CPoint mousePoint;
	GetCursorPos(&mousePoint);
	m_listLang.ScreenToClient(&mousePoint);

	UINT nFlags = 0;
	const int nHitItem = m_listLang.HitTest(mousePoint, &nFlags);

	TCHAR tszItem[MAX_PATH];
	ZeroMemory(tszItem, MAX_PATH * sizeof(TCHAR));
	m_listLang.GetItemText(nHitItem, 0, tszItem, 254);

	if((nFlags & LVHT_ONITEM) != 0) _LoadLanguage(tszItem);

	*pResult = 0;
}