CTRL+TAB in MultilineField

forum.advanced.programming (1998-2005)
Michael Böhler

CTRL+TAB in MultilineField

Post by Michael Böhler » 10 Jan 2005, 15:51

 Posted by:  Michael Böhler 

hi all,

how to determine if a user pressed the CTRL+TAB Keys while the
MultilineField is containing the focus.

I´d like to call
VisSendMsgString( hWndItem, EM_REPLACESEL, TRUE, ' ' )
to insert a TAB at the current focus position.

thanks,
michael

Suren Behari

CTRL+TAB in MultilineField

Post by Suren Behari » 10 Jan 2005, 20:26

 Posted by:  Suren Behari 

Hi,

You may want to try...
On VTM_Char
If VisGetKeyState( VK_Control ) & KS_Down and VisGetKeyState( VK_Shift ) &
KS_Down
Call VisSendMsgString( hWndItem, EM_REPLACESEL, TRUE, ' ' )

Thanks,
Suren

Michael Böhler

CTRL+TAB in MultilineField

Post by Michael Böhler » 11 Jan 2005, 11:08

 Posted by:  Michael Böhler 

hello Suren,

i´m sorry, but that dont´t works. I don´t get the VTM_Char Message if i
press
CTRL+TAB (but it works for CTRL+S for instance). So whats wrong with my
CTRL+TAB?

thanks,
Michael

Catalin Enache

CTRL+TAB in MultilineField

Post by Catalin Enache » 11 Jan 2005, 15:24

 Posted by:  Catalin Enache 

You can do something like this:

On WM_KEYDOWN
If wParam = VK_Control
Set bControlDown = TRUE
If wParam = VK_TAB
If bControlDown
Call VisSendMsgString( hWndItem, EM_REPLACESEL, TRUE, ' ' )

On WM_KEYUP
If wParam = VK_Control
Set bControlDown = FALSE

where bControlDown is a boolean variable.

Catalin

Michael Böhler

CTRL+TAB in MultilineField

Post by Michael Böhler » 11 Jan 2005, 15:53

 Posted by:  Michael Böhler 

hello Catalin,

no, i don´t receive the WM_KEYDOWN - Message when pressing the
VK_TAB Button if the VK_Control Button is already pressed.

thanks,
michael

Jim McNamara

CTRL+TAB in MultilineField

Post by Jim McNamara » 11 Jan 2005, 16:06

 Posted by:  Jim McNamara 

Try capturing the tab on WM_KEYUP

Catalin Enache

CTRL+TAB in MultilineField

Post by Catalin Enache » 11 Jan 2005, 16:18

 Posted by:  Catalin Enache 

It works for me.
See attached sample.

Catalin

Attachment: ctrl+tab.apt

Michael Böhler

CTRL+TAB in MultilineField

Post by Michael Böhler » 12 Jan 2005, 10:15

 Posted by:  Michael Böhler 

hi Catalin,

it´s working because your frm is not a mdi - child. as non-mdi-child you
do not need to do anything, it will work.

i think i´m gonna try to capture WM_KEYUP. it works, but
only if the TAB key is released before the CONTROL key.
it does not correspond to the habit.

thanks for your time,
michael

Karthik

CTRL+TAB in MultilineField

Post by Karthik » 12 Jan 2005, 23:49

 Posted by:  Karthik 

Hi,

I have posted a Gupta wrapper to a multiline field (open souce) called
www.scintilla.org. You can manipulate it anyway you want as its a custom
control. Check it out in SalExtension.APL or in the IceTeaGroup website
www.iceteagroup.com (Tea Talk section)

Check out www.scintilla.org for the latest DLL to be used and the
documentation.

Trap WM_Notify and do anything you want via notifications or you can
directly trap the WM Messages.

Thanks
Karthik

Return to “advanced.programming”

Who is online

Users browsing this forum: [Ccbot] and 1 guest