Jump to content
  • Advertisement
Sign in to follow this  
Mr.Long

CreateHwndRenderTarget blocks the input like BlockInput

This topic is 1349 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hey,

my loup lead me to the conclusion that sometimes if i call CreateHwndRenderTarget the input to my PC gets blocked.

830682_cw89cztx86.png

 

This Message means: "MSVS Express 2013 detected that the Userinput is blocked. Possible solutions are a modal Dialog or a Task that requires a User Input Block."

I realy don't know why i get this message... I don't know what im doing wrong.

But still a small code snippet:

HRESULT CRenderTarget::fn_CreateDeviceResources(HWND hHwnd)
{
	HRESULT hr = S_OK;
	if (!m_pRenderTarget)
	{
		RECT rc;
		GetClientRect(hHwnd, &rc);
		D2D1_SIZE_U size = D2D1::SizeU(rc.right - rc.left, rc.bottom - rc.top);
		hr = m_pDirect2dFactory->CreateHwndRenderTarget(D2D1::RenderTargetProperties(), D2D1::HwndRenderTargetProperties(hHwnd, size), &m_pRenderTarget);
	}
	return hr;
}

It's state-dependent wether CreateHwndRenderTarget blocks the input on the first call or the second call.

The strange thing is, that yesterday everthing works fine, but today i get this problem.

Perhaps anyone know this problem?

 

Thanks and sorry for my bad english.

Edited by Mr.Long

Share this post


Link to post
Share on other sites
Advertisement

Not a solution (maybe a clue), but are you getting that error only when running it in debug mode from within Visual Studio?

 

I ran into a similar problem some time ago (which I was not able to resolve). However, I found that I could run my application from the desktop (versus from within Visual Studio) without error. Some googling at the time indicated Visual Studio settings may have been corrupted but I wasn't able to find any changes or resetting that helped.

 

[ Ihr Englisch ist viel besser als mein Deutsch wink.png ]

Edited by Buckeye

Share this post


Link to post
Share on other sites

Interessant, dass man das rauslesen kann^^

The first thing i did: start Visual Studio with: WDExpress.exe /ResetSettings, so i think the Settings aren't the problem.

Then i tried executing the exe from the Explorer - the same Problem... But now, after some experience i was able to capture a Stacktrace:

http://www.loaditup.de/files/830696_394az7cfd5.jpg

(Take a look at the many error windows)

perhaps the Stacktrace give some  clarity... I do not.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!