Click here to Skip to main content
15,891,423 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionStore a point within rect Pin
mesajflaviu1-Sep-10 0:37
mesajflaviu1-Sep-10 0:37 
AnswerRe: Store a point within rect Pin
CPallini1-Sep-10 0:48
mveCPallini1-Sep-10 0:48 
Questiontypdef struct MFC [modified] Pin
mesajflaviu31-Aug-10 20:45
mesajflaviu31-Aug-10 20:45 
AnswerRe: typdef struct MFC Pin
Eugen Podsypalnikov31-Aug-10 21:02
Eugen Podsypalnikov31-Aug-10 21:02 
GeneralRe: typdef struct MFC Pin
mesajflaviu31-Aug-10 21:15
mesajflaviu31-Aug-10 21:15 
GeneralRe: typdef struct MFC Pin
CPallini31-Aug-10 21:26
mveCPallini31-Aug-10 21:26 
AnswerRe: typdef struct MFC Pin
Cedric Moonen31-Aug-10 21:02
Cedric Moonen31-Aug-10 21:02 
GeneralRe: typdef struct MFC Pin
mesajflaviu31-Aug-10 22:53
mesajflaviu31-Aug-10 22:53 
Here is my trial :

//	CMyView.h

typedef struct tagLine{
	CDrawObj* pObj;
	UINT nHandle;
	CPoint point;
}Line;

...
...
	CList<Line,Line> m_line;


//	CMyView.cpp

void CMyView::AddLineStruct(CDrawObj* pObj, UINT nHandle, CPoint point)
{
	Line LineStruct;
	LineStruct.pObj = pObj;
	LineStruct.nHandle = nHandle;
	LineStruct.point = point;
	m_line.AddTail(LineStruct);
}




//	CSelectTool.cpp

void CSelectTool::OnLButtonDown(CNetMapView* pView, UINT nFlags, const CPoint& point)
{
...
	pView->AddLineStruct(pObjLine,nHandle,point);
...
}

void CSelectTool::OnMouseMove(CNetMapView* pView, UINT nFlags, const CPoint& point)
{
	// here I try access elements of pView->m_line
	POSITION pos = pView->m_line.GetHeadPosition();
	while(pos != NULL)
	{
		pView->Line data = pView->m_line.GetNext(pos); // here is an error :
		//	error C2273: 'function-style cast' : illegal as right side of '->' operator
		// error C2146: syntax error : missing ';' before identifier 'data'
	}

}

still , I don't know how to acces elemts of the structure ....
GeneralRe: typdef struct MFC Pin
mesajflaviu31-Aug-10 22:59
mesajflaviu31-Aug-10 22:59 
GeneralRe: typdef struct MFC Pin
Cedric Moonen31-Aug-10 23:06
Cedric Moonen31-Aug-10 23:06 
GeneralRe: typdef struct MFC Pin
Cedric Moonen31-Aug-10 23:02
Cedric Moonen31-Aug-10 23:02 
QuestionRe: typdef struct MFC Pin
CPallini31-Aug-10 23:06
mveCPallini31-Aug-10 23:06 
AnswerRe: typdef struct MFC Pin
mesajflaviu1-Sep-10 0:33
mesajflaviu1-Sep-10 0:33 
GeneralRe: typdef struct MFC Pin
CPallini1-Sep-10 2:03
mveCPallini1-Sep-10 2:03 
Questionre: winsock multiplexed server using select() Pin
Alan Kurlansky31-Aug-10 9:50
Alan Kurlansky31-Aug-10 9:50 
AnswerRe: re: winsock multiplexed server using select() Pin
Moak31-Aug-10 10:36
Moak31-Aug-10 10:36 
QuestionCrash ribbon when PC enter in sleep/standby mode Pin
Dansveen31-Aug-10 2:47
Dansveen31-Aug-10 2:47 
AnswerRe: Crash ribbon when PC enter in sleep/standby mode Pin
Eugen Podsypalnikov31-Aug-10 9:27
Eugen Podsypalnikov31-Aug-10 9:27 
GeneralRe: Crash ribbon when PC enter in sleep/standby mode Pin
Dansveen1-Sep-10 10:52
Dansveen1-Sep-10 10:52 
GeneralRe: Crash ribbon when PC enter in sleep/standby mode Pin
Eugen Podsypalnikov1-Sep-10 22:34
Eugen Podsypalnikov1-Sep-10 22:34 
GeneralRe: Crash ribbon when PC enter in sleep/standby mode Pin
Dansveen2-Sep-10 3:09
Dansveen2-Sep-10 3:09 
GeneralRe: Crash ribbon when PC enter in sleep/standby mode Pin
Eugen Podsypalnikov2-Sep-10 3:22
Eugen Podsypalnikov2-Sep-10 3:22 
GeneralRe: Crash ribbon when PC enter in sleep/standby mode Pin
Dansveen2-Sep-10 9:11
Dansveen2-Sep-10 9:11 
GeneralRe: Crash ribbon when PC enter in sleep/standby mode Pin
Eugen Podsypalnikov2-Sep-10 20:55
Eugen Podsypalnikov2-Sep-10 20:55 
QuestionCan we create DSN name and set a path through Install shield Pin
raju_shiva30-Aug-10 20:48
raju_shiva30-Aug-10 20:48 

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.