Envent Child to Parent and WndProc

W

willem

I have an UserControl with a label.
Is it possible to process events from label inside the WndProc of
UserControl ?

(if somebody click with mouse on the label I want that WndProc of
UserControl process WM_LBUTTONDOWN)

Thanks
 
M

Mattias Sjögren

I have an UserControl with a label.
Is it possible to process events from label inside the WndProc of
UserControl ?

(if somebody click with mouse on the label I want that WndProc of
UserControl process WM_LBUTTONDOWN)


Why do you want custom message handling in WndProc at all? Can't you
just add a handler for the label's MouseDown event?


Mattias
 
W

willem

Mattias Sjögren said:
Why do you want custom message handling in WndProc at all? Can't you
just add a handler for the label's MouseDown event?


Mattias
No, I'm not.
Because I have an ovverride WndProc for enable the 'window moving',
transforming WM_LBUTTONDOWN message
in a HT_CAPTION message, when I press with mouse in a special zone (with
label inside).
When I press over label that doesn't work because my WndProc doesn't
recognize the message.

willem
 

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