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

C / C++ / MFC

 
QuestionWeird error... Pin
Megidolaon15-Oct-08 11:08
Megidolaon15-Oct-08 11:08 
AnswerRe: Weird error... PinPopular
led mike15-Oct-08 11:32
led mike15-Oct-08 11:32 
GeneralRe: Weird error... Pin
Megidolaon15-Oct-08 11:37
Megidolaon15-Oct-08 11:37 
GeneralRe: Weird error... Pin
CPallini15-Oct-08 21:51
mveCPallini15-Oct-08 21:51 
QuestionRe: Weird error... Pin
David Crow15-Oct-08 17:29
David Crow15-Oct-08 17:29 
Questionautomatically click a button in another application Pin
Russell'15-Oct-08 9:34
Russell'15-Oct-08 9:34 
QuestionRe: automatically click a button in another application Pin
David Crow15-Oct-08 10:57
David Crow15-Oct-08 10:57 
AnswerRe: automatically click a button in another application Pin
Russell'15-Oct-08 11:28
Russell'15-Oct-08 11:28 
Nice suggestion, thanks.
Never done anything like this before, so I started with something easy...but after many test this code it is not seems to work. D'Oh! | :doh:
After that the timer is started I have some seconds to activate the notepad window...but nothing is written there...do you see any error in the way I'm using sendmessage?

void CClickAndCaptureDlg::OnTimer(UINT_PTR nIDEvent)
{
	if(nIDEvent==ID_TIMER){
		{
			TRACE("Timer arrived\n");
			// Stop the timer
			KillTimer(m_Timer);
		}

		// Get the Active Window
		CWnd* pWnd=GetForegroundWindow();
		if(!pWnd) return;

		// Send messages to the other program
		{
			TRACE("Sending messages\n");
			pWnd->SendMessage(WM_CHAR,'H',0);
			pWnd->SendMessage(WM_CHAR,'E',0);
			pWnd->SendMessage(WM_CHAR,'L',0);
			pWnd->SendMessage(WM_CHAR,'L',0);
			pWnd->SendMessage(WM_CHAR,'O',0);
			pWnd->SendMessage(WM_KEYDOWN,VK_RETURN,0);
		}
	}

	CDialog::OnTimer(nIDEvent);
}



Russell

GeneralRe: automatically click a button in another application Pin
Russell'15-Oct-08 11:57
Russell'15-Oct-08 11:57 
QuestionSpin Control Pin
WayneK10015-Oct-08 9:03
WayneK10015-Oct-08 9:03 
AnswerRe: Spin Control Pin
David Crow15-Oct-08 10:58
David Crow15-Oct-08 10:58 
QuestionWhy the activex .ocx can't find msvcr80.dll & mfc80.dll even if I install the 2005 sp1 redist.exe ? Pin
oppstp15-Oct-08 7:11
oppstp15-Oct-08 7:11 
GeneralRe: Why the activex .ocx can't find msvcr80.dll & mfc80.dll even if I install the 2005 sp1 redist.exe ? Pin
oppstp16-Oct-08 0:07
oppstp16-Oct-08 0:07 
QuestionMFC App (Visual Studio 6) hangs when you click File, Open. Pin
Keith (MapMan)15-Oct-08 5:37
Keith (MapMan)15-Oct-08 5:37 
QuestionRe: MFC App (Visual Studio 6) hangs when you click File, Open. Pin
Mark Salsbery15-Oct-08 6:04
Mark Salsbery15-Oct-08 6:04 
AnswerRe: MFC App (Visual Studio 6) hangs when you click File, Open. Pin
Keith (MapMan)15-Oct-08 6:12
Keith (MapMan)15-Oct-08 6:12 
GeneralRe: MFC App (Visual Studio 6) hangs when you click File, Open. Pin
Mark Salsbery15-Oct-08 6:22
Mark Salsbery15-Oct-08 6:22 
GeneralRe: MFC App (Visual Studio 6) hangs when you click File, Open. Pin
Keith (MapMan)15-Oct-08 6:45
Keith (MapMan)15-Oct-08 6:45 
GeneralRe: MFC App (Visual Studio 6) hangs when you click File, Open. Pin
Mark Salsbery15-Oct-08 6:54
Mark Salsbery15-Oct-08 6:54 
GeneralRe: MFC App (Visual Studio 6) hangs when you click File, Open. Pin
Keith (MapMan)15-Oct-08 7:12
Keith (MapMan)15-Oct-08 7:12 
GeneralRe: MFC App (Visual Studio 6) hangs when you click File, Open. Pin
Keith (MapMan)15-Oct-08 22:55
Keith (MapMan)15-Oct-08 22:55 
GeneralRe: MFC App (Visual Studio 6) hangs when you click File, Open. Pin
Mark Salsbery16-Oct-08 4:14
Mark Salsbery16-Oct-08 4:14 
QuestionRe: MFC App (Visual Studio 6) hangs when you click File, Open. Pin
David Crow15-Oct-08 7:23
David Crow15-Oct-08 7:23 
AnswerRe: MFC App (Visual Studio 6) hangs when you click File, Open. Pin
Keith (MapMan)15-Oct-08 22:40
Keith (MapMan)15-Oct-08 22:40 
QuestionRe: MFC App (Visual Studio 6) hangs when you click File, Open. Pin
Cosmic Egg15-Oct-08 6:07
Cosmic Egg15-Oct-08 6:07 

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.