Click here to Skip to main content
15,888,351 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How to display '&' text on CMFCToolBarButton Pin
Un Suthee8-Jun-09 12:47
Un Suthee8-Jun-09 12:47 
GeneralRe: How to display '&' text on CMFCToolBarButton Pin
«_Superman_»8-Jun-09 15:39
professional«_Superman_»8-Jun-09 15:39 
GeneralRe: How to display '&' text on CMFCToolBarButton Pin
wolfplan8-Jun-09 17:29
wolfplan8-Jun-09 17:29 
GeneralRe: How to display '&' text on CMFCToolBarButton Pin
Un Suthee9-Jun-09 8:17
Un Suthee9-Jun-09 8:17 
AnswerRe: How to display '&' text on CMFCToolBarButton Pin
yuanbo8610228-Jun-09 19:30
yuanbo8610228-Jun-09 19:30 
QuestionUnhandled exception access violation on function call. Any tips on how to proceed Pin
ujwal koneru8-Jun-09 9:46
ujwal koneru8-Jun-09 9:46 
QuestionRe: Unhandled exception access violation on function call. Any tips on how to proceed Pin
CPallini8-Jun-09 9:55
mveCPallini8-Jun-09 9:55 
AnswerRe: Unhandled exception access violation on function call. Any tips on how to proceed Pin
ujwal koneru8-Jun-09 10:43
ujwal koneru8-Jun-09 10:43 
the definitions seems to be fine.


static void   MouseEvent( int a, int b, int c, int d);
static void   keyEvent( unsigned char key, int x, int y);
static void   mainLoop(void);


int main(int argc, char **argv)
{
	glutInit(&argc, argv);
    init();

    arVideoCapStart();
    argMainLoop( MouseEvent, keyEvent, mainLoop );
	return (0);
}

static void   MouseEvent( int a, int b, int c, int d)
{
}
static void   keyEvent( unsigned char key, int x, int y)
{
	char message[100];
    /* quit if the ESC key is pressed */
    if( key == 0x1b ) {
        printf("*** %f (frame/sec)\n", (double)count/arUtilTimer());
        cleanup();
        exit(0);
    }

    if( key == 'c' ) {
        printf("*** %f (frame/sec)\n", (double)count/arUtilTimer());
        count = 0;

		//tracker->setUseDetectLite(false);
        if( mode ) printf("Continuous mode: Using arGetTransMatCont.\n");
         else      printf("One shot mode: Using arGetTransMat.\n");
    }
	if(key =='r'|| key =='R')
	{
		out<<"***";
		std::cin>>message;
		out<<message<<std::endl;
		for(int j=0; j<3; j++)
		for(int k=0; k<3; k++)
			rot[j][k] = model[j][k];
		arGetAngle(rot, &rx, &ry, &rz);
		tx =model[0][3];
		ty =model[1][3];
		tz = model[2][3];

		out<<tx<<" "<<ty<<" "<<tz<<" "<<rx<<" "<<ry<<" "<<rz<<std::endl;
	}
}

/* main loop */
static void mainLoop(void)
{
    static int      contF = 0;
    ARUint8         *dataPtr;
	ARToolKitPlus::ARMarkerInfo    *marker_info;
    int             marker_num;
    int             j, k;

    /* grab a vide frame */
    if( (dataPtr = (ARUint8 *)arVideoGetImage()) == NULL ) {
        arUtilSleep(2);
        return;
    }
    if( count == 0 ) arUtilTimerReset();
    count++;

    argDrawMode2D();
    argDispImage( dataPtr, 0,0 );


    /* detect the markers in the video frame */
	    int markerId = tracker->calc(dataPtr,-1,true, &marker_info);
		 float conf = (float)tracker->getConfidence();
    // use the result of calc() to setup the OpenGL transformation
    glMatrixMode(GL_MODELVIEW);
	glLoadIdentity();
    glLoadMatrixf(tracker->getModelViewMatrix());
    printf("\n\nFound marker %d  (confidence %d%%)\n\nPose-Matrix:\n  ", markerId, (int(conf*100.0f)));
	for(int i=0; i<16; i++)
		printf("%.2f  %s", tracker->getModelViewMatrix()[i], (i%4==3)?"\n  " : "");

    /* get the transformation between the marker and the real camera */
    tracker->getARMatrix(model);
    contF = 1;

   // draw( patt_trans );

    argSwapBuffers();
}

GeneralRe: Unhandled exception access violation on function call. Any tips on how to proceed Pin
«_Superman_»8-Jun-09 15:49
professional«_Superman_»8-Jun-09 15:49 
Questiondissapearence of dialog parts in c++ Pin
andrassy8-Jun-09 8:51
andrassy8-Jun-09 8:51 
AnswerRe: dissapearence of dialog parts in c++ Pin
David Crow8-Jun-09 10:30
David Crow8-Jun-09 10:30 
AnswerRe: dissapearence of dialog parts in c++ Pin
«_Superman_»8-Jun-09 15:54
professional«_Superman_»8-Jun-09 15:54 
GeneralRe: dissapearence of dialog parts in c++ Pin
andrassy9-Jun-09 6:55
andrassy9-Jun-09 6:55 
GeneralRe: dissapearence of dialog parts in c++ Pin
andrassy21-Jul-09 10:09
andrassy21-Jul-09 10:09 
QuestionParenting a modal CDialog Pin
TyrionTheImp8-Jun-09 8:17
TyrionTheImp8-Jun-09 8:17 
AnswerRe: Parenting a modal CDialog Pin
Sarath C8-Jun-09 9:09
Sarath C8-Jun-09 9:09 
GeneralRe: Parenting a modal CDialog Pin
TyrionTheImp9-Jun-09 4:40
TyrionTheImp9-Jun-09 4:40 
QuestionRe: Parenting a modal CDialog Pin
David Crow8-Jun-09 10:22
David Crow8-Jun-09 10:22 
AnswerRe: Parenting a modal CDialog Pin
TyrionTheImp9-Jun-09 4:42
TyrionTheImp9-Jun-09 4:42 
GeneralRe: Parenting a modal CDialog Pin
TyrionTheImp21-Jun-09 4:05
TyrionTheImp21-Jun-09 4:05 
Questioninet_addr function and leading zeros Pin
JBAK_CP8-Jun-09 8:16
JBAK_CP8-Jun-09 8:16 
AnswerRe: inet_addr function and leading zeros Pin
CPallini8-Jun-09 8:59
mveCPallini8-Jun-09 8:59 
GeneralRe: inet_addr function and leading zeros Pin
JBAK_CP8-Jun-09 9:15
JBAK_CP8-Jun-09 9:15 
QuestionP.C. Serial Communication for Visual C++ Dialog Pin
Member 17278168-Jun-09 8:14
Member 17278168-Jun-09 8:14 
AnswerRe: P.C. Serial Communication for Visual C++ Dialog Pin
Stuart Dootson8-Jun-09 9:35
professionalStuart Dootson8-Jun-09 9:35 

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.