put_SplashScreenPath

Description

Defines the image file path to be used as the splash screen for the packed executable.
When the splash screen feature is enabled (see put_EnableSplashScreen), the specified image is displayed briefly when the application starts.

The splash screen can improve user experience by indicating that the application is loading or performing initialization tasks.

Syntax

HRESULT put_SplashScreenPath([in] BSTR bstrValue);

Parameters

bstrValue
Type: BSTR
[in] Specifies the full path to an image file that will be used as the splash screen.
Supported formats include .bmp, .jpg, .png, and .ico.

Return Value

Returns an HRESULT.

  • S_OK if the splash image path was successfully set.
  • E_FAIL or another COM error code if an error occurred (for example, invalid path or unsupported format).

Example

CComPtr<IBxProject> project;
if (SUCCEEDED(BxPackerApi_CreateProject(&project))) {
    // Specify a splash screen image
    project->put_SplashScreenPath(CComBSTR(L"C:\\Images\\splash.png"));
 
    // Enable the splash screen feature
    project->put_EnableSplashScreen(VARIANT_TRUE);
 
    // Continue configuring and building the packed application
    // project->Build();
}

Remarks

  • To display the splash screen, ensure that put_EnableSplashScreen is set to VARIANT_TRUE.
  • The image is embedded into the packed executable and displayed automatically at startup.
  • The splash screen typically disappears once the main window of the application appears.
  • The specified file must exist and be accessible at the time of building.
  • Use get_SplashScreenPath to retrieve the currently configured splash image path.

See Also