I have some code that is compiled into a DLL which I have loaded into my OriginC code. It seems to work fine, except I have a situation now where I would like to print some informational messages to stdout. Neither printf() nor std::cout statements generate any text inside the Origin script window or the console in the Code Builder.
Is what I am doing even possible? Are there any workarounds? I am not an MFC or VC++ guru by any means, so any advice would be appreciated. All I am trying to do is generate some simple messages so I can monitor the running conditions inside my external code while it is under development.
I am using VC++ v6.0 to generate the DLL, and OriginPro 7SR2.
The printf and cout will not output to Origin's script windows. I suggest your DLL brings up its own simple window. This simple window could contain a ProgressBar, listbox, or multiline editbox control for you to send updates to. Origin C can pass Origin's window handle if you want your window to be a child or Origin.
In the upcoming service release, the GetWindow function will be able to return window handle to the various windows in Origin, like the script window, the results log etc. You can then pass the Origin window handle into your DLL as an argument (HWND) and use windows' API call like SendMessage to put text into these various windows.