1. Modify the Source Code for your Application

To enable your Vermont Views application to run as a Windows application, you must modify the source code. You must complete the following two tasks in order to compile and link with the Vermont Views for Windows libraries. Refer to the file wn_basic.c in the \tutor subdirectory for an example.

1 Include the new header file vv_win.h

#ifdef __WIN32__

#include <vv_win.h>     

#endif

2Vermont Views for Windows turns your application into a Windows program; therefore, the entry point main() must be

changed to the Windows default entry point WinMain().

You will need to modify your main() entry point as follows:

#ifdef __WIN32__

int PASCAL WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR lpCmdLine, int iShowCmd)

#else

#ifdef OLD_STYLE

int CDECL main()

#else

int CDECL main()

#endif

3You will need to modify the call to vv_init() in your main() / WinMain() module:

#ifdef __WIN32__

vv_init(hInst);

#else

vv_init();

#endif

Vermont Views for Windows uses the new hInst parameter to create all of the windows and controls associated with your application.

.


Home Contents Previous Next