News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

navigating thru controls in a dialog with TAB key

Started by arroso, July 26, 2008, 12:12:32 PM

Previous topic - Next topic

arroso

Hi everybody,
I'll like to know the requirements for me to navigate thru the controls of a dialog by TAB key.
Actually I have a dialog created with CreateDialogParam
All useful controls have the WS_TABSTOP set
The behaviour I got is a cursor stuck on the first control and unresponsive TAB key.

Any hint?
Thanks in advance

Tedd

You need to add IsDialogMessage into your message-loop (after GetMessage) :wink
No snowflake in an avalanche feels responsible.

arroso

thank you very much, you saved me  :bg
haven't found any hint related within the WinApi text

Rsir

To tab through your edit boxes

In WinMain proc
replace :

Quote.while TRUE
   invoke GetMessage,addr msg,NULL,0,0
     .BREAK .if !eax
   invoke TranslateMessage,addr msg
   invoke DispatchMessage,addr msg
.endw

with :
Quote
.WHILE TRUE
   invoke GetMessage, ADDR msg,NULL,0,0
   .BREAK .IF (!eax)
   invoke IsDialogMessage, hWnd, ADDR msg
   .IF (!eax)
      invoke TranslateMessage,addr msg
      invoke DispatchMessage,addr msg
   .ENDIF
.ENDW

You also have to adjust the settings of Tabstop (true) and Tabindex (#)
Found this in Ranma_at's tutorial#6 via the RadASM site   
http://www.radasm.com/    ... RadASM tutorials by Ranma_at   (11-13-2003)

RsiR