Thread: The right way to use WM_TABSTOP

  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