Link to home
Start Free TrialLog in
Avatar of mr60
mr60

asked on

Problem with user control

Hello.

I have created a library that has a user control.
The user control has some windows control such as button or linklabel.
I use this library as "my user controls" in another projects.

my question is how I can find out that specific button or linklabel
clicked when I want to write their handlers in another project (not the same project that I design the user control) ?

Thank you.
Avatar of mactep13
mactep13

Trap the event handlers using the message map. The controls you created should have IDs assigned to them in the resource.h file. You must have done so when created the controls. Now, trap the events in the map such as:
ON_BN_CLICKED(ID_OF_CONTROL, Handler_Func)
and so on...
Avatar of mr60

ASKER

mactep13

when users use library in another projects, they don't have Handler_Func; they should define their custom handlers and any one don't know their name previously.
ASKER CERTIFIED SOLUTION
Avatar of mactep13
mactep13

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial