Re: user defined WM_ question: update
"code_for_fun" <[email protected]>
| Newsgroups | gmane.comp.windows.off-topic |
|---|---|
| Message-ID | <[email protected]> |
--- In [email protected], Eric Strain <eric_strain1@...> wrote: > > OK, I got the WM_USER code to work, now is it possible to get the event handler to fire automatically? I really don't want to use polling, even if it is on a separate thread. Currently I have the WM_USER event being triggered through SendMessage(WM_MYEVENT,0,0); inside an OnClicked( ) handler attached to a UI button. Although this is working in my test app, I want the event to be fired automatically by the OS when the targeted event occurs. > > Any ideas? Thanks guys. > > -Eric > Maybe you need to use RegisterDeviceNotification() and check for loss of connection in response to the WM_DEVICECHANGE msg. John