Flickering Dialog by SalSetFocus

forum.advanced.programming (1998-2005)
Christoph Zilch

Flickering Dialog by SalSetFocus

Post by Christoph Zilch » 24 Nov 2004, 10:33

 Posted by:  Christoph Zilch 

Hi,

i have a Problem since we updated from Centura 1.1 to Centura 2.1.
I have some Edits, which are editable, but not important, so i want to
step over when Enter or Tab is pressed. This works good with Centura 1.1
, but since Centura 2.1 the whole dialog flickers. I tested it also with
Centura 3.1 and the Centura 4.0 from today. The problem is still there.

I tested with the WM_SETFOCUS and the WM_KILLFOCUS messages. This wored
well in the small example, but in my big applications there are some
problems when there are comboboxes on the dialog.

Thanks for any suggestions

Christoph

Jim McNamara

Flickering Dialog by SalSetFocus

Post by Jim McNamara » 24 Nov 2004, 16:41

 Posted by:  Jim McNamara 

Try SalPostMsg( hWnd, SAM_SetFocus, 0, 0 )

You are probably seeing circuitous message processing. One must use care
when processing SAM_SetFocus, SAM_KillFocus and Sam_Validate. Usually it's
best to post a message than send it or call SalSetFocus( hWnd ).

----------------------------------------------------------------------------
----

Christoph Zilch

Flickering Dialog by SalSetFocus

Post by Christoph Zilch » 25 Nov 2004, 15:27

 Posted by:  Christoph Zilch 

I tried the SalPostMsg...
The effect i've got is, that when i press enter, nothing happened (the
focus is still in the same field).

I changed the SalSetFocus-Line in my example to the two following lines:

Call SalPostMsg (SalNumberToWindowHandle(g_nFokus), 8,
SalWindowHandleToNumber(l_hwNext), 0)
Call SalPostMsg (l_hwNext, 7, g_nFokus, 0)

then there is no flickering, but sometimes when i hold the enter-key a
few seconds, and use then the tab-key more than one fields content is
marked. Other times (after some returns and tabs), i have to press tab
more than once to go to the next field.

Thanks for answers
Christoph

Ernesto de Miguel

Flickering Dialog by SalSetFocus

Post by Ernesto de Miguel » 25 Nov 2004, 16:22

 Posted by:  Ernesto de Miguel 

Have you tried the function SalMapEnterToTab?

HTH
--
Ernesto

----------------------------------------------------------------------------
----

Christoph Zilch

Flickering Dialog by SalSetFocus

Post by Christoph Zilch » 17 Dec 2004, 13:34

 Posted by:  Christoph Zilch 

Yes I tried, but then I have a problem with the multiline-field.
When the User press Enter in the ML he want's to get a new line.

Return to “advanced.programming”

Who is online

Users browsing this forum: [Ccbot] and 0 guests