Thread: Menu Disappears

Results 1 to 5 of 5
  1. #1
    klofee's Avatar
    Join Date
    Jan 2009
    Gender
    male
    Posts
    36
    Reputation
    10
    Thanks
    2

    Menu Disappears

    I've got this (credits to mmbob):
    Code:
    void ReFont(LPDIRECT3DDEVICE9 pDevice)
    {
        if (g_pDevice != pDevice)
        {
            g_pDevice = pDevice;
            try
            {
                if (Directx.pFont != 0)
                    Directx.pFont->Release();
            } catch (...) {}
            Directx.pFont = 0;
            D3DXCreateFontA(Here is the font options, but doesn't matter...);
        }
    }
    EDIT: Got it. Done without "void".
    Last edited by klofee; 08-30-2010 at 03:32 PM.

  2. #2
    CodeDemon's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    vagina
    Posts
    1,074
    Reputation
    50
    Thanks
    936
    My Mood
    Fine
    ReFont(pDevice); /

  3. The Following User Says Thank You to CodeDemon For This Useful Post:

    klofee (08-30-2010)

  4. #3
    LightzOut's Avatar
    Join Date
    Oct 2009
    Gender
    male
    Posts
    185
    Reputation
    11
    Thanks
    25
    Your gonna have to figure that out on your own. It is easy, no one should have to spoonfeed something this simple.

  5. #4
    klofee's Avatar
    Join Date
    Jan 2009
    Gender
    male
    Posts
    36
    Reputation
    10
    Thanks
    2
    ReFont(pDevice);
    Ty, but i still don't know where to place it.

    I'll try this:
    Code:
    HRESULT WINAPI gellReset(LPDIRECT3DDEVICE9 pDevice, D3DPRESENT_PARAMETERS* pPresentationParameters )
    {
    	Directx.pFont->OnLostDevice();
    
    	HRESULT hRet = pReset(pDevice, pPresentationParameters);
    
    	Directx.pFont->OnResetDevice();
    
    	ReFont(pDevice);
    
    	return hRet;
    }
    Edit:
    Code:
    1>  DirectX.cpp
    1>DirectX.cpp(58): error C3861: 'ReFont': identifier not found
    Last edited by klofee; 08-30-2010 at 02:47 PM.

  6. #5
    DeadLinez's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    http://mpgh.net Sexy Points: 989,576,420
    Posts
    465
    Reputation
    11
    Thanks
    499
    My Mood
    Psychedelic
    Add this to your gellPresent:
    Code:
    if (g_pDevice != pDevice)
    	{
    		g_pDevice = pDevice;
    		try
    		{
    			if (Directx.pFont != 0)
    				Directx.pFont->Release();
    		} catch (...) {}
    		Directx.pFont = 0;
    		D3DXCreateFontA(pDevice, 15, 0, FW_BOLD, 1, 0, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH | FF_DONTCARE, "Arial", &Directx.pFont);

  7. The Following User Says Thank You to DeadLinez For This Useful Post:

    klofee (08-30-2010)

Similar Threads

  1. [Help] Menu Sprite Disappear
    By Dominic95 in forum Combat Arms Hack Coding / Programming / Source Code
    Replies: 11
    Last Post: 09-26-2010, 09:26 PM
  2. Topblast D3D Menu Disappears?
    By mastermods in forum Combat Arms Hack Coding / Programming / Source Code
    Replies: 21
    Last Post: 07-24-2010, 07:54 AM
  3. Fix to menu hacks from disappearing after 1 game
    By machuhoya in forum Combat Arms Discussions
    Replies: 4
    Last Post: 06-27-2010, 05:58 AM
  4. D3D9 Disappearing Menu
    By topblast in forum Combat Arms Hack Coding / Programming / Source Code
    Replies: 45
    Last Post: 06-13-2010, 06:39 PM
  5. Drop Down Menu Disappear?
    By AirforceSS in forum Combat Arms Help
    Replies: 9
    Last Post: 06-09-2010, 07:21 AM