Lisp HUG Maillist Archive

CAPI problem: Howto ...

CAPI problem: Howto ...

Hi all,
i'm looking for a solution to the following problem (I'm still in planning
the program so some details may not be correct. Sorry for that):

I have a CAPI window containing a pushbutton (other widget are left out for clarification)
The user needs to MOVE the button around in the window like in a GUI builder.

To do so i want to provide a mode where clicking the button does not show
the usual "click" action of the button but draws a selection rectangle around
it. Idealy this should work for other widgets also.

I don't want to change the visual apearance of the button so a simple disble will
not work.

I can imagine two possible solutions:

1. Redirecting the click event. Then the button will never see the event and the
   enclosing window can handle it.
2. putting a pane with transparent background over the whole window. Then all
   events should go to that pane and can be handled there.

Is one of this solutions possible ?
Are there other solutions for that problem ?

The application is MS-Windows only and doesn't need to be portable. However,
a portable solution is obviously prefered.

Thanks in advance

Kind regards
AHz

Re: CAPI problem: Howto ...

Hello Andreas,

| Hi all,
| i'm looking for a solution to the following problem (I'm still in
| planning the program so some details may not be correct. Sorry for
| that): I have a CAPI window containing a pushbutton (other widget are
| left out for clarification) The user needs to MOVE the button around in
| the window like in a GUI builder. To do so i want to provide a mode
| where clicking the button does not show the usual "click" action of the
| button but draws a selection rectangle around it. Idealy this should
| work for other widgets also. I don't want to change the visual
| apearance of the button so a simple disble will not work.
| I can imagine two possible solutions:
| 1. Redirecting the click event. Then the button will never see the
| event and the enclosing window can handle it.
|
| 2. putting a pane with transparent background over the whole window.
| Then all events should go to that pane and can be handled there.
| Is one of this solutions possible ?
| Are there other solutions for that problem ?
| The application is MS-Windows only and doesn't need to be portable.
| However, a portable solution is obviously prefered.

The first may be possible with lots of Win32 API hacking around.

The second is hardly possible since CAPI seems not to support transparent
background or superimposing widgets.

The prettiest solution would be drawing by hand everything (including the
button) on an output-pane. You could also investigate the possibility to put
the button inside a pinboard-layout though this would suffers some of the
flaws you have mentioned above.
--
Sincerely,
Dmitri Ivanov
lisp.ystok.ru


Re: CAPI problem: Howto ...

CAPI problem: Howto ...Andreas Hinze writes:

>i'm looking for a solution to the following problem (I'm still in planning
>the program so some details may not be correct. Sorry for that):
>I have a CAPI window containing a pushbutton (other widget are left out for
clarification)
>The user needs to MOVE the button around in the window like in a GUI
builder.
>To do so i want to provide a mode where clicking the button does not show
>the usual "click" action of the button but draws a selection rectangle
around
>it. Idealy this should work for other widgets also.
>I don't want to change the visual apearance of the button so a simple
disble will
>not work.
>I can imagine two possible solutions:
>1. Redirecting the click event. Then the button will never see the event
and the
>   enclosing window can handle it.
>2. putting a pane with transparent background over the whole window. Then
all
>   events should go to that pane and can be handled there.
>Is one of this solutions possible ?
>Are there other solutions for that problem ?
>The application is MS-Windows only and doesn't need to be portable.
However,
>a portable solution is obviously prefered.

You just need to subclass your control. Search for "subclassing" in the
Win32 SDK.
It's very easy to do.

Marc


Re: CAPI problem: Howto ...

Unable to parse email body. Email id is 2198

Updated at: 2020-12-10 08:57 UTC