ISurface::createWin32Surface - dpw105f18/papago-api GitHub Wiki

Create a Win32 surface and bind a handle

static unique_ptr<ISurface> createWin32Surface(size_t, size_t, HWND)

Returns

Returns a unique pointer to a new ISurface

Parameters

Parameter Description
size_t specifies the width of the surface.
size_t specifies the height of the surface.
HWND is a handle to the window, the window is intended to be used for presenting rendered images

Example of createWin32Surface

#include <windows.h>
#include "isurface.hpp"

#define HEIGHT = 600;
#define WIDTH = 800;

int main() {
  /*
   Creation of win32 window and hwnd omitted
  */
  auto surface = ISurface::createWin32Surface(
    WIDTH, HEIGHT, 
    hWnd);
}
⚠️ **GitHub.com Fallback** ⚠️