Sure, here's how I create the window:
Code:
wcex.cbSize = sizeof( WNDCLASSEX ); //size of the structure
wcex.style = CS_CLASSDC; //the class style
wcex.lpfnWndProc = (WNDPROC)MsgProc; //Window procedure callback
wcex.cbClsExtra = 0; //Extra class bytes
wcex.cbWndExtra = 0; //Extra window bytes
wcex.hInstance = hInstance; //Handle to the app instance
wcex.hIcon = NULL; // icon
wcex.hCursor = LoadCursor(NULL, IDC_ARROW); //cursor
wcex.hbrBackground = (HBRUSH)GetStockObject(GRAY_BRUSH); //bgcolor
wcex.lpszMenuName = NULL; //resource name for the menu
wcex.lpszClassName = "Arkhana"; //class name being created
wcex.hIconSm = NULL; //Small icon handle
RegisterClassEx( &wcex );
//Create the window
wndHandle = CreateWindow( "Arkhana", // Class name to use
Title, // Title bar text
WS_DISABLED, //The window style
0, // The starting x coord
0, // The starting y coord
1024, // The pixel width
768, // The pixel height
NULL, // The parent window, null for desktop
NULL, // The menu for the app - null for none
hInstance, // The handle to the app instance
NULL); // No values passed to the window
Init D3D
Code:
ZeroMemory( &d3dpp, sizeof(d3dpp) );
d3dpp.Windowed = false;
d3dpp.SwapEffect = D3DSWAPEFFECT_FLIP;
d3dpp.BackBufferCount = 1;
d3dpp.BackBufferHeight = 768;
d3dpp.BackBufferWidth = 1024;
d3dpp.PresentationInterval = D3DPRESENT_INTERVAL_DEFAULT;
d3dpp.FullScreen_RefreshRateInHz = D3DPRESENT_RATE_DEFAULT;
d3dpp.BackBufferFormat = Format;
d3dpp.EnableAutoDepthStencil = TRUE;
d3dpp.AutoDepthStencilFormat = D3DFMT_D16;
d3dpp.hDeviceWindow = wndHandle;