[GD-General] [GD General] Windows in .NET :(
Brought to you by:
vexxed72
From: Joe C. <jo...@mu...> - 2002-09-06 17:39:00
|
Hi all, I just stupidly upgraded to Visual C++ .NET from VC6. And so of course my windows code doesn't work with it for some lame reason. 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 Anyone "upgrade" and have similar problems? 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 but it doesn't seem to work for me. Perhaps there is more magic in the ordering or something. Anyway, any help would be sweet. Thanks, -Joe |