Uniface forms from C++ using C call-in API
Author: zdenek.socha@fullsys.cz (sochaz)
Hello, I'm trying to show a Uniface form from outside the Uniface. Currently from a simple C++ application. I have realized, that the "new" API with uecreate works fine, but only the batch is supported. There is almost no problem calling a service. But I need to show a form. I have tried to use "old" API and call unifbeg... this is fine and Uniface GUI showed up. Then I can activate a modal form and it works fine. But now I need a non-modal form to be shown. At this point, my win32 console application fails - the form is shown, code returned to my app and my app exited. So I switched to Windows Application (still using C++). Now unifgeb works fine, modal form works fine, but non-modal form just show up and that's all. I can click in the form, but it does not react or do anything. It's not frozen in the meaning of "bitmap", I can even show values from currently selected DropDownList, but that's all. Another strange thing is that unifend is somehow broken. According ulibrary there is a numeric parameter to shut id down or suspend... it acts differently than documented, even though always returning a success (1). Calling unifbeg again fails (or frozen or crash the application). So, my questions are: 1) is anyone successful in showing a non-modal Uniface form if the main application is C++ based (not Uniface)? 2) what's wrong in unifend and am I able to hide the shell window if no longer needed and show it again later on? Any help will be appriciated, kind regards, Zdeněk Socha