Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS General Discussion » Linking static libs..... lots of problems.... please help... Collapse All
Subject Author Date
Nitesh Singh Sep 10, 2006 - 11:02 PM

Hi.... I got full version of Prof-UIS last week. And I was trying to link my libraries statically.

My solution has got a total of 10 projects.
One of the project is resource project (It produces one resource.dll which is used by main exe)
Some prjects create .dll and some created .lib files

Earlier when I was linking Prof-UIS dynamically i.e. putting the ProfUIS254md.dll in the output directory then everything was working fine.. But I want my project to statically linked with libs. i.e. with ProfUIS254ymd.lib ................

what I have followed...... : 1. added __STATPROFUIS_WITH_DLLMFC__ to the Preprocessor Definitions field in the C/C++ and Resources categories for all projects....
2. In rc2 file.. added..... #if ( !(defined _AFXDLL && !defined __STATPROFUIS_WITH_DLLMFC__) )
#include <Resources/Resource.rc>
#endif

the project was building fine.. I was using office 2007 luna blue theme.. when program started it was displaying the correct theme.. but the propertyGrid (which is most important for me) which was not having the same colortheme.. it is looking just plain...... That is not the only problem.. the problem is that once it is created.. now I wanted to populate the propertygrid again.. then when I am calling

    CExtPropertyGridComboBoxBar * pCombo = STATIC_DOWNCAST(    CExtPropertyGridComboBoxBar,m_PGC.GetChildByRTC(RUNTIME_CLASS
(CExtPropertyGridComboBoxBar)));
    ASSERT_VALID( pCombo );
    
    pCombo->PropertyStoreRemove();
... // again populating the combo with new selected items...

the problem is that the pCombo is giving NULL.. and giving

assertion failure.. I am frustated.. please help...

Nitesh Singh Sep 12, 2006 - 10:23 PM

I have added __STATPROFUIS_WITH_DLLMFC__ in all the project.. and second thing that I am not using a CExtPropertyGridCtrl derived class. Yes, I am using a CDialog derived class (not CExtResizableDialog) on which the propertygrid is placed.

for the second explanation.. I worked for the first time.. but again when I am accessing it for re-populating then it was returning null.

please tell me what should be the step by step procedure to overcome this problem.. (for the time I am switch to ProfUIS254md.dll but this is not a final solution.. )
thank you

Technical Support Sep 13, 2006 - 11:53 AM

Would you send us a test project so we can find out what’s wrong?

Technical Support Sep 11, 2006 - 7:18 AM

Because you switched to using Prof-UIS statically, several copies of Prof-UIS code can present at a particular moment while running some process with your DLLs loaded. This means some of your projects, which hosts an independent copy of Prof-UIS and creates the property grid, does not initialize the paint manager and you see a non-themed report grid. The combo box bar is always created inside the property grid by default. It can be NULL in two cases:

1) You use your own CExtPropertyGridCtrl-derived class which implements the CExtPropertyGridCtrl::OnPgcCreateBars() virtual method and it does not create the combo box bar window. You should not see the combo box bar inside the property grid window at all in this case.

2) You try to get a pointer to the combo box bar before it is created or even when the property grid control is not created yet.