How to map a Windows message in VC 7.0 ?

  • Thread starter Thread starter Polaris
  • Start date Start date
P

Polaris

Hi:

In VC 6.0, it is easy to map a handler to a Windows message, in which header
file, MESSAGE_MAP and default handler function are all taken care of by the
VC 6.0 IDE.

Just wonder if VC 7 (.NET) has the same ability?

Thanks for your info.

Polaris
 
Polaris said:
Hi:

In VC 6.0, it is easy to map a handler to a Windows message, in which header
file, MESSAGE_MAP and default handler function are all taken care of by the
VC 6.0 IDE.

Just wonder if VC 7 (.NET) has the same ability?

I think it was the same in 7, but in 7.1 it's on the class Properties pane:
there's icons for Overrides, Messages and Events among others.
 
Thanks for your info. I just had a look at the Class View Pane, the only
items shown are base class info and the mapping functions I have manually
added. May be you are talking about the "Managed Code"? I'm working on
unmanaged C++/MFC using VC 7.1.
 
Polaris said:
Thanks for your info. I just had a look at the Class View Pane, the only
items shown are base class info and the mapping functions I have manually
added. May be you are talking about the "Managed Code"? I'm working on
unmanaged C++/MFC using VC 7.1.

Nope. Not talking about managed and not really talking about the class view
pane, but try this: in the class view pane, right-click on the class to
which you want to add a message handler, and select 'Properties' from the
resultant context menu. You should get a tool window with a combobox at the
top, a row of icons buttons (or toolbar) below it, and the gosh-awful
property grid below that. Hover the mouse over each of those icon buttons,
and one of them should display a tooltip that says 'Messages'. If you get
that far, click that button. The property grid should become a messages grid
from which you can select the message you want to handle on the left, and
thus its corresponding <Add> HandlerFunc entry from the combobox on the
right.
 
Back
Top