case WM_TIMER:
{
switch(wParam)
{
case ID_TIMER:
{
HRESULT hr=D3DXCreateFont(g_pd3dDevice, //D3D Device
22, //Font height
10, //Font width
FW_NORMAL, //Font Weight
1, //MipLevels
false, //Italic
DEFAULT_CHARSET, //CharSet
OUT_DEFAULT_PRECIS, //OutputPrecision
ANTIALIASED_QUALITY, //Quality
DEFAULT_PITCH|FF_DONTCARE,//PitchAndFamily
"Arial", //pFacename,
&g_font); //ppFont
D3DCOLOR fontColor = D3DCOLOR_XRGB(0,0,0);
RECT rct;
rct.left=200;
rct.right=600;
rct.top=20;
rct.bottom =50;
g_font-> DrawText(NULL,"Welcome to DX9 Pong",-1,&rct,DT_CENTER,fontColor);
KillTimer(hWnd,ID_TIMER);
}
break;
}
return 0;
}
I am using the windows timer function to draw black text to the screen to cover up red text which I already drew to the screen.
font text
I don't know why this is so hard for you to understand: if you make a post and you have a question, then you need to actually ask the question. If you have an error you can't figure out, post the error.
I don't know why you keep tying the DX rope around your neck. Since you are an obvious beginner, you shouldn't be trying to use Direct 3D. And, I don't know why you would keep trying to use the Windows message API when it too isn't the easiest thing to understand. But, for some unknown reason you just HAVE to use D3D.
Explain fully why you're using D3D/MS Windows API instead of something much simpler like SFML.
Explain fully why you're using D3D/MS Windows API instead of something much simpler like SFML.
I am using dx9 because I really want to learn how the professionals do it.I am getting better but it is slow going.I am not going to give up.
I am using dx9 because I really want to learn how the professionals do it.I am getting better but it is slow going.I am not going to give up.
Good that you won't give up, but you're just making things more painful for you than is required. Learn the easier methods, have fun with it, and WHEN YOU'RE READY, you can tackle the more difficult API's like D3D and OpenGL.
Or keep pounding sand like you're doing now.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement