Click here to Skip to main content
15,886,664 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How to Undo/Redo drawing operation in a dialog based application.? Pin
Chris Losinger9-Jul-12 2:20
professionalChris Losinger9-Jul-12 2:20 
GeneralRe: How to Undo/Redo drawing operation in a dialog based application.? Pin
mbatra319-Jul-12 2:32
mbatra319-Jul-12 2:32 
GeneralRe: How to Undo/Redo drawing operation in a dialog based application.? Pin
Chris Losinger9-Jul-12 3:14
professionalChris Losinger9-Jul-12 3:14 
GeneralRe: How to Undo/Redo drawing operation in a dialog based application.? Pin
Maximilien9-Jul-12 3:18
Maximilien9-Jul-12 3:18 
AnswerRe: How to Undo/Redo drawing operation in a dialog based application.? Pin
CPallini9-Jul-12 2:20
mveCPallini9-Jul-12 2:20 
GeneralRe: How to Undo/Redo drawing operation in a dialog based application.? Pin
mbatra319-Jul-12 2:33
mbatra319-Jul-12 2:33 
AnswerRe: How to Undo/Redo drawing operation in a dialog based application.? Pin
Sunil P V10-Jul-12 0:01
Sunil P V10-Jul-12 0:01 
Generalneed help Opencv with MFC (Solved) Pin
jawadali4779-Jul-12 0:44
jawadali4779-Jul-12 0:44 
hi,
i am developing code using Opencv and MFC in vs 2008. i am getting error:
error C2660: 'SetDlgItemTextW' : function does not take 2 arguments

the complete code is:

//headers files included

#ifdef _DEBUG
#define new DEBUG_NEW
#endif

void mouseEvent( int evt, int x, int y, int flags, void* param );

class CAboutDlg : public CDialog
{
public:
	CAboutDlg();
	.......
        .......
protected:
         .......
}:
	........
        ........
        ........


BEGIN_MESSAGE_MAP(Copencv01Dlg, CDialog)
	.......
        .......
END_MESSAGE_MAP()


// Copencv01Dlg message handlers

BOOL Copencv01Dlg::OnInitDialog()
{
	CDialog::OnInitDialog();

           ........
           ........
	
	MoveWindow(0, 0, 500, 500, 1);
	AfxBeginThread(MyThreadProc, this);
	return TRUE;  
}

UINT Copencv01Dlg::MyThreadProc(LPVOID pParam)
    {
     Copencv01Dlg * me = (Copencv01Dlg *)pParam;
     me->MyThreadProc();
     return TRUE;
    }


void Copencv01Dlg::MyThreadProc()
{ 
	
	cvNamedWindow("MyWindow");

        //assigning the callback function for mouse events
        cvSetMouseCallback("MyWindow", mouseEvent, 0);
        IplImage* img = cvLoadImage("box.png");
        cvShowImage("MyWindow", img);
        cvWaitKey(0);
        cvDestroyWindow("MyWindow");
        cvReleaseImage(&img);
	
}

void Copencv01Dlg::OnSysCommand(UINT nID, LPARAM lParam)
{
........
........
}

void Copencv01Dlg::OnPaint()
{
.........
.........
}

HCURSOR Copencv01Dlg::OnQueryDragIcon()
{
	return static_cast<HCURSOR>(m_hIcon);
}
void mouseEvent(int evt, int x, int y, int flags, void* param)
{
    if(evt==CV_EVENT_LBUTTONDOWN){
		CString cx, cy;
		cx.Format(_T("%d"), x);
		cy.Format(_T("%d"), y);
		SetDlgItemTextW(IDC_Blue, cx);  //error generating line
		SetDlgItemTextW(IDC_Green, cy);  //error generating line
    }
}

can anyone help me with this errors?

Regards
Jawad

modified 9-Jul-12 7:59am.

GeneralRe: need help Opencv with MFC Pin
CPallini9-Jul-12 0:57
mveCPallini9-Jul-12 0:57 
GeneralRe: need help Opencv with MFC Pin
jawadali4779-Jul-12 1:17
jawadali4779-Jul-12 1:17 
GeneralRe: need help Opencv with MFC Pin
Richard MacCutchan9-Jul-12 1:30
mveRichard MacCutchan9-Jul-12 1:30 
GeneralRe: need help Opencv with MFC Pin
jawadali4779-Jul-12 1:59
jawadali4779-Jul-12 1:59 
GeneralRe: need help Opencv with MFC Pin
Jochen Arndt9-Jul-12 1:03
professionalJochen Arndt9-Jul-12 1:03 
GeneralGeneral driver help Pin
Brandon-X120009-Jul-12 0:28
Brandon-X120009-Jul-12 0:28 
GeneralRe: General driver help Pin
Richard MacCutchan9-Jul-12 1:23
mveRichard MacCutchan9-Jul-12 1:23 
GeneralRe: General driver help Pin
Brandon-X1200010-Jul-12 6:55
Brandon-X1200010-Jul-12 6:55 
GeneralRe: General driver help Pin
Richard MacCutchan10-Jul-12 9:04
mveRichard MacCutchan10-Jul-12 9:04 
GeneralRe: General driver help Pin
WebMaster9-Jul-12 3:04
WebMaster9-Jul-12 3:04 
GeneralRe: General driver help Pin
Brandon-X1200010-Jul-12 9:14
Brandon-X1200010-Jul-12 9:14 
GeneralRe: General driver help Pin
WebMaster10-Jul-12 9:08
WebMaster10-Jul-12 9:08 
GeneralRe: General driver help Pin
Brandon-X1200010-Jul-12 9:13
Brandon-X1200010-Jul-12 9:13 
GeneralDifference Between 'Software Architecture' and 'Software Design' Pin
AmbiguousName9-Jul-12 0:06
AmbiguousName9-Jul-12 0:06 
GeneralRe: Difference Between 'Software Architecture' and 'Software Design' Pin
CPallini9-Jul-12 0:59
mveCPallini9-Jul-12 0:59 
GeneralRe: Difference Between 'Software Architecture' and 'Software Design' Pin
Stefan_Lang10-Jul-12 22:47
Stefan_Lang10-Jul-12 22:47 
GeneralRe: Difference Between 'Software Architecture' and 'Software Design' Pin
jschell9-Jul-12 11:49
jschell9-Jul-12 11:49 

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.