how can I obtain HWND of a class derived from QMainWindow

Rajeshwar

I currently have a windows API that requires a HWND hParentWnd. My question is how can I obtain HWND of a class derived from QMainWindow ?

sashoalm

You can use QWidget::effectiveWinId() or QWidget::winId(), this holds the HWND of the widget on Windows.

MainWindow w;
w.show();
HWND hWnd = (HWND) w.winId();

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

how can I obtain HWND of a class derived from QMainWindow

From Dev

How can I get HWND from String?

From Dev

How can I implement a Singleton class that can be derived from in WPF?

From Dev

How can I implement a Singleton class that can be derived from in WPF?

From Dev

How to obtain the derived class type from base when calling a method

From Dev

How can I retrieve the derived class from a list of abstract classes?

From Dev

How can I retrieve the derived class from a list of abstract classes?

From Dev

How can I create an instance of a derived class from an instance of a base class and include private fields?

From Dev

How can I initialize an instance of a derived class from an instance of the base class?

From Dev

How can I obtain the type parameter of a generic interface from an implementing class?

From Dev

How can I friend a derived class function in the base class?

From Dev

How can I maintain a compile-time list of all types derived from a base class?

From Dev

How can I avoid dynamically generated classes derived from metaclass not to end up as the same class?

From Dev

How do I access an inner class constructor from a derived class?

From Dev

Can I call a derived method from base class?

From Dev

How can I combine templated derived class in CRTP with derived class expression templates?

From Dev

How can I find out which method of a derived class is not implemented?

From Dev

How can I do constructor overloading in a derived class in TypeScript?

From Dev

How can I "un-JsonIgnore" an attribute in a derived class?

From Dev

How can I find out which method of a derived class is not implemented?

From Dev

C++ How can I return an unknown derived class?

From Dev

How can I access a method defined with new keyword in a derived class

From Dev

How can I call the constructor of the derived class when using CRTP?

From Dev

How can I obtain the colnames from part of a sorted matrix column?

From Dev

How can I obtain connectedAndroidTestDebug logcat from commandline gradlew?

From Dev

How can I obtain a file handle from its fileno in Perl?

From Dev

How can i obtain the date only from the datetime column?

From Dev

How can I obtain all the image pixels from a UIImage object

From Dev

How can I obtain a CGColor from RGB values?

Related Related

  1. 1

    how can I obtain HWND of a class derived from QMainWindow

  2. 2

    How can I get HWND from String?

  3. 3

    How can I implement a Singleton class that can be derived from in WPF?

  4. 4

    How can I implement a Singleton class that can be derived from in WPF?

  5. 5

    How to obtain the derived class type from base when calling a method

  6. 6

    How can I retrieve the derived class from a list of abstract classes?

  7. 7

    How can I retrieve the derived class from a list of abstract classes?

  8. 8

    How can I create an instance of a derived class from an instance of a base class and include private fields?

  9. 9

    How can I initialize an instance of a derived class from an instance of the base class?

  10. 10

    How can I obtain the type parameter of a generic interface from an implementing class?

  11. 11

    How can I friend a derived class function in the base class?

  12. 12

    How can I maintain a compile-time list of all types derived from a base class?

  13. 13

    How can I avoid dynamically generated classes derived from metaclass not to end up as the same class?

  14. 14

    How do I access an inner class constructor from a derived class?

  15. 15

    Can I call a derived method from base class?

  16. 16

    How can I combine templated derived class in CRTP with derived class expression templates?

  17. 17

    How can I find out which method of a derived class is not implemented?

  18. 18

    How can I do constructor overloading in a derived class in TypeScript?

  19. 19

    How can I "un-JsonIgnore" an attribute in a derived class?

  20. 20

    How can I find out which method of a derived class is not implemented?

  21. 21

    C++ How can I return an unknown derived class?

  22. 22

    How can I access a method defined with new keyword in a derived class

  23. 23

    How can I call the constructor of the derived class when using CRTP?

  24. 24

    How can I obtain the colnames from part of a sorted matrix column?

  25. 25

    How can I obtain connectedAndroidTestDebug logcat from commandline gradlew?

  26. 26

    How can I obtain a file handle from its fileno in Perl?

  27. 27

    How can i obtain the date only from the datetime column?

  28. 28

    How can I obtain all the image pixels from a UIImage object

  29. 29

    How can I obtain a CGColor from RGB values?

HotTag

Archive