ColorDialog and custom colors...

  • Thread starter Thread starter SpotNet
  • Start date Start date
S

SpotNet

Hi Newsgroup,

I've been creating (almost done) Common Dialog class libraries (under one
name space) with highly customisable common dialogs. With my ColorDialog I
am able to completely hide (make invisible) the custom colours palette and
move the OK, Cancel and Help buttons a little under the basic colours
palette. I have noticed if I do not move the buttons, yes I get grey space
(which is the idea) but, if I click a basic colour off the palette, one and
only one of the custom colours square appears. Being the top left one. If
I move that part of the dialog off the screen manually, then bring it back,
it's gone, until I click any basic colour when it appears again and is
disabled as well. I've got it to the point where not even process Spy++ can
highlight it. Can anyone tell me what I need to consider before I write a
function 'public void JustKillMyself(){}'. It's wrecking my psychology :~(

A few details,

WinXP Pro SP1 and all other updates.
VS.NET 2003 with all updates (and Framework).

namespace WindowsCommonDialogs
{
public class ColorsDialog: System,Windows.Forms.ColorDialog
//<---Inherits directly from, boy! what a relief that is.
{
...........

HookProc and OwnerWndProc are implemented with appropriate security
attributes and WM_ constants caught in a switch statement.

In HookProc I can get every handle to every single control on the
dialog. Don't be shy to throw any API at me for now I know them all....

Any help shall be worshiped. Thank you so much Newsgroup.

Regards,
SpotNet ;~D
 
SpotNet,

I am not completely sure what you are trying to do. Can you post some
code perhaps? At the least, maybe a screen shot?

Also, it sounds like you are doing some custom painting perhaps and you
are not doing it in the right place (you are not doing it in response to
WM_PAINT, but rather, somewhere else).

Hope this helps.
 
Thanks Nicholas, I've worked it out, it's more to do with the API constants
I was using (and the combinations of). Sometimes the best way to solve
something is to walk away from it for a while, and go to the beach.

SpotNet
;~?


Nicholas Paldino said:
SpotNet,

I am not completely sure what you are trying to do. Can you post some
code perhaps? At the least, maybe a screen shot?

Also, it sounds like you are doing some custom painting perhaps and you
are not doing it in the right place (you are not doing it in response to
WM_PAINT, but rather, somewhere else).

Hope this helps.

--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

SpotNet said:
Hi Newsgroup,

I've been creating (almost done) Common Dialog class libraries (under one
name space) with highly customisable common dialogs. With my
ColorDialog
I
am able to completely hide (make invisible) the custom colours palette and
move the OK, Cancel and Help buttons a little under the basic colours
palette. I have noticed if I do not move the buttons, yes I get grey space
(which is the idea) but, if I click a basic colour off the palette, one and
only one of the custom colours square appears. Being the top left one. If
I move that part of the dialog off the screen manually, then bring it back,
it's gone, until I click any basic colour when it appears again and is
disabled as well. I've got it to the point where not even process Spy++ can
highlight it. Can anyone tell me what I need to consider before I write a
function 'public void JustKillMyself(){}'. It's wrecking my psychology :~(

A few details,

WinXP Pro SP1 and all other updates.
VS.NET 2003 with all updates (and Framework).

namespace WindowsCommonDialogs
{
public class ColorsDialog: System,Windows.Forms.ColorDialog
//<---Inherits directly from, boy! what a relief that is.
{
..........

HookProc and OwnerWndProc are implemented with appropriate security
attributes and WM_ constants caught in a switch statement.

In HookProc I can get every handle to every single control on the
dialog. Don't be shy to throw any API at me for now I know them all....

Any help shall be worshiped. Thank you so much Newsgroup.

Regards,
SpotNet ;~D
 
Back
Top