Event polling

I’m using C++, and I’m wondering how I can get an object such as for example
"CMouse" to query the event queue and only remove mouse related events from
it. What I want is to be able to simply call Mouse.Update() and perhaps also
Keyboard.Update() once every frame and let the objects take care of the event
handling themselves.