Jump to content

  • Log In with Google      Sign In   
  • Create Account


GameCodingNinja

Member Since 18 Aug 2005
Offline Last Active Feb 21 2014 12:06 AM

Posts I've Made

In Topic: Getting started with procedural game engine programming

26 January 2014 - 01:38 PM

As I agree with the use of OpenGL portability, if you plan on making a game to sell, all your sales will be on the Windows platform. So use OpenGL because you perfer it over DirectX. Also, XAct make it very easy to add complex sound scripting into your engine.


In Topic: XAudio2 - Pretty poor huh?

06 August 2013 - 05:19 PM

I use XAct. I find it very easy to use and has many powerful features. I'll post some code if anyone is interested.


In Topic: new here. working on a game...

02 February 2013 - 09:57 AM

Looks cool! Sounds like you've been busy. You definitely added a lot of features. Keep up the good work!


In Topic: Basic Win32 window with C++

02 February 2013 - 08:10 AM

Since your writing a Windows API app in c++, it's all you at that point. If you want easy interface construction, try C#.

 

A simpler way to add controls to a window api c++ app is to use an *.rc file to setup a dialog window as your parent window. Now you can use the MSVS gui to design your window with the needed controls.

 

This example might help you.

http://www.codeproject.com/Articles/227831/A-dialog-based-Win32-C-program


In Topic: No window frame when going from full screen back to windowed mode

08 January 2013 - 06:37 PM

Are you setting the new window style *after* resetting the device? All you need to do after resetting the device is call SetWindowLong() to set the new window style, and then SetWindowPos() with the SWP_FRAMECHANGED flag to flush the changes.

yep... I tried it before the reset... after the reset... before and after the reset. A zillion tests later, gave up.

 

Even though I removed some of the original posted code displayed above, I added the below test code (after the reset) just to reconfirm I'm not crazy and yep, no window frame. Unless there's something else I'm missing, the below code doesn't work.

if( !CSettings::Instance().GetFullScreenChange() )
{
	SetWindowLong( hWnd, GWL_STYLE, WS_OVERLAPPED|WS_SYSMENU|WS_MINIMIZEBOX );
	SetWindowLong( hWnd, GWL_EXSTYLE, WS_EX_WINDOWEDGE );

	// Adjust the rect so that the client size of the window is the exact size of the needed resolution
	AdjustWindowRectEx( &rect, GetWindowStyle(hWnd), GetMenu(hWnd) != NULL, GetWindowExStyle(hWnd) );

	// Position the window in the center of the screen
	SetWindowPos( hWnd,
			HWND_NOTOPMOST,
			((GetSystemMetrics( SM_CXSCREEN ) - (rect.right-rect.left)) / 2), 
			((GetSystemMetrics( SM_CYSCREEN ) - (rect.bottom-rect.top)) / 2),
			rect.right - rect.left,
			rect.bottom - rect.top,
			SWP_SHOWWINDOW|SWP_FRAMECHANGED );
}
else
{
	SetWindowLong( hWnd, GWL_STYLE, WS_POPUP|WS_VISIBLE );
	SetWindowLong( hWnd, GWL_EXSTYLE, WS_EX_TOPMOST );

	SetWindowPos( hWnd,
			HWND_NOTOPMOST,
			0, 
			0,
			0,
			0,
			SWP_SHOWWINDOW|SWP_FRAMECHANGED|SWP_NOSIZE );
}

PARTNERS