News:

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

Controls not being displayed

Started by ADalvi, February 06, 2008, 01:23:35 AM

Previous topic - Next topic

ADalvi

Hello Ramon,

I have downloaded the recent version of EasyCode (release Jan, 2008) along with GoAsm.

My system is Windows XP SP2.

During a quick test of "Visual Win32" found that few controls do not appear after compiling the project. Sometimes, none of them are displayed.
No code has been added to the project.

Could you help me in this case?

Thanks,
Arvind

Ramon Sala

Hi Arvind,

Yes, of course I'll try to help you. Could you tell me what controls do not appear? Any example code?

Regards,

Ramon
Greetings from Catalonia

ADalvi

Hello Ramon,

I could not provide sample code, as i have not written any custom code to the one built from the template "Visual Win32".

Here's what i did when i come across this problem:
Started Easy Code
Selected "Visual Win32" template
Added few controls like edit & button
Ran the test dialog, to view how the form/dialog/window would look, and all looked ok.
Selected to build the project.

After running the project, no controls appear on the form/dialog/window.

Sometimes, few of them would appear, but buttons are the ones who are consistently failing to display itself. (Again, no custom code added)

Tried building example MdiPlay. Build was successful, but when i added extra button control on the form, it was never displayed after rebuild during execution.

If required, i could post you my video recording of the events.

Thanks,
Arvind

Ramon Sala

Hi Arvind,

Thanks for the explanation. I'll check everything you have told me.

I will tell you about it as soon as I can. At the moment, try to set the OwnerDraw property to TRUE for the buttons that do not appear and see the results.

Regards,

Ramon
Greetings from Catalonia

ADalvi

Hello Ramon,

I tried setting the OwnerDraw property to TRUE, but that has not helped either.

Thanks,
Arvind

Ramon Sala

Hi Arvind,

I'm sorry but I exactly did the same you did and everything works fine on XP SP2. Could you send me the project which is giving the problem (or attach it)?

At the same time, I attach a sample project (Test.zip) with a window containing all possible child controls. It works fine both, at design and run time.

Ramon


[attachment deleted by admin]
Greetings from Catalonia

ADalvi

Hello Ramon,

The test project provided works fine as it is, but when i added a button control, and rebuild-n-run, the new button control is not visible.

I tried testing EasyCode in new VM with W2K3+SP2, and still no joy.

I think, i will have to wait for a newer version....In the meantime, will go back to my C++ desk.

Thanks for all your support you have provided.

Arvind

Ramon Sala

Arvind,

I do not understand what happens. The test project works fine and when i added a button control, and rebuild-n-run, there is no problem at all.

I will go on finding out...


Ramon
Greetings from Catalonia

Ramon Sala

Hi Arvind,

My good friend Héctor A. Medina, has made the following test:

- On a Windows XP SP2 virus free
- Download Easy Code for GoAsm (zip file version) and install it - OK
- Create a new visual project with an edit box and a button, build it and run it - OK
- Download Test.zip from Masm forum - OK
- Build and run the Test project - OK
- Add two more buttons to Test project, build it and run it - OK
- Open the MIDIPlay project, build it and run it -OK
- Add one more button to MIDIPlay project, build it an run it - OK
- Add some code to the extra button, build the project and run it - OK

Thanks Héctor!


I'm really sorry Arvind, but Héctor and I cannot see any problem at all, so I don't understand what is hapenning. Héctor is going to make the test in another computer later on, but I guess he's not going to have any problem either. Would you mind to post a project created by you with a Button and an Edit controls so that I can see whether the button is dispalyed or not? Thank you.

Regards,

Ramon
Greetings from Catalonia

ramguru

I confirm what ADalvi said, it's true. I also announce that it's editor's fault, not ADalvi's.
I made the following test:
Created Visual Project, added 4 buttons, compiled, ran - result: empty window.
Lucky for me, I've coded a tool that can generate resource script "from point", so here it is:

1 DIALOGEX 11, 15, 177, 106
CAPTION "Window1"
STYLE 0x16CF0000
EXSTYLE 0x00040100
BEGIN
CONTROL "Button4", 1003, "Button", 0x54004300, 134, 52, 0, 0, 0x00000000
CONTROL "Button3", 1002, "Button", 0x54004300, 102, 34, 0, 0, 0x00000000
CONTROL "Button2", 1001, "Button", 0x54004300, 66, 22, 0, 0, 0x00000000
CONTROL "Button1", 1000, "Button", 0x54004301, 31, 33, 0, 0, 0x00000000
END

Do you see what's wrong with the script, I do :) - initial width & height of the control not defined by IDE.

Ramon Sala

Hi ramguru,

Thank you very much for your help. Although it does not happen to me (nor other people), I supose the problem appears with Dialog boxes. I'll try to find and fix the bug this evening..

Thanks again,

Ramon
Greetings from Catalonia

ramguru

Try not to define rectangle of a chosen control, just chose type ... click on the form once and IDE will create control that has 0width & 0height, though it will be visible in preview window.

Ramon Sala

Okay. I will be able to do all this test in a few hours.

Thank you!
Greetings from Catalonia

Ramon Sala

Hi,

The bug is found and fixed. I will try to release a new version tomorrow.

Arvind, ramguru: thank you very much.

Ramon
Greetings from Catalonia

Ramon Sala

Hi all,

A new version of Easy Code has been released. It fixes the non-displayed controls bug.

Download it at:

http://www.easycode.cat/English/index.htm


Thanks for your help,

Ramon
Greetings from Catalonia