Re: NEW ERA AND C
Posted in 1996
Perry Dillard wrote: >How do I get this to work using p-code? Compile this into a DLL and use the -u option on the command line. >Bob Leurck <rjleurck@starnetinc.com> wrote: >>Here is a simple example (and useful too!) >>that uses New Era's BEGIN_C/END_C method >>of incorporating C into New Era Code. >>set_focus.4gl >>VARIABLE m_winToWN ixWindow >>BEGIN_C >>#include <windows.h> >>END_C >>FUNCTION setWinTo(winTo ixWIndow) >>LET m_winToWN = winTo >>END FUNCTION >>FUNCTION set_focus(winTo ixWindow ) RETURNING VOID >>VARIABLE win ixWindow >>call setWinTo(winTo) >>LET win = m_winToWN >> BEGIN_C >>{ >> HWND hwnd; >> HWND hwndFrom; >> hwnd = __getHWndFromixWindow(win); >> hwndFrom = SetFocus(hwnd); >>} >> END_C >>END FUNCTION >>cut paste and compile ! David W Chan GO5 Limited david@go5.com (work) dwc@cix.compulink.co.uk (home)