I've been working on a serial comms data capture program for quite some time, and it is very near completion. The only issue left has me struggling, though:
The program can read data at different baud rates, 19,200 and 57,600 being the most common speeds. At 19,200 everything works fine, but at 57,600 I keep getting runtime error 57 whenever I move another app window, or the dialog of the app itself!!??!
To make things more interesting, apps like Notepad etc result in this problem - opening Notepad is fine, but if I start moving the Notepad window around I get error 57 while reading the serial port in my app. Other, expectedly heavier, apps like Word, Excel etc don't result in this problem, nor does any of the Windows "core" apps (Explorer, Control Panel etc).
It seems to me it might have something to do with how my dialog is defined (hParent is 0, equivalent of %HWND_DESKTOP) or opened (modeless), but I can't for the life of me figure this one out.
Any clues, anyone?? It sure would be appreciated... Just ask if you need more info - I just don't know what else would be relevant.
Thanks,
Ketil
The program can read data at different baud rates, 19,200 and 57,600 being the most common speeds. At 19,200 everything works fine, but at 57,600 I keep getting runtime error 57 whenever I move another app window, or the dialog of the app itself!!??!
To make things more interesting, apps like Notepad etc result in this problem - opening Notepad is fine, but if I start moving the Notepad window around I get error 57 while reading the serial port in my app. Other, expectedly heavier, apps like Word, Excel etc don't result in this problem, nor does any of the Windows "core" apps (Explorer, Control Panel etc).
It seems to me it might have something to do with how my dialog is defined (hParent is 0, equivalent of %HWND_DESKTOP) or opened (modeless), but I can't for the life of me figure this one out.
Any clues, anyone?? It sure would be appreciated... Just ask if you need more info - I just don't know what else would be relevant.
Thanks,
Ketil
Comment