PocketMatrix forums

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

MFC and GapiDraw

Hi,

We still have big problems integrating GapiDraw with MFC.
We have big problems switching from CDialogs to GapiDraw and the way back.
We have investigated many ways of correcting it, with ToggleFullScreen, shfullscreen, your
"SuspendDisplay()", "CloseInput()", etc...
But we can't manage it to work together...
Seems like when we come back to Dialogs GapiDraw still owns some controls about the Display or the Input...

Did someone have and solve the same problem?
Could you please, Johan, have a look in your code?

/jul
Bad timing right now.. :( I'm in Germany and will be gone for two weeks.. I can check email / webmail, but I will be unable to spend any time browsing code...

I would suggest starting with a simple MFC application, just showing a dialog. Then add GapiDraw functionality and see where it goes wrong. GapiDraw releases everything as it should.

There are LOTS of issues with the messaging in MFC (e.g. if you capture OnLButtonDown you first have to call the superclass of CWnd for example).

Let me know in 2 weeks if you did not solve it... Or post more specific questions to the forum...

/Johan
Hi,

There are some things to check:
(1) What hWnd do you supply to GapiDraw? This hWnd should always be the top window in your hierarchy (preferably not a CDialog window)
(2) What device do you run the application? If you run on an E115 or E125 the double buffering may cause issues if not handled correctly (search the source on CGapiApplication for "double buffer" - it´s in the minimize event)
(3) We had severe errors before we called the superclass implementation of each event (key/button down) before showing a dialog..

/Johan