Thread: RE: [GD-Windows] Windows in .NET :(
Brought to you by:
vexxed72
From: Brian S. <bs...@mi...> - 2002-09-06 19:41:51
|
Zero-filling structs that you pass in to Win32 calls is an excellent habit. But for this case, the size param is only present in WNDCLASSEX (used with RegisterClassEx). --b. > -----Original Message----- > From: Ben Carter [mailto:be...@gu...]=20 > Sent: Friday, September 06, 2002 11:34 AM > To: GDWindows > Subject: Re: [GD-Windows] Windows in .NET :( >=20 > I'm working from memory here, but don't you have to set the size > parameter of the WNDCLASS structure, and zero out all the unused > members? |
From: Brian S. <bs...@mi...> - 2002-09-06 17:50:34
|
(cc'ing the Windows list and removing the general list) You haven't specified a WNDPROC for your window class. That might be one lame reason. =20 In any event, it's a pretty safe bet that oodles of apps calling RegisterClass were compiled through VS.NET before it shipped. You should probably have another look at your code. Try building a DX sample app, and compare their setup code against yours. --brian > -----Original Message----- > From: Joe Collins [mailto:jo...@mu...]=20 > Sent: Friday, September 06, 2002 10:51 AM > To: gam...@li... > Subject: [GD-General] [GD General] Windows in .NET :( >=20 >=20 > Hi all, >=20 > I just stupidly upgraded to Visual C++ .NET from VC6. And so=20 > of course=20 > my windows code doesn't > work with it for some lame reason. >=20 > This code worked > PIXELFORMATDESCRIPTOR pfd; > WNDCLASS wc; > // register window class > wc.style =3D CS_OWNDC; > wc.cbClsExtra =3D 0; > wc.cbWndExtra =3D 0; > wc.hInstance =3D ctx->HInst; > wc.hbrBackground =3D (HBRUSH)GetStockObject( BLACK_BRUSH ); > wc.lpszMenuName =3D NULL; > wc.lpszClassName =3D ctx->AppName; > DWORD so; > if (!RegisterClass( &wc )) > so =3D GetLastError(); >=20 > and now I get an error 87 - bad parameter >=20 > Anyone "upgrade" and have similar problems? >=20 > On a side note, I have previously tried to get the mousewheel=20 > working in=20 > my code. But > I get a compile error when I try to use WM_MOUSEWHEEL - undefined >=20 > There seems to be some magic defines you need to set to get this to=20 > compile... Something to do with > #define _WIN32_WINNT 0x0400 > #define _WIN32_WINDOWS 0x500 >=20 > but it doesn't seem to work for me. Perhaps there is more=20 > magic in the=20 > ordering or something. >=20 > Anyway, any help would be sweet. >=20 > Thanks, >=20 > -Joe >=20 >=20 >=20 >=20 > ------------------------------------------------------- > This sf.net email is sponsored by: OSDN - Tired of that same old > cell phone? Get a new here for FREE! > https://www.inphonic.com/r.asp?r=3Dsourceforge1&refcode1=3Dvs3390 > _______________________________________________ > Gamedevlists-general mailing list > Gam...@li... > https://lists.sourceforge.net/lists/listinfo/gamedevlists-general > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_id=3D557 >=20 |
From: Ben C. <be...@gu...> - 2002-09-06 18:33:52
|
On Friday, September 6, 2002, 6:50:24 PM, someone wrote: [snip] >> This code worked >> PIXELFORMATDESCRIPTOR pfd; >> WNDCLASS wc; >> // register window class >> wc.style = CS_OWNDC; >> wc.cbClsExtra = 0; >> wc.cbWndExtra = 0; >> wc.hInstance = ctx->HInst; >> wc.hbrBackground = (HBRUSH)GetStockObject( BLACK_BRUSH ); >> wc.lpszMenuName = NULL; >> wc.lpszClassName = ctx->AppName; >> DWORD so; >> if (!RegisterClass( &wc )) >> so = GetLastError(); >> >> and now I get an error 87 - bad parameter I'm working from memory here, but don't you have to set the size parameter of the WNDCLASS structure, and zero out all the unused members? -- Ben Carter - Neko Technologies - be...@gu... http://www.neko-tech.com/ - http://www.absoluteterror.com/ ---------------------------------PGP Key available on request--- "Broken mirror, a million shades of light, the old echo fades away. But just you and I can find the answer, and then we can run to the end of the world." - Small of two pieces, Xenogears |
From: Javier A. <ja...@py...> - 2002-09-06 18:49:19
|
Brian Sharon <bs...@mi...> wrote: > (cc'ing the Windows list and removing the general list) > > You haven't specified a WNDPROC for your window class. That might be > one lame reason. That would definitely hurt a lot. :) In case oyu wonder if .NET is horribly broken or something, we compiled the full Praetorians source code in both managed and non-managed modes with VS.NET. We had to make five or six syntax changes, we were hit by one code generation bug regarding float constants, and we were appalled by the trouble that managed C++ has with virtual function calls (fixed in the next version I believe). Other than that, the entire game ran just fine. >> -----Original Message----- >> From: Joe Collins [mailto:jo...@mu...] >> On a side note, I have previously tried to get the mousewheel >> working in my code. But >> I get a compile error when I try to use WM_MOUSEWHEEL - undefined >> >> There seems to be some magic defines you need to set to get this to >> compile... Something to do with >> #define _WIN32_WINNT 0x0400 >> #define _WIN32_WINDOWS 0x500 The mousewheel was not available in windows 95, therefore if you want to use it you must specify that you won't be supporting Win98. All this is explained in the MSDN help entry for WM_MOUSEWHEEL. We simply defined them ourselves to avoid messing with equally obscure include-control macros: #ifndef WM_MOUSEWHEEL #define WM_MOUSEWHEEL 0x020A #endif #ifndef MSH_MOUSEWHEEL #define MSH_MOUSEWHEEL 0xC7B1 #endif Javier Arevalo Pyro Studios |
From: Andrew G. <ag...@cl...> - 2002-09-08 12:54:15
|
I wish that was viable, unfortunately though Microsoft as usual are doing all they can to "encourage" developers to upgrade by already cutting VC6 support from some products. Andy @ Climax Brighton -----Original Message----- From: Javier Arevalo [mailto:ja...@py...] Sent: 07 September 2002 12:20 To: gam...@li... Subject: Re: Re:[GD-Windows] Windows in .NET :( If you're doing non-.NET C++ projects then it's definitely a good idea to stick with VC6 (that's what I do) and wait for future, more refined versions of the new environment. But it doesn't hurt to play with it on the side (.NET forms are _cool_, MFC be gone for good!) to minimize the future transition. Javier Arevalo Pyro Studios ------------------------------------------------------- This sf.net email is sponsored by: OSDN - Tired of that same old cell phone? Get a new here for FREE! https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390 _______________________________________________ Gamedevlists-windows mailing list Gam...@li... https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows Archives: http://sourceforge.net/mailarchive/forum.php?forum_id=555 |
From: Javier A. <ja...@py...> - 2002-09-08 14:45:15
|
Andrew Grant <ag...@cl...> wrote: > I wish that was viable, unfortunately though Microsoft as usual are > doing all they can to "encourage" developers to upgrade by already > cutting VC6 support from some products. Yeah that kind of behaviour is to be expected from Microsoft. What lack of support are you referring to specifically? Which products? For me, as long as VTune and DirectX work with VC6 I see no major development troubles. Luckily for us, we're finishing our current game around the time a more stable version of .NET comes out. Javier Arevalo Pyro Studios |
From: Andrew G. <ag...@cl...> - 2002-09-08 14:56:50
|
From my POV mainly the XBox SDK and the MSDN library. Already the last version of MSDN that plugs into dev studio is last october or something. From October the XDK will only support VC7 which is going to be a massive pain, and probably result in every team here who works on cross platform products having to upgrade due to the VC6 & VC7 workspaces not being compatible, another dubious move really. Andy @ Climax Brighton -----Original Message----- From: Javier Arevalo [mailto:ja...@py...] Sent: 08 September 2002 15:47 To: gam...@li... Subject: Re: Re:[GD-Windows] Windows in .NET :( Andrew Grant <ag...@cl...> wrote: > I wish that was viable, unfortunately though Microsoft as usual are > doing all they can to "encourage" developers to upgrade by already > cutting VC6 support from some products. Yeah that kind of behaviour is to be expected from Microsoft. What lack of support are you referring to specifically? Which products? For me, as long as VTune and DirectX work with VC6 I see no major development troubles. Luckily for us, we're finishing our current game around the time a more stable version of .NET comes out. Javier Arevalo Pyro Studios ------------------------------------------------------- This sf.net email is sponsored by: OSDN - Tired of that same old cell phone? Get a new here for FREE! https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390 _______________________________________________ Gamedevlists-windows mailing list Gam...@li... https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows Archives: http://sourceforge.net/mailarchive/forum.php?forum_id=555 |