PORTS Forum

Ports and Interfaces => USB => Topic started by: Zep on March 23, 2013, 08:59:47 pm

Title: WndProc in Component based on Generic HID.
Post by: Zep on March 23, 2013, 08:59:47 pm
I have rewritten (or mostly just moved code) to be a custom control derived from "Component".

All is basicly done and I am now facing the WndProc issue in Components.
Since WndProc is window/form messages and Components is formless it doesnt receive those message. And therefor WndProc wont work.

Is there a way to receive those messages in a component so I wont need to manually add the WndProc override to the form the control is added to?
I have been looking a little into NativeWindow but it doesnt seem to work or maybe I am just not doing it correctly.
Title: Re: WndProc in Component based on Generic HID.
Post by: Jan Axelson on March 23, 2013, 09:20:55 pm
Here is one discussion about it:

http://stackoverflow.com/questions/6786891/wndproc-how-to-get-window-messages-when-form-is-minimized
Title: Re: WndProc in Component based on Generic HID.
Post by: Zep on March 24, 2013, 06:14:34 am
Thank you. I think I found a solution based on NativeWindow. At least it looks like it is working.