Is NPRect a correct structure to be used in WM_PAINT's lParam?

Rafał Chłodnicki rchl2k at
Mon Jun 27 07:11:11 PDT 2011

states that:

"The lParam parameter of WM_PAINT holds a pointer to an NPRect structure
specifying the bounding box of the update area."

and NPRect structure looks like this:

typedef struct _NPRect
uint16_t top;
uint16_t left;
uint16_t bottom;
uint16_t right;
} NPRect;

The problem is that this will break painting for some plugins (witnessed
with Quicktime at least) as they expect members to be both 32bit in size and
in different order.

It looks like plugins really expect platform rect here and not NPAPI NPRect.
That would be RECT on Windows ( ). And this
is actually the format of rect that browsers seems to be using (checked
using special wrapper plugin).

So if what I'm saying is correct, I would expect documentation to be updated
to account for this.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the plugin-futures mailing list