The SDL forums have moved to discourse.libsdl.org.
This is just a read-only archive of the previous forums, to keep old links working.


SDL Forum Index
SDL
Simple Directmedia Layer Forums
Small SDL mod increasing winapi compatibility
BitBasher
Guest

Dave <aoyx63 <at> dsl.pipex.com> writes:
Quote:

Hey guys,

I've recently been working on a set of tools for my game engine -
all of
Quote:
them confined in one central app. I've been using the winapi for
toolbars,
Quote:
menu's, dialogs etc. Everything was grand - I use my own wndproc for
handling the windows menu and whatnot and it in turn calls the
previously
Quote:
stored wndproc when its done, returning control back to sdl.

Eitherway, I eventually hit a brick wall when it came to having
edit
Quote:
boxes in my custom dialogs - they wernt receiving any input from the
keyboard. Then I noticed I couldnt tab through the dialog either.
After
Quote:
trying many many things I eventually ended up changing sdl itself.

Maybe its not the best way of going about this problem, but in the
end I
Quote:
edited directx5_events.c - added two new functions
SDL_RegisterUserDialog()
Quote:
and SDL_UnregisterUserDialog(). They both take the HWND of an
existing
Quote:
dialog and sdl stores that in a small array - then I made a change to
the
Quote:
processing of messages where before continuing with normal messaging
code it
Quote:
cycles through the user dialogs array and performs an
IsDialogMessage() on
Quote:
it which checks if the message belongs to any of the dialogs and
dispatches
Quote:
it to them if so.

Everything is actually working great and I have all the control
and
Quote:
whatnot that I would expect from my dialogs and I dont appear to of
inadvertantly broken any other part of sdl Smile Anyway, i'm just
posting this
Quote:
to tell people of this change and if its any use to anyone I can
thwack the
Quote:
modded code online for people to grab. In all my devving i've
completly
Quote:
missed the CVS scene so I dunno about any of that xD

Anyway, take care
-Dave


Sorry for the 10-year necro, but did you ever post this code? I'm
running into the same trap with SDL eating my dialog messages and I'd
love to patch SDL to handle these messages with IsDialogMessage() before
it calls DispatchMessage() which current tosses dialog messages into the
bit bucket.

Thanks!
Bit



_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org