News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Behind the scenes of EasyCode

Started by Sajid, May 13, 2009, 08:07:12 PM

Previous topic - Next topic

Sajid

Apologies if anyone thinks I am about to reveal anything esoteric about Easy code...In reality, the subject-title is genuinely related to a query i have.

Being new to Easy Code, I noticed that there is almost no code generated for plain GUI-Based apps. On the one hand, this is a god-send (true RAD goodness), on the other hand, its restrictive. I wonder if it is possible to see whats going on behind the scenes in EasyCode, and modify the code if necessary. I would have preferred to have an option where the GUI code was generated so we could have manual control over window creation etc.

At the moment, I am lost as to how I can even access the Application Instance (HInstance).

Kind regards,
Sajid

p.s: I am not looking for the non-visual mode. I simply would prefer the visual mode to 'generate' code, and let it to be modified.

Ramon Sala

Hi Sajid,

Welcome and thanks for using Easy Code!

When you create a visual project, you can just build it without errors and it already works. Of course, it does nothing else than building the default window, as Easy Code cannot know what you plan to do. It is your decision adding different child controls, menus, etc..

There is an object named App which has several members. One of them (Instance) is the application instance, so App.Instance always returns the main instance of the application. Please read the help file and if you need any other information, please tell me.

Regards,

Ramon
Greetings from Catalonia

Sajid

Thanks, that worked very well! An amazing IDE, I must say.

Going back to the original question, by accessing 'behind the scenes' code, I was referring to code that takes care of window construction etc.

Even for an empty window, I would expect to see calls such as "GetModuleHandle" and "CreateWindowEx" in the code. These, however, are tucked away in ECStcMsd.lib or ECStcMsr.lib. It would be useful, on some occasions, to be able to access the functionality of these two libs directly, and modify how they create the window. As a simple example, this would be necessary when creating anĀ  OpenGL window, which uses a different pixel format from a standard window. Im sure there are many other instances where this may be necessary.

Kind regards,
Sajid



Ramon Sala

Sajid,

People using the visual mode, try to make an application as quick and easy as possible. That's why the Easy Code IDE has the visual mode. For other subjects, it is better to use the classic mode, where all code is written and controlled by the programmer. Anyway, if you want the source code for ECStcMsd.lib and ECStcMsr.lib, there is no problem, just tell me, but it must be taken into account that the IDE builds a visual application in an authomatic way using the referred libraries, which save a lot of programming. So modifying those libs could affect the final executable behaviour.

Ramon
Greetings from Catalonia

Sajid

Hi Ramon,

I agree that messing with the libs would probably not be a good idea since they would affect final executable behaviour. Perhaps what I was looking for is similar to what RosAsm does through its wizard. In essence, it has a GUI 'form designer' like the 'View Object' of Easy code. The difference, however, is that once you finalize the GUI, it generates all the code that actually made the GUI, and lets you paste that code back into your source code. Its quite neat.

Perhaps you could have a quick look at RosAsm if you dont mind?

Kind regards,
Sajid

Ramon Sala

Okay Sajid. As soon as I can I'll have a look at RoAsm.

Ramon
Greetings from Catalonia

Sajid

Thank you very much!

Kind regards,
Sajid