PDA

View Full Version : QPixmap and HBITMAP



ToddAtWSU
21st June 2006, 16:19
I have a pointer to a QPixmap that I edit by clicking on the mouse. I am trying to overlay this on top of my DirectShow video and have been looking at using DirectShow's VMR to handle displaying the overlay. I have discovered I should be able to achieve this by using a HBITMAP object. My question then, is there a way to convert a QPixmap to a HBITMAP. I know I can set a QBitmap to a QPixmap by either declaring that in the constructor or when I modify the QPixmap just set the QBitmap = QPixmap. I use the QPixmap so I can use a QPainter to modify the pixmap. By setting the QBitmap equal to the QPixmap, is it then possible to convert this to a HBITMAP if it's not possible to go straight from the QPixmap to the HBITMAP? :confused: Thanks!

ToddAtWSU
21st June 2006, 16:24
I did a little looking around the docs some more and realized I overlooked a QPixmap function called toWinHBITMAP( ). I will give this a shot and post how the results worked out. Thanks!