The right way to use WM_TABSTOP

This is a discussion on The right way to use WM_TABSTOP within the Windows Programming forums, part of the Platform Specific Boards category; WM_TABSTOP works if you handle the messages in a dialog handler. But, then you can't use tabs as characters in ...

  1. #1
    Reverse Engineer maxorator's Avatar
    Join Date
    Aug 2005
    Location
    Estonia
    Posts
    2,318

    The right way to use WM_TABSTOP

    WM_TABSTOP works if you handle the messages in a dialog handler.
    But, then you can't use tabs as characters in multiline edit boxes.

    Handling the messages through IsDialogMessage() seems kinda hackerish. Is there any way to do it correctly?
    "The Internet treats censorship as damage and routes around it." - John Gilmore

  2. #2
    erstwhile
    Join Date
    Jan 2002
    Posts
    2,227
    The correct way is to use IsDialogMessage to get default keyboard handling as for dialogs and to subclass the edit control, handle its WM_GETDLGCODE message and return DLGC_WANTTAB from that handler.

    See also msdn: How To Use the WM_GETDLGCODE Message.
    CProgramming FAQ
    Caution: this person may be a carrier of the misinformation virus.

Popular pages Recent additions subscribe to a feed

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21