I'm not a fan of having this ifdef'd DEBUG. That means that I'll mostly never run into it (as I mostly only run release builds...).

However, MSDN says that static_assert is available in MSVC2010.  So we could potentially do a global

    const VERTEXBUFFER_SIZE = 4 * sizeof(SimpleVertex);  // I guess we can do constant math? Not sure!

and use that in the creation of `pVertexBuffer`. Then, before the memcpy (or just after the declaration of `vertices[]`) we could do a static assert:

    static_assert(VERTEXBUFFER_SIZE == sizeof(vertices));

To get some compile-time safety instead.

...Or we could leave the run-time check there if the setRect code path isn't too hot.