Quantcast
Channel: GameDev.net
Viewing all articles
Browse latest Browse all 17625

Problem to create a window and redirect the rendering to it with win32 api

$
0
0

Hi !

I use win32 to display a window with directx rendering inside it, but the window never appears.

I saw that the rendering is done offline and is not redirected to a window.

int WINAPI WinMain(HINSTANCE hinstance, HINSTANCE hPrevInstance,
				   LPSTR lpCmdLine, int nCmdShow)
{
	
	HWND hwnd;
	MSG msg;
	WNDCLASS wc;
	//CMFCMenuResolutionDlg resoltionChoice;
	/*LPPOINT pixelCoordinates;*/
	/*PhysX physX;*/

	RECT rc;
	GetWindowRect(GetDesktopWindow(), &rc);

	HANDLE processHandle = GetCurrentProcess();

	BOOL returnedValue = SetPriorityClass(processHandle, THREAD_PRIORITY_TIME_CRITICAL);

	DirectInput::getInstance()->createDirectInputInstance(hinstance);


	D3D11Rendering::width = 3840.0f; //(float)rc.right;
	D3D11Rendering::height = 2160.0f; // (float)rc.bottom;

	wc.style = 0;
	wc.lpfnWndProc = MainWndProc;
	wc.cbClsExtra = 0;
	wc.cbWndExtra = 0 …

Viewing all articles
Browse latest Browse all 17625

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>