Missile Command

The Partridge Family were neither partridges nor a family. Discuss.
User avatar
Asimov
Posts: 814
Joined: May 19th, 2012, 11:38 pm

Re: Missile Command

Post by Asimov » September 15th, 2012, 7:32 pm

Hi Lux,

Thanks will look at this in a few days when I have finished this 3D project.
----> Asimov
"You know no matter how much I think I have learnt. I always end up hitting brick walls"
http://www.asimoventerprises.co.uk

User avatar
XxWalKaxX
Posts: 244
Joined: June 11th, 2012, 7:15 pm

Re: Missile Command

Post by XxWalKaxX » September 19th, 2012, 3:28 pm

Holy freeholies this is long topic!
What you call a bug...I call a new feature!

User avatar
Asimov
Posts: 814
Joined: May 19th, 2012, 11:38 pm

Re: Missile Command

Post by Asimov » September 19th, 2012, 4:42 pm

Hi Walker,

It will get longer once I have finished this 3D project I am working on.
----> Asimov
"You know no matter how much I think I have learnt. I always end up hitting brick walls"
http://www.asimoventerprises.co.uk

wookie4hyperdrives
Posts: 1
Joined: November 29th, 2013, 11:31 pm

Re: Missile Command

Post by wookie4hyperdrives » November 30th, 2013, 8:25 am

AWESOME absolute!!!

User avatar
bobloblaw
Posts: 100
Joined: April 15th, 2013, 3:05 am
Location: Earth, USA, California, SF Bay Area
Contact:

Re: Missile Command

Post by bobloblaw » December 3rd, 2013, 7:50 am

LuX wrote:To get the mouse disappear, add "ShowCursor(false);" at windows.cpp after the form creation code...
Not Sure if this is where Lux put it but in my file placing the code here worked like a charm.

Windows.cpp

Code: Select all

int WINAPI wWinMain( HINSTANCE hInst,HINSTANCE,LPWSTR,INT )
{
	WNDCLASSEX wc = { sizeof( WNDCLASSEX ),CS_CLASSDC,MsgProc,0,0,
                      GetModuleHandle( NULL ),NULL,NULL,NULL,NULL,
                      L"Chili DirectX Framework Window",NULL };
    wc.hIconSm = (HICON)LoadImage( hInst,MAKEINTRESOURCE( IDI_APPICON16 ),IMAGE_ICON,16,16,0 );
	//wc.hIcon   = (HICON)LoadImage( hInst,MAKEINTRESOURCE( IDI_APPICON32 ),IMAGE_ICON,32,32,0 );
	wc.hIcon   = (HICON)LoadImage( hInst,MAKEINTRESOURCE( IDI_APPICON48 ),IMAGE_ICON,48,48,0 );
	wc.hCursor = LoadCursor( NULL,IDC_ARROW ); 
    RegisterClassEx( &wc );
	
	RECT wr;
	wr.left = 650;
	wr.right = SCREENWIDTH + wr.left;
	wr.top = 150;
	wr.bottom = SCREENHEIGHT + wr.top;
	AdjustWindowRect( &wr,WS_CAPTION | WS_MINIMIZEBOX | WS_SYSMENU,FALSE );
    HWND hWnd = CreateWindowW( L"Chili DirectX Framework Window",L"Consortium of Planets: Unit 596",
                              WS_CAPTION | WS_MINIMIZEBOX | WS_SYSMENU,wr.left,wr.top,wr.right-wr.left,wr.bottom-wr.top,
                              NULL,NULL,wc.hInstance,NULL );

    ShowWindow( hWnd,SW_SHOWDEFAULT );
	ShowCursor(false); // ------------------------ Added to remove mouse ----------------------\\
    UpdateWindow( hWnd );

	Game theGame( hWnd,kServ,mServ );
	
    MSG msg;
    ZeroMemory( &msg,sizeof( msg ) );
    while( msg.message != WM_QUIT )
    {
        if( PeekMessage( &msg,NULL,0,0,PM_REMOVE ) )
        {
            TranslateMessage( &msg );
            DispatchMessage( &msg );
        }
        else
		{
			theGame.Go();
		}
    }

    UnregisterClass( L"Chili DirectX Framework Window",wc.hInstance );
    return 0;
}
Here for your Artistic needs, Pixel or Vector I love it all. Check it out - Click Me

User avatar
LuX
Posts: 1492
Joined: April 22nd, 2012, 12:33 pm
Location: Finland

Re: Missile Command

Post by LuX » December 3rd, 2013, 1:50 pm

You can pretty much put it anywhere you want. But to make it look good, the mouse should disappear as the window pops up. What I actually use now is have it in the game loop so that if the window has focus, the mouse will be hidden, else it will be visible. Also if there is an error message, the mouse will come visible as well so you see where to click...
ʕ •ᴥ•ʔ

Post Reply