I am using a SDI with a splitscreen. One side is where OpenGL renders and the other is a FormView dialog. I am trying to place a timer in the dialog class called FormCommandView. I want the timer to call functions that gather data from the parallel port every 10ms. I tried using the TimerProc below since the class is derived from FormView and not CWnd.
VOID CALLBACK MyTimerProc(
HWND hWnd, // handle of window for timer messages
UINT uMsg, // WM_TIMER message
UINT idEvent, // timer identifier
DWORD dwTime // current system time
I tried opening a MessageBox to test if the timer was workng and I also stepped through the debugger.
I noticed that it only goes into MyTimerProc when I minimized my SDI and when I maxmize the SDI it stops once again. So the timer only works when my application is minimized.
Can anyone tell me why this is happening and how to fix it. Is it because I am not passing in my hwnd from the View class where OpenGL is setup. If so, how do I gain access to it.
Or if you can think of anoter way to use SetTimer with a SDI, please let me know. I just need to access the parallel port faster because without a timer, my program can not update the screen and go back through my loop fast enough to catch the switching data.