Click here to Skip to main content
15,893,814 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionHow can I access a document member variable from a dialog window? Pin
Darryl Bryk15-Jun-09 11:05
Darryl Bryk15-Jun-09 11:05 
AnswerRe: How can I access a document member variable from a dialog window? Pin
Stuart Dootson15-Jun-09 14:53
professionalStuart Dootson15-Jun-09 14:53 
GeneralRe: How can I access a document member variable from a dialog window? Pin
Darryl Bryk17-Jun-09 13:41
Darryl Bryk17-Jun-09 13:41 
QuestionStatic function variable problem Pin
alikalik15-Jun-09 8:18
alikalik15-Jun-09 8:18 
AnswerRe: Static function variable problem Pin
David Crow15-Jun-09 10:03
David Crow15-Jun-09 10:03 
AnswerRe: Static function variable problem Pin
Chris Losinger15-Jun-09 10:04
professionalChris Losinger15-Jun-09 10:04 
GeneralRe: Static function variable problem Pin
alikalik15-Jun-09 18:43
alikalik15-Jun-09 18:43 
AnswerRe: Static function variable problem Pin
led mike15-Jun-09 10:27
led mike15-Jun-09 10:27 
AnswerRe: Static function variable problem Pin
CPallini15-Jun-09 10:41
mveCPallini15-Jun-09 10:41 
Questionreturn value of a fun() [modified] Pin
Anand966915-Jun-09 7:21
Anand966915-Jun-09 7:21 
QuestionRe: return value of a fun() Pin
David Crow15-Jun-09 7:40
David Crow15-Jun-09 7:40 
AnswerRe: return value of a fun() Pin
Anand966915-Jun-09 7:43
Anand966915-Jun-09 7:43 
GeneralRe: return value of a fun() Pin
Luc Pattyn15-Jun-09 8:41
sitebuilderLuc Pattyn15-Jun-09 8:41 
GeneralRe: return value of a fun() Pin
Anand966915-Jun-09 20:10
Anand966915-Jun-09 20:10 
QuestionPropertyPage - OnQueryCancel Pin
JBAK_CP15-Jun-09 7:06
JBAK_CP15-Jun-09 7:06 
AnswerRe: PropertyPage - OnQueryCancel Pin
David Crow15-Jun-09 7:54
David Crow15-Jun-09 7:54 
QuestionCreateImageEx problem with CListCtrl drag and drop Pin
bhanu_850915-Jun-09 5:39
bhanu_850915-Jun-09 5:39 
Dear All,

I have problem with the CListCtrl drag and drop. I used the CreateImageEx to display the image while dragging the contents of the CListCtrl but unfortunately the image is displaying at the left top corner of the screen and not relevant to my GUI where the CListCtrl is placed.

The following is the code snippet. Please advice why the image is displayed like that.

//call to the dragging method
void TestDlg::OnLvnBeginrdragList3(NMHDR *pNMHDR, LRESULT *pResult)
{
	LPNMLISTVIEW pNMLV = reinterpret_cast<LPNMLISTVIEW>(pNMHDR);
	OnBegindrag(&pList, pNMHDR);
	*pResult = 0;
}

//Dragging method
void TestDlg::OnBegindrag(CListCtrl* pList, NMHDR* pNMHDR) 
{
	NM_LISTVIEW* pNMListView = (NM_LISTVIEW*)pNMHDR;
	if (pList->GetSelectedCount() <= 0)
		return;  // No row selected
	int iItem = pList->GetSelectedCount();
	POINT pt;
	m_pDragImage = CreateDragImageEx(pList, &pt);
		if (m_imageList == NULL)
		return;
	m_pDragWnd = pList;
	CPoint ptStart = pNMListView->ptAction;
	ptStart -= pt;
	m_pDragImage->BeginDrag(0, ptStart);
	m_pDragImage->DragEnter(GetDesktopWindow(), pNMListView->ptAction);
	SetCapture();
}

AnswerRe: CreateImageEx problem with CListCtrl drag and drop Pin
bhanu_850915-Jun-09 23:39
bhanu_850915-Jun-09 23:39 
QuestionCalling the functions from different class Pin
aravind.sn15-Jun-09 2:55
aravind.sn15-Jun-09 2:55 
AnswerRe: Calling the functions from different class Pin
_AnsHUMAN_ 15-Jun-09 3:08
_AnsHUMAN_ 15-Jun-09 3:08 
GeneralRe: Calling the functions from different class Pin
aravind.sn15-Jun-09 3:30
aravind.sn15-Jun-09 3:30 
QuestionSetattribute in MSXML Pin
siva45515-Jun-09 2:35
siva45515-Jun-09 2:35 
AnswerRe: Setattribute in MSXML Pin
Stuart Dootson15-Jun-09 3:47
professionalStuart Dootson15-Jun-09 3:47 
GeneralRe: Setattribute in MSXML Pin
siva45515-Jun-09 6:32
siva45515-Jun-09 6:32 
GeneralRe: Setattribute in MSXML Pin
Cedric Moonen15-Jun-09 7:50
Cedric Moonen15-Jun-09 7:50 

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.