none
Is HINSTANCE Still A Real Thing? RRS feed

  • Question

  • Hello Folks:

       Developing on Windows 10, C++. 

       Do Windows libraries still use HINSTANCE, or is that parameter just a relic for compatibility from the times when Windows was a wrapping for DOS. 

       When a function I'm using requires it, I'll often just grab it with a call to GetWindowLongPtr().  Right now I need HINSTANCE in a function wasn't passed a handle to a window. 

       An obvious solution is to pass an HINSTANCE globally, but I've always been adverse to using global variables. 

       If Windows still uses HINSTANCE, is there some way of acquiring it inside a function doesn't know about a particular window? 

          Thanks
          Larry

    Sunday, December 8, 2019 4:21 PM

Answers

All replies