PocketMatrix forums

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

Do I have to use EdgeMain?

I am looking to move from GapiDraw to EdgeLib (for a few obvious reasons).

The first obstacle I see is that Edgelib's program entry point is always EdgeMain in the sample applications. This top down approach does not fit into my current application architecture.

Can I use WinMain, as usual, CreateWindow() myself and then deal with all the graphics engine specifics at a low level?

My main concerns are:
1. I cannot handle Windows messages that are not already handled in the ClassEdge abstract class.

2. OnNextFrame automatically gets called constantly - I dont want that. I want to be able Flip to the Display as needed only if something changes. I see that I can use the Flip method but still it seems awkward that OnNextFrame is always called.


Is Edgelib really this restrictive? Is there a way to do what I need to do?

Thank you for any advise.

Does anyone see a way that I can
Hi,

You need to use EdgeMain. EDGELIB is designed this way to provide a framework that's compatible with the different platforms it supports, without having to hande their native application setup routines.

However, it's still possible to customize it the way you want:
1. If you only want to flip when something changes, you can disable automatic flipping. Set the EFL_MANUALFLIP flag in the OnFrameworkConfig callback. When you need to do a flip, you can call display->Flip() yourself.
2. If you want to process native (Symbian or Windows) events, you can implement the OnNativeEvent callback. For more information, please check: http://www.edgelib.com/index.php?node=1146

I hope this helps.
Thank you for the very quick response. I really appreciate it. I will see how it works for me. On the whole edgelib looks powerful.

Looks like I can also GetWindowHandle which is good news - so i can probably modify the Window Title/position, etc.

Thanks!
eugraphics wrote:Thank you for the very quick response. I really appreciate it. I will see how it works for me. On the whole edgelib looks powerful.


Please let us know if it all works fine! (or not) :wink: