Jump to content
Sign in to follow this  
roarkr

Copy MAP image from another app

Recommended Posts

Hi,

I have a C++ app that uses the Sendit function below to try to get an MAP image to the clipboard.

I have tested it so far to check that I get the correct hThread.

 

Can you, Alex, see what prevents the code below to get the MAP into clipboard?

 

 

 


HWND SendIt(DWORD dwProcessID) {
	HWND hwnd = NULL;
	do {
		hwnd = FindWindowEx(NULL, hwnd, NULL, NULL);
		DWORD dwPID = 0;
		DWORD hThread;
		hThread = GetWindowThreadProcessId(hwnd, &dwPID);
		if (dwPID == dwProcessID && hThread != NULL) {
			PostThreadMessage(hThread, WM_SYSKEYDOWN, VK_MENU, 1);
			PostThreadMessage(hThread, WM_KEYDOWN, VK_LSHIFT, 1);
			PostThreadMessage(hThread, WM_KEYDOWN, 'P', 1);
		}
	} while (hwnd != 0);
	return hwnd; //Ignore that

}

 

Edited by roarkr

Roar Kristensen    www.flightsim4fun.com

P3Dv4 with Opencockpits hardware controlled by OC4BAv4 for immersive PMDG B737/777/747 flying

XPLANE 11 with Opencockpits hardware controlled by OC4BA_XP for immersive  B737 flying

rmMShli.jpg?1 WylQl0J.jpg?3

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...