I tried using this function but no menu appeared.
const D3DCOLOR textBlackTrans = D3DCOLOR_ARGB(155,0,0,0);
DrawBox(pDevice,10,40,148,290,textBlackTrans );
Code:
void DrawBox(LPDIRECT3DDEVICE9 pDevice, int x, int y, int w, int h, D3DCOLOR col)
{
struct {
float x,y,z,rhw;
DWORD dwColor;
} qV[4] = { { (float)x , (float)(y+h), 0.0f, 0.0f, col},
{ (float)x , (float)y , 0.0f, 0.0f, col},
{ (float)(x+w), (float)(y+h), 0.0f, 0.0f, col},
{ (float)(x+w), (float)y , 0.0f, 0.0f, col} };
pDevice->SetPixelShader(NULL);
pDevice->SetRenderState(D3DRS_ALPHABLENDENABLE,true);
pDevice->SetRenderState(D3DRS_DESTBLEND,D3DBLEND_INVSRCALPHA);
pDevice->SetTexture(0, NULL);
pDevice->DrawPrimitiveUP(D3DPT_TRIANGLESTRIP,2,qV,sizeof(qV[0]));
}