Drawbox not showing...

Posts 1–14 of 14 · Page 1 of 1
Drawbox not showing...
I have no errors with my base, everything is declared and defined, as it should be. The only problem I'm having is the "Drawbox(" not showing up in test9 when I try to test it, could you help me?

Here is my base,
Code:
/* This is a Base made by xGhost, built from scratch. */

#include "Menu.h"
#include <iostream>

oEndScene pEndScene;

void BuildMenu(char * menuname, int x, int y, int h, int w, DWORD TITLECOL, DWORD BACKCOLOR, DWORD BORDERCOLOR, LPDIRECT3DDEVICE9 pDevice)
{
		DrawBox(5,6,210,124,D3DCOLOR_XRGB(174,174,174),D3DCOLOR_ARGB(0,0,0,0),pDevice); //Menu Back 
		return;
}


HRESULT WINAPI EndScene(LPDIRECT3DDEVICE9 pDevice)
{
	return pEndScene(pDevice);
}
I'm new I can't learn by only reading I need to do it and learn from others, it's how I learn it can't be changed... I've tried several things to make it work but nothing seems to be working for me. I'm asking the community for help, I only ask that you don't post things like "Read a book"...
D3DCOLOR_ARGB(0,0,0,0)
Alpha represents opacity so it should be 255, not zero.
Quote Originally Posted by NOOB View Post


Alpha represents opacity so it should be 255, not zero.
Tried that and still didn't show up...
You need to call your BuildMenu function in EndScene. Also, a void does not return a value, so you should not have return at the end of that function.
Would it work like this, the basis of this code is from your base CodeDemon...

Code:
HRESULT WINAPI EndScene(LPDIRECT3DDEVICE9 pDevice)
{
	BuildMenu("xGhost",0,0,180,200,Red,Black,Green,pDevice);
	return pEndScene(pDevice);
}
why do u have a return in a void?
are u hooking the endscene?
I just have a return because I'm use to using it because of Tutorials, I added the EndScene to see if the Box decided to show when I used it but Epicly failed... xD
Quote Originally Posted by CodeDemon View Post
You need to call your BuildMenu function in EndScene. Also, a void does not return a value, so you should not have return at the end of that function.
The "return;" is perfectly legitimate in a void. I use it myself to cut short of a function when certain circumstances require it to.

Quote Originally Posted by GodHack2 View Post
why do u have a return in a void?
are u hooking the endscene?
The "return;" is perfectly legitimate in a void. I use it myself to cut short of a function when certain circumstances require it to.
Code:
/* This is a Base made by xGhost, built from scratch. */

#include "Menu.h"
#include <iostream>

oEndScene pEndScene;

void BuildMenu(char * menuname, int x, int y, int h, int w, DWORD TITLECOL, DWORD BACKCOLOR, DWORD BORDERCOLOR, LPDIRECT3DDEVICE9 pDevice)
{
		DrawBox(5,6,210,124,D3DCOLOR_XRGB(174,174,174),D3DCOLOR_ARGB(0,0,0,0),pDevice); //Menu Back 
		//Dont need to return here.
}


HRESULT WINAPI EndScene(LPDIRECT3DDEVICE9 pDevice)
{
        BuildMenu( /*Args Here*/);
	return pEndScene(pDevice);
}
Code:
/* This is a Base made by ᴺᴼᴼᴮ, built from scratch. */

#include "Menu.h"
#include <iostream>

oEndScene pEndScene;


HRESULT WINAPI EndScene(LPDIRECT3DDEVICE9 pDevice)
{
        DrawBox(5,6,210,124,D3DCOLOR_XRGB(174,174,174),D3DCOLOR_ARGB(0,0,0,0),pDevice); //Menu Back 
	return pEndScene(pDevice);
}
Quote Originally Posted by NOOB View Post
Code:
/* This is a Base made by ᴺᴼᴼᴮ, built from scratch. */

#include "Menu.h"
#include <iostream>

oEndScene pEndScene;


HRESULT WINAPI EndScene(LPDIRECT3DDEVICE9 pDevice)
{
        DrawBox(5,6,210,124,D3DCOLOR_XRGB(174,174,174),D3DCOLOR_ARGB(0,0,0,0),pDevice); //Menu Back 
	return pEndScene(pDevice);
}
I tried that before doest really change or do anything... I know I might sound retarded but I don't know what ARGs are...?


Quote Originally Posted by flameswor10 View Post
You did everything wrong D:
How so...?
You did everything wrong D:
ARGB
they are the basic 3 colors that makes every other color
R = red
G = Green
B = Blue

and the A is the alpha = transparity
This still wont work if you dont detour (hook) endscene which makes all the functions your using available else it wont do shit.
Posts 1–14 of 14 · Page 1 of 1

Post a Reply

Tags for this Thread

None

Talk with us