Getting an HBITMAP

  • Hi,

    I'm developing an application for windows, and I want to export some QPixmaps as frames of a video. To use that I'm using the VFW (Video For Windows) api. However, the API is expecting HBITMAPS. I see there used to exist a method QPixmap::toWinHBITMAP, but it has been removed in the latest version of Qt.

    After googling a bit, I noticed there's another function now: qt_pixmapToWinHBITMAP, or at least that's what I think. I don't seem to be able to use it, I added its prototype manually, but the linker complains that it can't find it.

    So, I have a few questions now. Is there a better way to create a video from Qt on Windows? if there isn't, what do I need to do to make qt_pixmapToWinHBITMAP visible to the linker, should I enable some module in my project file pehaps? should I do something else to get an HBITMAP from a QPixmap?


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    IIRC this function is part of "qtwinextras": , you have to download and compile this module.

    Hope it helps

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.