OnCtlColor()

M

Mike

Folks,

In many of my MFC projects, I use the OnCtlColor() message event to
easily single source highlight/colorize/customize text labels and
controls. As described by MSDN:

The framework calls this member function when a child control
is about to be drawn. Most controls send this message to their
parent (usually a dialog box) to prepare the pDC for drawing the
control using the correct colors.

I am porting a MFC applet to VB.NET and I would like to do the same.

In this one project, it is a SDI main form with a dock fill tab
control with four tab pages. Page #1 (tabpage1) has at least 30 or so
static labels, textbox, listbox, buttons controls for displaying
server events, status and notification information. In the MFC
version, the user/operator has the option to customize what wants to
see, the display font and colors.

I'm looking at the property editor and I don't see a OnCtlColor for
the tabpage1 parent control (or it parents) but I do see some other
events that might apply. Not sure.

But I am wondering is there is VB.NET method that allows me to do this
or maybe even add a WM_CTLCOLORSTATIC message handler via VB.NET?

--
 
C

Cor Ligthert[MVP]

Mike,

It is much easier to describe your problem as a question then to give an
explanation in MFC, I have used that once 10 years ago, so really there is
not much knowledge anymore about that. Comparing it with VB6, it was trouble
full to create things which were in VB6 easy.

However, as your problem is about the tab page, then there is a guy who once
made his hobby by designing the nicest tab pages (is sometimes like Nak as
well active here, but it is currently very few)

His name is Mick and not Nick, it sounds more like Mike

http://dotnetrix.co.uk/tabcontrol.htm

Cor
 
M

Mike

Well, I figured a small MFC correlation would help focus the main goal
with veteran VB6/VB.NET developers who might input.

I am thinking if enumerating through the components list would work
nicely.

Thanks for the referral.

--
Mike,

It is much easier to describe your problem as a question then to give an
explanation in MFC, I have used that once 10 years ago, so really there
is not much knowledge anymore about that. Comparing it with VB6, it was
trouble full to create things which were in VB6 easy.

However, as your problem is about the tab page, then there is a guy who
once made his hobby by designing the nicest tab pages (is sometimes like
Nak as well active here, but it is currently very few)

His name is Mick and not Nick, it sounds more like Mike

http://dotnetrix.co.uk/tabcontrol.htm

Cor
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top