Jump to content

  • Log In with Google      Sign In   
  • Create Account


font text


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
5 replies to this topic

#1 phil67rpg   Members   -  Reputation: 767

Like
-1Likes
Like

Posted 29 October 2012 - 09:41 PM

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.

Sponsor:

#2 SiCrane   Moderators   -  Reputation: 9386

Like
3Likes
Like

Posted 30 October 2012 - 07:35 AM

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.

#3 BeerNutts   Crossbones+   -  Reputation: 2550

Like
3Likes
Like

Posted 30 October 2012 - 08:22 AM

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.
My Gamedev Journal: 2D Game Making, the Easy Way

---(Old Blog, still has good info): 2dGameMaking
-----
"No one ever posts on that message board; it's too crowded." - Yoga Berra (sorta)

#4 phil67rpg   Members   -  Reputation: 767

Like
0Likes
Like

Posted 30 October 2012 - 01:20 PM

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.

#5 yewbie   GDNet+   -  Reputation: 665

Like
0Likes
Like

Posted 30 October 2012 - 01:23 PM

I am not exactly sure what your problem is.

#6 BeerNutts   Crossbones+   -  Reputation: 2550

Like
0Likes
Like

Posted 30 October 2012 - 01:27 PM

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.
My Gamedev Journal: 2D Game Making, the Easy Way

---(Old Blog, still has good info): 2dGameMaking
-----
"No one ever posts on that message board; it's too crowded." - Yoga Berra (sorta)




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS