Howto make a popup-edit column readonly ?

forum.advanced.programming (1998-2005)
StefanM
Germany
Posts: 679
Joined: 10 Aug 2018, 15:57
Location: Bavaria

Howto make a popup-edit column readonly ?

Post by StefanM » 07 Mar 2005, 14:12

 Posted by:  Stefan Misch 

Hi,

has anybody already done this? The user should be able to click in the
column cell so that the popup edit object gets shown, but he should not be
able to change any data. Scrolling for a longer text should be possible.

TIA,
Stefan

arvindram11
United States of America
Posts: 555
Joined: 14 Apr 2019, 23:42
Location: Richmond, VA

Re: Howto make a popup-edit column readonly ?

Post by arvindram11 » 07 Mar 2005, 16:40

 Posted by:  Aravind Ram 

On SAM_Create (of the column)
Set hWndPopup = SalNumberToWindowHandle(
SalSendMsg(hWndItem, 0x400 + 119, 0, 0))
Call SalSendMsg(hWndPopup, EM_SETREADONLY, TRUE, 0)

Niels Allerheiligen

Re: Howto make a popup-edit column readonly ?

Post by Niels Allerheiligen » 07 Mar 2005, 17:38

 Posted by:  Niels Allerheiligen 

Hi.

Is there any deeper logic for this rather cryptic code snippet?
I mean, what does 0x400 stand for? And how do you know that you must use
0x400 + 119 and not 0x400 + 120? Trial and error? Or could you get a
look behind The Matrix?

Puzzled,

-Niels-

--
Niels Allerheiligen
genese.de GmbH
http://www.genese.de
mail: mail@genese.de
Tel: +49 (421) 5656150
Fax: +49 (421) 5656156

arvindram11
United States of America
Posts: 555
Joined: 14 Apr 2019, 23:42
Location: Richmond, VA

Re: Howto make a popup-edit column readonly ?

Post by arvindram11 » 07 Mar 2005, 17:43

 Posted by:  Aravind Ram 

0x400 is WM_USER.

As far as 119 is concerned, this was discovered I guess by the Centura/Gupta
gurus in the forum a loooong while back (Gianluca?? Or was it CAstor?? I
don't know).

micsto
Germany
Posts: 997
Joined: 07 Mar 2017, 16:07
Location: Germany

Re: Howto make a popup-edit column readonly ?

Post by micsto » 08 Mar 2005, 08:14

 Posted by:  Michael Stoll \( MICSTO \) 

WM_User + 119 is an internal table window message to get the handle of the
popup. There are many internal messages which are of course undocumented.
Many people spent hours with Spy++ to expose them...

Michael

Philip Hautekiet

Re: Howto make a popup-edit column readonly ?

Post by Philip Hautekiet » 08 Mar 2005, 10:30

 Posted by:  Philip Hautekiet 

I should try VisWinSetFlags(colXyz,WF_DisplayOnly)

StefanM
Germany
Posts: 679
Joined: 10 Aug 2018, 15:57
Location: Bavaria

Re: Howto make a popup-edit column readonly ?

Post by StefanM » 08 Mar 2005, 16:55

 Posted by:  Stefan Misch 

Aravind,

Yep - that's it - thanks!

I would wish that some of these quite useful "internals" were documented.
But Gupta and good documentation seems to be a contradiction in itsself...

Stefan

StefanM
Germany
Posts: 679
Joined: 10 Aug 2018, 15:57
Location: Bavaria

Re: Howto make a popup-edit column readonly ?

Post by StefanM » 08 Mar 2005, 16:55

 Posted by:  Stefan Misch 

Philip,

this won't work because the column and the popup edit window are two
different objects.

Stefan

Return to “advanced.programming”

Who is online

Users browsing this forum: [Ccbot] and 1 guest