CreateHwndRenderTarget blocks the input like BlockInput

Started by
2 comments, last by Mr.Long 9 years, 6 months ago

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.

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 ]

Please don't PM me with questions. Post them in the forums for everyone's benefit, and I can embarrass myself publicly.

You don't forget how to play when you grow old; you grow old when you forget how to play.

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.

plz delete

This topic is closed to new replies.

Advertisement