bvInit
The function is used to initialize internal members of the library and must be
called before any other functions' calls of this library. Usually this call is
made in the InitInstance() member function of your application.
BESTVIEWAPI(LONG) bvInit(HINSTANCE hInstance,HICON
hIcon,LPCTSTR pszResourceType, LPCTSTR pszResourceID);
Parameters:
-
hInstance
- HINSTANCE of the application
-
hIcon - HICON of the application, can be NULL. If hIcon
is null then the library will use the standart IDI_APPLICATION icon
-
pszResourceType
- pointer to the name of the resource name of the compiled in resource file,
can be null
-
pszResourceID - pointer to the identifier of the compiled in
resource file, can be null
Return value: nonzero means success, zero - failure.
Notes:
At first we have to init the library. We can do in two ways:
-
Init the library with the compiled in the application resource file BestView.xml.
In this case we need to give the library the name of the resource file ( in the
Elementary application it is XML_RESOURCE) and
its identifier, there it is MAKEINTRESOURCE(IDR_XML_RESOURCE).
The call will look like:
bres=BESTVIEW::bvInit(hInstance,hIcon,_T("XML_RESOURCE"),
MAKEINTRESOURCE(IDR_XML_RESOURCE));
-
or we can init the library with the external resource file BestView.xml.
The resource file must be placed in the application's working folder. In
this case the call will look like:
bres=BESTVIEW::bvInit(hInstance,hIcon,0,0);