Visit Gigasoft's Web Site
 ProEssentials v9 Help

PEcreatefromfile

HWND PEcreatefromfile (lpszFilename, hParent, lpRect, nID)

 

WCHAR* 

lpszFilename

Pointer to a null-terminated string naming file.

HWND 

hParent

Parent window to place control.

RECT* 

lpRect

Location and size of object

UINT 

nID

Child window identifier

 

This function restores the current object from a binary file named by lpszFilename. You first must have previously stored the object with PEsavetofile.

 

This function will know how to create the appropriate object stored via PEsavetofile.

 

Parameter

Description

lpszFilename

Name of a file created with PEsavetofile.

hParent

Passed to the Windows CreateWindow function.

lpRect

Passed to the Windows CreateWindow function.

nID

Passed to the Windows CreateWindow function. This ID can be any value and is only used to help recognize which child window sent a notification message.

 

Returns

This function returns the handle which was assigned by the Windows operating system. If the function could not allocate memory, or CreateWindow fails, the function returns zero.

 

Comments

The return value from this function is used in both Windows API and ProEssentials API calls. This return value must not be lost as long as the object remains in memory. Storing the return value in a global variable is required.

 

PEdestroy must be used to destroy the window and free its memory and resources.

 

See Also: PEsavetofile