Where is SDL_RegisterApp()? (RE:Keyboard not responding on nt4.0, 95)

hi,

The keyboard still isn’t working in nt or 95 however
I’ve managed to get it working in linux and BeOs. It
just doesn’t appear to cause any events when I press it.
I’ve seen mention of a function SDL_RegisterApp()which
is supposed to fix this problem however, I can’t find
it in the SDLdocs or the documentation on the SDL site,
can anyone help please?

om

“Oisin Mulvihill” <Oisin.Mulvihill at trintech.com> wrote

The keyboard still isn’t working in nt or 95 however
I’ve managed to get it working in linux and BeOs. It
just doesn’t appear to cause any events when I press it.
I’ve seen mention of a function SDL_RegisterApp()which
is supposed to fix this problem however, I can’t find
it in the SDLdocs or the documentation on the SDL site,
can anyone help please?

yeah, it’s not documented, it is buried in the code though
and exported in the library. again, i believe the recommended
way is to link with the SDLmain.lib, but i’ve gotten it working
without that, and here is the snipped code to get it registered.

/****************** near the top ***************/

#ifdef _WIN32 /msvc defined _WIN32/
#define WIN32_LEAN_AND_MEAN
#include<windows.h>
extern int SDL_RegisterApp(char*, Uint32, void*);
#endif

/************* during the initialize ***********/

#ifdef _WIN32
SDL_RegisterApp(“MyGameClass”, 0, GetModuleHandle(NULL));
#endif
SDL_Init(…);

/***********************************************/

cut n’ paste