Simon Mourier's Avatar
Simon Mourier's blog (1807 answers on StackOverflow) about Microsoft technologies C#, C/C++, .NET, WinRT, WinUI3, AOT, P/Invoke, COM, Interop, DirectX, Direct2D, Windows, ...
  • 🔎︎ Search
  • Categories
  • Archives
  • About Me
  • com
  • winapi
  • windows-shell

How to Properly Use and Instantiate existing Preview Handlers

May 31, 2022 See the question and my original answer on StackOverflow

You just need to add a SetRect call after initialization:

RECT rect;
GetClientRect(window, &rect);
iPreviewHandler->SetWindow(window, &rect);
iPreviewHandler->DoPreview();

// add this
iPreviewHandler->SetRect(&rect);
  • SmoBlog © 2010-2026 Simon Mourier. All rights reserved.
  • Privacy & Terms