HWND to a UIThread
-
I am trying to create a thread to monitor a USB-connected ADC module. Its driver uses a callback function for the configuration of the module. It requires a CWnd handle given to it such that when it has a buffer filled, it sends a OLDA_WM_BUFFER_DONE message to the thread. I created a UIThread so that it would have a message handler and I could create my OnBufferDone function. (Which is working and tested in a single thread situation.) It needs to be in a separate thread so that I can empty the buffer quickly and move the sample data into my internal buffers and return it back to the ADC module driver before the next buffer_full message comes in. Does anyone know how to create or get a HWND for a UIThread so that this driver can know where to send messages to my thread? Thanks in advance, Dave :((
-
I am trying to create a thread to monitor a USB-connected ADC module. Its driver uses a callback function for the configuration of the module. It requires a CWnd handle given to it such that when it has a buffer filled, it sends a OLDA_WM_BUFFER_DONE message to the thread. I created a UIThread so that it would have a message handler and I could create my OnBufferDone function. (Which is working and tested in a single thread situation.) It needs to be in a separate thread so that I can empty the buffer quickly and move the sample data into my internal buffers and return it back to the ADC module driver before the next buffer_full message comes in. Does anyone know how to create or get a HWND for a UIThread so that this driver can know where to send messages to my thread? Thanks in advance, Dave :((