Hmmm interesting, I set it to MM_TEXT, and it reports to me that I did set MM_TEXT.
I tried to use the aspecty, but either I am just totally missing your meaning, or I am doing it wrong. Basically I took the client width/height to get the aspect ratio, but its stretching the image instead of fitting it accordingly. I will attach two images which should help a lot more than words. I appreciate the help a lot
The red-blue box is the GDI indicating the rectangle I am trying to draw.
This is defined again as
Code:
CRect myRect(200, 100, 500, 400);
My directx setup is as follows...
Code:
g_pD3D = Direct3DCreate9( D3D_SDK_VERSION );
D3DDISPLAYMODE d3ddm;
g_pD3D->GetAdapterDisplayMode( D3DADAPTER_DEFAULT, &d3ddm );
D3DPRESENT_PARAMETERS d3dpp;
ZeroMemory( &d3dpp, sizeof(d3dpp) );
d3dpp.Windowed = TRUE;
d3dpp.SwapEffect = D3DSWAPEFFECT_DISCARD;
d3dpp.BackBufferFormat = d3ddm.Format;
d3dpp.EnableAutoDepthStencil = TRUE;
d3dpp.AutoDepthStencilFormat = D3DFMT_D16;
d3dpp.PresentationInterval = D3DPRESENT_INTERVAL_IMMEDIATE;
g_pD3D->CreateDevice( D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, GetSafeHwnd(),
D3DCREATE_SOFTWARE_VERTEXPROCESSING,
&d3dpp, &g_pd3dDevice );
loadTexture();
g_pd3dDevice->CreateVertexBuffer( 4*sizeof(Vertex), D3DUSAGE_WRITEONLY,
D3DFVF_CUSTOMVERTEX, D3DPOOL_DEFAULT,
&g_pVertexBuffer, NULL );
void *pVertices = NULL;
setupVerts();
g_pVertexBuffer->Lock( 0, 0, (void**)&pVertices, 0 );
memcpy( pVertices, verticies, sizeof(verticies) );
g_pVertexBuffer->Unlock();
D3DXMATRIX matProj;
D3DXMatrixPerspectiveFovLH( &matProj, D3DXToRadian( 45.0f ),
640.0f / 480.0f, 0.1f, 100.0f );
g_pd3dDevice->SetTransform( D3DTS_PROJECTION, &matProj );
g_pd3dDevice->SetRenderState(D3DRS_LIGHTING, FALSE);
Dunno if that will help, but I would appeciate input. It shouldn't be this hard, or I am just thinking about it in the wrong way. Either way, pointers to tutorials or a good explanation is the best. Thanks again