April 26, 2024, 01:43:59 AM

News:

IonicWind Snippit Manager 2.xx Released!  Install it on a memory stick and take it with you!  With or without IWBasic!


MDI issues

Started by ludovico, August 22, 2008, 05:52:56 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ludovico

Hi2All:

1st:Congratulations by this great programming environment, Aurora (and EBasic  too, but I prefer the c++ style).

I'm develop a little management software using MDI, the problem is about the dialog editing: The result into a Child window is different than the result in a normal dialog window, for example, the AWS_TABSTOP style on a control does't works, the width of the edit controls dont be the same as the dialog editor, a white background appears,ect... Why it's happens? I only design the dialog, export the code and paste it like this:
//This is into a Frame MDI window method:
pTemp->m_parent = this;//pTemp is an pointer to an objet of a derivated class of MDIChildWnd
pTemp->Create(AWS_USEDEFAULT,0,312,161,AWS_VISIBLE | AWS_CHILD | AWS_AUTODRAW ,0,"Nuevo VehÃÆ'Ã,­culo",this);
pTemp->AddControl(CTSTATIC,"MatrÃÆ'Ã,­cula",33,16,70,20,0x5000010B,0x0,1);
pTemp->AddControl(CTEDIT,"",106,15,70,20,0x50810000|AWS_TABSTOP,0x200,2);
pTemp->AddControl(CTSTATIC,"Marca",34,51,52,20,0x5000010B,0x0,3);
pTemp->AddControl(CTEDIT,"",106,43,129,20,0x50810000|AWS_TABSTOP,0x200,4);
pTemp->AddControl(CTSTATIC,"Modelo",33,77,70,20,0x5000010B,0x0,5);
pTemp->AddControl(CTEDIT,"",106,76,155,20,0x50810000|AWS_TABSTOP ,0x200,6);


When you export code from the dialog editor, it translate the styles into their codes, IMHO it's an inconvenience.

My concern is to make work the tabstop

Thanks and greetings from Canary Islands!



Ionic Wind Support Team

pTemp->EnableTabs(true)

Ionic Wind Support Team

Bruce Peaslee

I wrote a constant converter for Aurora. I almost always replace the hex generated by the Dialog Editor with the corresponding constants.

http://www.ionicwind.com/forums/index.php/topic,245.0.html

Bruce Peaslee
"Born too loose."
iTired (There's a nap for that.)
Well, I headed for Las Vegas
Only made it out to Needles

ludovico

August 22, 2008, 10:10:24 AM #3 Last Edit: August 22, 2008, 10:33:17 AM by ludovico
Thanks a lot peaslee and Paul!  :)

ludovico

Why the MDIChildWnd background color is white? I tried to change it with SetWindowColor but nothings changes. And, if I paste a code generated by the dialog editor some controls appears with less width?

Ionic Wind Support Team

Because MDI child windows are colored by the OS based on your control panel settings.  Although SetWindowColor should work even with an MDI child, where are you attempting to change it?  The OnCreate override would be the correct place.

Controls are meant for dialogs, the fact that we can use them in windows represents a lot of conversions going back and forth.  In a dialog they are specified in dialog units, which is based on the average character width of the selected font.  So when you specify a control in a dialog, I allow pixels and do the conversions for you.  Those conversions involve a lot of multiplication and divisions which leads to rounding errors, so it is not unusual to see it off by +/-1 pixel when created in both a window and dialog.

Thanks,
Paul Turley
Ionic Wind Software



Ionic Wind Support Team