Home » U++ Library support » U++ Widgets - General questions or Mixed problems » strange looking window
strange looking window [message #9371] |
Wed, 02 May 2007 22:58 |
bitsun
Messages: 12 Registered: March 2007 Location: Germany
|
Promising Member |
|
|
My company has decided to use UPP as the GUI development library. But we still stick to VC2005.
Now I am already able to compile and debug C++ program using UPP in VC2005. The funny thing is that the window I program in VC2005 has a different look than the window created by theIDE.
First I want to confirm one point, the core,ctrlcore,ctrllib,draw,richtext,plugin/bmp,plugin/png,pl ugin/z
are the fundamental libraries, on which all GUI programs are based on, is that right?
I have tried two ways to build upp static libraries.
OK , then I will show how I achieve it.
1, Use the $blitze.obj files created by theIDE, then created win32 project,add all the neccessary object files under the MSC8.Debug_full.Gui directory to the project, then build the project as static library.
2, build the source(i only build the source code in the 7 libraries that i mentioned above) totally with VC2005, without theIDE.
So i have two versions of upp static libraries.
But when I test my first upp program,it compiles and links successfully(with both versions of static libraries), but I got a strange look of the window(in both cases)
It is supposed to look like a window like this :
All the upp windows that I create have dark color and the buttons have no borders at all.
However,if I do not use these static libraries ,but add these object files created by theIDE directly to the my project,then everything is fine. The created windows are normal.
Is there any difference between the static libraries and the objects files. Since I use exactly the same object files to build the static libraries(in the first build method I mentioned above), I guess they should be equivalent.
Anyway static library is a better solution,it would be annoying to add these objects files every time when I create a new project.
Thanks in advance.
Bitsun
-
Attachment: strange.JPG
(Size: 17.87KB, Downloaded 925 times)
|
|
|
|
|
|
|
Re: strange looking window [message #9588 is a reply to message #9371] |
Fri, 18 May 2007 11:36 |
bitsun
Messages: 12 Registered: March 2007 Location: Germany
|
Promising Member |
|
|
yes,I built the library in MSVC. But I also found out that theIDE can create these static libraries itself(just need to switch off blitz).
So now I am using theIDE to generate these static libraries for me. But, the same problem as I stated above, the ctrllib.obj is not linked into the static library. I have tried dumpbin to view the archived obj files within the file ctrlLib.lib.That's why I am asking if there is any options in theIDE to force the obj file to be linked into library, instead of being eliminated.(Maybe there is no such option at all)
Even if the ctrllib.obj is not present,the program can still link,but we get an ugly interface. Now I wondering,Is the binary image using any symbols in ctrllib.obj? If yes ,why does the linker does not report any error,even if ctrllib.obj is not present.
|
|
|
|
Re: strange looking window [message #9652 is a reply to message #9371] |
Wed, 23 May 2007 21:51 |
Novo
Messages: 1358 Registered: December 2006
|
Ultimate Contributor |
|
|
The easiest ways to fix your problem is to call CtrlSetDefaultSkin(ChStdSkin, ChHostSkin) from one of the possible places listed below.
1) GUI_APP_MAIN;
2) A constructor of a class inherited from TopWindow;
3) A constructor of a "your_class : public your_layout<TopWindow>";
I think Mirek could put this call somewhere inside of TopWindow. That would solve all these problems with icpp files.
I hope that helps.
Regards,
Novo
|
|
|
|
Re: strange looking window [message #22500 is a reply to message #9371] |
Sun, 19 July 2009 19:45 |
Sc0rch
Messages: 99 Registered: February 2008 Location: Russia, Rubtsovsk
|
Member |
|
|
I'm trying to create a plugin framework. From plugins I'm getting only the layouts now (for tests). But there is a very strange issue... Just run and press "Test Button" and try to use the layout.
After some days: I found a decision. I'm creating ctrl's by calling functions like that:
CtrlFactory::Execute("AddMTIBar", const Value& v1, ...);
Example: f->Execute("AddMTIBar", "Test Title"); // in plugin
Function must be defined in the host-program. In my decision it creates a callback (using this-pointer in host and using received parameters) and executes it.
Well, maybe it's a little complicated but it works good.
Best regards,
Anton
-
Attachment: MSC9.Gui.rar
(Size: 979.69KB, Downloaded 307 times)
[Updated on: Thu, 23 July 2009 15:56] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Mon May 13 10:41:42 CEST 2024
Total time taken to generate the page: 0.02680 seconds
|