Hi Lux,
Thanks will look at this in a few days when I have finished this 3D project.
Missile Command
Re: Missile Command
----> Asimov
"You know no matter how much I think I have learnt. I always end up hitting brick walls"
http://www.asimoventerprises.co.uk
"You know no matter how much I think I have learnt. I always end up hitting brick walls"
http://www.asimoventerprises.co.uk
Re: Missile Command
Hi Walker,
It will get longer once I have finished this 3D project I am working on.
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
"You know no matter how much I think I have learnt. I always end up hitting brick walls"
http://www.asimoventerprises.co.uk
-
- Posts: 1
- Joined: November 29th, 2013, 11:31 pm
Re: Missile Command
AWESOME absolute!!!
- bobloblaw
- Posts: 100
- Joined: April 15th, 2013, 3:05 am
- Location: Earth, USA, California, SF Bay Area
- Contact:
Re: Missile Command
Not Sure if this is where Lux put it but in my file placing the code here worked like a charm.LuX wrote:To get the mouse disappear, add "ShowCursor(false);" at windows.cpp after the form creation code...
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
Re: Missile Command
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...
ʕ •ᴥ•ʔ