Howto make a popup-edit column readonly ?

forum.advanced.programming (2000-2005)
NewsgroupServer
Robot
Robot
Posts: 118939
Joined: 24 Feb 2017, 12:00
Location: World wide

Howto make a popup-edit column readonly ?

Post by NewsgroupServer » 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

NewsgroupServer
Robot
Robot
Posts: 118939
Joined: 24 Feb 2017, 12:00
Location: World wide

Howto make a popup-edit column readonly ?

Post by NewsgroupServer » 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)

NewsgroupServer
Robot
Robot
Posts: 118939
Joined: 24 Feb 2017, 12:00
Location: World wide

Howto make a popup-edit column readonly ?

Post by NewsgroupServer » 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

NewsgroupServer
Robot
Robot
Posts: 118939
Joined: 24 Feb 2017, 12:00
Location: World wide

Howto make a popup-edit column readonly ?

Post by NewsgroupServer » 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).

NewsgroupServer
Robot
Robot
Posts: 118939
Joined: 24 Feb 2017, 12:00
Location: World wide

Howto make a popup-edit column readonly ?

Post by NewsgroupServer » 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

NewsgroupServer
Robot
Robot
Posts: 118939
Joined: 24 Feb 2017, 12:00
Location: World wide

Howto make a popup-edit column readonly ?

Post by NewsgroupServer » 08 Mar 2005, 10:30

 Posted by:  Philip Hautekiet 

I should try VisWinSetFlags(colXyz,WF_DisplayOnly)

NewsgroupServer
Robot
Robot
Posts: 118939
Joined: 24 Feb 2017, 12:00
Location: World wide

Howto make a popup-edit column readonly ?

Post by NewsgroupServer » 08 Mar 2005, 16:55

 Posted by:  Stefan Misch 

Aravind,

Yep - that's it - thanks!

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

Stefan

NewsgroupServer
Robot
Robot
Posts: 118939
Joined: 24 Feb 2017, 12:00
Location: World wide

Howto make a popup-edit column readonly ?

Post by NewsgroupServer » 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 [Crawler] and 0 guests