RE: win32lib: Tabbing between controls in/not in a group

new topic     » goto parent     » topic index » view thread      » older message » newer message

> > This is perhaps a retarded question, but I peeked at the Win32Lib
> > code for this once and I never understood exactly why Win32Lib is
> > handling the tabs itself...
> 
> Because when I started working with the library, this code was already
> in there and I didn't know any better. 

Ahh

> > Is it just me, or is there a specific reason you are not letting
> > Windows handle the tabs. 
> 
> Because I didn't know one could!
> 
> > It seems like alot of overhead when
> > the implementation is already in place.  If you need some help
> > regarding this, just post again to this thread.  The change
> > required is actually very minor.
> 
> Yes, please! *some* help is required. Actually, I've never really bothered
> to even look this topic up in the literature because it already
> existed in the library I just thought that that's how it done.

I just think they did not know how at the time so they worked around it.
Check out the API "IsDialogMessage".  It (of course) is mainly uses for
Dialogs, but adding this to the message loop will fix you up...

Blurb:
IsDialogMessage

Although the IsDialogMessage function is intended for modeless dialog
boxes, you can use it with any window that contains controls, enabling
the windows to provide the same keyboard selection as is used in a dialog
box. 

When IsDialogMessage processes a message, it checks for keyboard messages
and converts them into selection commands for the corresponding dialog
box. For example, the TAB key, when pressed, selects the next control or
group of controls, and the DOWN ARROW key, when pressed, selects the next
control in a group. 

Because the IsDialogMessage function performs all necessary translating
and dispatching of messages, a message processed by IsDialogMessage must
not be passed to the TranslateMessage or DispatchMessage function.


Don Phillips - aka Graebel
     National Instruments
     mailto: eunexus @ yahoo.com

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu