0
John Miogi's Avatar
Go4Expert Member
I want to show you my code structure, but how do I put code in blocks? lol, I am useless...
I got the call to work, but I need to print out the timer in Int values, I have a drop-down menu which I have start, and stop. I start with a flag true, and stop with flag false. could you please help me with how I could get the timer to go to window and count in int value? and where would I put this code..

Thanks agian..
0
shabbir's Avatar, Join Date: Jul 2004
Go4Expert Founder
Have a variable in the class and increment in the every timer event.
0
John Miogi's Avatar
Go4Expert Member
I want to show you my code structure, but how do I put code in blocks? lol, I am useless...
I got the call to work, but I need to print out the timer in Int values, I have a drop-down menu which I have start, and stop. I start with a flag true, and stop with flag false. could you please help me with how I could get the timer to go to window and count in int value? and where would I put this code..

Thanks agian..



Code:
void CDrawMFCView::OnTimer(UINT nIDEvent) 
{
	// TODO: Add your message handler code here and/or call default
	if(flag6)
	{
	CView::OnTimer(nIDEvent);
	}
}

void CDrawMFCView::OnTimerStart() 
{
	// TODO: Add your command handler code here
	flag6=1;
	SetTimer(2,5000,NULL);
	MessageBox("100");
}

void CDrawMFCView::OnTimerStop() 
{
	// TODO: Add your command handler code here
	flag6=0;
}
0
John Miogi's Avatar
Go4Expert Member
Ok make up a variable, private, or public? and put the variable in the function and increament it with the timer? Ok how could I set that up.. and while you are in the mood to help(hehe), is it easy to get mouse coordinated when clicked (left or rt button) anywhere on screen to to show y, and x location? This is a bonus part us my lab, but I need this bonus to pass the course cause I am borderline..

Thanks Shabbir..
0
shabbir's Avatar, Join Date: Jul 2004
Go4Expert Founder
Yes getting the mouse point location is very much possible but I would suggest you to go one step at a time. Is the Timer thing working.
0
John Miogi's Avatar
Go4Expert Member
I am sorry I did not get back to you, I was waiting for an e-mail reply to tell me that I revieved a reply..

Anyhow, yes I got the counter(timer) thing working. I have been on the coordinates of the mouse for the last three hours. I need to click on screen after prog executes and it will show x, and y coordinates. I have not figured it out, except that I have been messing around with
getcursorposition. I dont know if this is what I am suppose to use, but at this time, I am just going around in circles..

BTW, Thanks alot for your help earlier and just to note that This is not from a lack of trying.. I have been in from of my laptop for three straight days trying to do these things and I am almost done, except for the mouse thingy.
0
shabbir's Avatar, Join Date: Jul 2004
Go4Expert Founder
Quote:
Originally Posted by John Miogi
I am sorry I did not get back to you, I was waiting for an e-mail reply to tell me that I revieved a reply..
Did you get the email reply. We have moved to another hosting and server and is just curious if anything is not functioning as expected.

Quote:
Originally Posted by John Miogi
Anyhow, yes I got the counter(timer) thing working.
Thats good.
Quote:
Originally Posted by John Miogi
I have been on the coordinates of the mouse for the last three hours. I need to click on screen after prog executes and it will show x, and y coordinates. I have not figured it out, except that I have been messing around with
getcursorposition. I dont know if this is what I am suppose to use, but at this time, I am just going around in circles..
Thats the best way to be doing but what you can do is have some variable of type point which stores the mouse position for the WM_MOUSEMOVE event and updates in mouse move.

Quote:
Originally Posted by John Miogi
BTW, Thanks alot for your help earlier and just to note that This is not from a lack of trying.. I have been in from of my laptop for three straight days trying to do these things and I am almost done, except for the mouse thingy.
My pleasure