0

The Mozilla developer's documentation says:

Windows

The plug-in receives a WM_PAINT message. The lParam parameter of WM_PAINT holds a pointer to a RECT structure specifying the bounding box of the update area. Some plug-ins will choose to ignore this paint rect and always update the entire plug-in window instead, though. Also, because the plug-in and the browser share the same HDC, the plug-in must save the current settings on the HDC, set up its own environment, draw itself, and restore the HDC to the previous settings. The HDC settings must be restored whenever control returns to the the browser, either before returning from NPP_HandleEvent or before calling a drawing-related browser-side method.

This must be a client RECT?

RECT r;
GetClientRect(PluginWnd->getHWND(), &r);
NPP_HandleEvent(WM_PAINT, 0, (uint32)&r);

Or a window's RECT?

RECT r;
GetWindowRect(PluginWnd->getHWND(), &r);
NPP_HandleEvent(WM_PAINT, 0, (uint32)&r);
Community
  • 1
  • 1
Alex Shul
  • 500
  • 7
  • 22
  • Is this about embedding Flash again? If so, please mention it in the question, because it makes a big difference on whether you are implementing a plugin or a plugin host. – Georg Fritzsche Feb 17 '14 at 11:22
  • I'm implementing a plugin host, but, I think, it changes nothing, because it regarding NPAPI (plugin and plugin's host). – Alex Shul Feb 17 '14 at 15:29
  • No, for a plugin it shouldn't even matter. For a host it depends on what you're doing. – Georg Fritzsche Feb 17 '14 at 17:03

0 Answers0