Is HINSTANCE Still A Real Thing?

  • Thread starter Thread starter a_unique_name
  • Start date Start date
A

a_unique_name

Guest
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

Continue reading...
 

Similar threads

Back
Top