From: Bee on
I am using the API to open the color dialog.
I would like to also open my own color dialog along side.

(1) how can I lock the two together so if I move one, the other follows?
or at least initially have them side by side or mine underneath?

(2) how do I communicate from my dialog to the API common dialog.
(a) to Close both from my dialog - i.e. send a cancel to the API if the
user chooses my selection.
(b)to put the selection from my dialog into the API Dialog custom colors?

From: MikeD on


"Bee" <Bee(a)discussions.microsoft.com> wrote in message
news:A15776B9-3488-4B93-86BA-C57171F015B2(a)microsoft.com...
> I am using the API to open the color dialog.
> I would like to also open my own color dialog along side.
>
> (1) how can I lock the two together so if I move one, the other follows?
> or at least initially have them side by side or mine underneath?
>
> (2) how do I communicate from my dialog to the API common dialog.
> (a) to Close both from my dialog - i.e. send a cancel to the API if
> the
> user chooses my selection.
> (b)to put the selection from my dialog into the API Dialog custom
> colors?
>

This just sounds so....bizarre. You might want to re-think what you're
trying to do. I can only vaguely envision what you seem to be trying to
do...but it's scary. I have NEVER seen or even heard of 2 dialog boxes
opening side by side. That just seems so wrong in so many ways.

Why don't you explain what your ultimate goal is. Perhaps someone then can
give you some advice. One can fathom that what you're wanting is for the
user to be able to specify something additional that Windows' standard color
dialog box doesn't provide. If you explain what that is, maybe someone can
provide you an alternative to your current thinking.

--
Mike




From: C. Kevin Provance on

"Bee" <Bee(a)discussions.microsoft.com> wrote in message
news:A15776B9-3488-4B93-86BA-C57171F015B2(a)microsoft.com...
|I am using the API to open the color dialog.
| I would like to also open my own color dialog along side.
|
| (1) how can I lock the two together so if I move one, the other follows?
| or at least initially have them side by side or mine underneath?
|
| (2) how do I communicate from my dialog to the API common dialog.
| (a) to Close both from my dialog - i.e. send a cancel to the API if
the
| user chooses my selection.
| (b)to put the selection from my dialog into the API Dialog custom
colors?

I gotta go with Mike on this one. The suggested design flys in the face of
established and standard design, especially inasfar as modal windows go.
You'll spend more time chasing bugs than offering functionality. Is it
possible, certainly, but I'll bet some serious subclassing is involved. I'm
not even sure if a common dialog could be subclassed in process in which
case if it is not, you'd need a third party component to subclass out of
process. In fact, I'm sure it will require such a thing.

The obvious solution would be to roll your own color dialog to do what you
want. There are a bazillion examples on the web. Start at
planetsourcecode.com and search for "color dialog".


From: Karl E. Peterson on
C. Kevin Provance wrote:
> not even sure if a common dialog could be subclassed in process

Oughta work just fine. It's definitely executing in the same process,
just as almost any API call would be.

--
..NET: It's About Trust!
http://vfred.mvps.org


From: Karl E. Peterson on
Bee wrote:
> I am using the API to open the color dialog.
> I would like to also open my own color dialog along side.
>
> (1) how can I lock the two together so if I move one, the other follows?
> or at least initially have them side by side or mine underneath?

Basic concept would be to hook the dialog's message stream, then watch
for and react appropriately to WM_MOVE, WM_MOVING, WM_SIZE, WM_SIZING.
Main trick would be getting the handle for the dialog. Would probably
be easiest to set a WH_CBT to watch for its creation. Questions?

--
..NET: It's About Trust!
http://vfred.mvps.org


 |  Next  |  Last
Pages: 1 2 3
Prev: Using DIR() to read a directory.
Next: App w UC distro