09-21-2005 01:20 AM
09-21-2005 03:16 AM
09-21-2005 11:22 AM
Thanks for that.
Well, I would rather seek for a general solution for the dialog box callback of LabWindows/CVI.
For the dialog window, there exist several callbacks, such as int CVICALLBACK ExitReadCB(...), or int CVICALLBACK ClosePanelCB(...), etc. These were originally set up as gloval functions. Data socket is one of these global functions defined right in the dialog window. I want to make these dialog window wrapped in one class, so that I can call it in other class's constructor.
The difficulty for me is to make these functions as member functions. When I make member function static, I also get problems with the all handles and variables for Data socket. Especially, I got the error:
errorCode=DS_Open (Source_String, DSConst_Read, DSCallback, NULL, &DSReadHandle);
Here, the compiler complaints the third parameter (DSCallback) cannot be converted from int func () to int __cdecl func(). I guess it's because of the calling convention in MSVC.
Could give me some advice for more general case like this?
Thanks a lot.
09-22-2005 02:14 AM