PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

Accessing m_hWnd from CGapiApplication

Would it be possible to add a public method such as

HWND GetHWND( ) { return m_hWnd; };

to the CGapiApplication class definition for accessing the private member m_hWnd? I've modified my local copy of GapiDrawApplication.h to implement this, but it may be a useful method for others as well.

Thanks...

G.R.Moore
ppcstudios.com
Hi,

Would it be ok if I just changed the access control for m_hWnd to protected?

That way you could add a GetHWND() operation to your subclass and also trigger the proper error codes if the main window has not yet been created.

If it's ok to only change the access control, you can change your superclass of CGapiApplication right now and it will be adjusted in the next release (1.1).

/Johan
Perfect. Thanks! =)

-- GR
Could you also split CGapiApplication into a .cpp and .h file for future releases :)

Otherwise it is impossible to refere to it from more than one place.. (Yes, I know I mentioned it before).

-Sam
I guess I could do that..

But you know who I will blaim when no-one can compile their projects due to the missing "CGapiApplication.cpp" file. :D

Any more suggestions to CGapiApplication now when we're at it?