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 » Changing of UI from ordinary SDI / MDI Collapse All
Subject Author Date
liu hoi hing Jan 16, 2004 - 1:56 AM

Hello,


I downloaded your product from codeproject and I have some question of integrating
your library to my existing software. The questions are as below:


    I did a trail of your library by creating a simple SDI application using VC++6.0
    ClassWizard first. Then, I try to follow your SDI sample and documentation on the
    codeproject to change the GUI of my SDI frame window. However it was failed.
    I tried to add the code:


 g_PaintManager.InstallPaintManager( RUNTIME_CLASS(CExtPaintManager2003) );


    in the constructor of CMainFrame Class. However, the compiler just give the error below:


 line 1: MainFrm.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: bool __thiscall                                  CExtPaintManager::CExtPaintManagerAutoPtr::InstallPaintManager(struct CRuntimeClass *)" (__imp_? InstallPaintManager@CExtPaintManagerAutoPtr@CExtPa
  intManager@@QAE_NPAUCRuntimeClass@@@Z)
 line 2: MainFrm.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) class CExtPaintManager::CExtPaintManagerAutoPtr  g_PaintManager" (__imp_?  g_PaintManager@@3VCExtPaintManagerAutoPtr@CExtPaintManager@@A)
 line 3: MainFrm.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static struct CRuntimeClass const      CExtPaintManager::classCExtPaintManager" (__imp_?classCExtPaintManager@CExtPaintManager@@2UCRuntimeClass@@B)


    What’s wrong with my trial ? What is missing ? I found out that your SDI sample’s "CChildView" are not inherited from CView, but CWnd, Why ?
    Do you have any guildline of how to integrate your library to a traditional SDI or MDI program ? By just following your code in the samples is very
    hard. Hope taht you can help me.


I am looking forward to your reply.


Best regards,
HING

Technical Support Jan 16, 2004 - 3:57 AM

Dear HING,

First, make sure that you set up the correct paths for the Prof-UIS files in your project.
The ...\Prof-UIS\Include folder should be added to Include folders list in your VC++ environment settings. The proper paths should be also added to Library folders list. Prof-UIS LIB and DLL files are located in the corresponding folders (...\Prof-UIS\Bin_600 for VC++ 6, ...\Prof-UIS\Bin_700 for VC++ 7.0 and ...\Prof-UIS\Bin_710 for VC++ 7.1)

Second, one of your precompiled header files (e.g. StdAfx.h) should contain the line below:

#include <Prof-UIS.h> 
After that, your program can be linked with one of Prof-UIS build configurations, which depends on your project settings. To run your program, you may need to copy the required Prof-UIS DLL into the folder that contains the EXE file.

liu hoi hing Jan 16, 2004 - 6:36 PM

Dear,

 

Thx for your reply. When I do the compilation, it just prompt out that it need the file named "ProfUIS223m.lib".


However, I can’t find any of your output file name are "ProfUIS223m.lib" from the "profuislib_600" VC++ 6.0 Project.

The filename that is closest to the "ProfUIS223m.lib" are "ProfUIS223sm.lib" which stands for Static MBCS library.

 

Since the default MDI project from VC++6.0 Wizard are static MBCS project, therefore, i try to change the file name of "ProfUIS223sm.lib" to "ProfUIS223m.lib" and do the compilation.

 

It compiles without any error by including the "Prof-UIS.h" in the StdAfx.h header file after doing the changes above. Therefore, I think I have correctly set the path and environment.

 

Again, what makes me write here is when I try to change the GUI of my MDI project by writing the code below in the CMainFrame constructor:

 

    g_PaintManager.InstallPaintManager( RUNTIME_CLASS(CExtPaintManager2003) );

 

and the following 3 errors are given:

 

1. MainFrm.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: bool __thiscall CExtPaintManager::CExtPaintManagerAutoPtr::InstallPaintManager(struct CRuntimeClass *)" (__imp_?InstallPaintManager@CExtPaintManagerAutoPtr@CExtPa
intManager@@QAE_NPAUCRuntimeClass@@@Z)
2. MainFrm.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) class CExtPaintManager::CExtPaintManagerAutoPtr g_PaintManager" (__imp_?g_PaintManager@@3VCExtPaintManagerAutoPtr@CExtPaintManager@@A)
3. MainFrm.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static struct CRuntimeClass const CExtPaintManager::classCExtPaintManager" (__imp_?classCExtPaintManager@CExtPaintManager@@2UCRuntimeClass@@B)


You know, I just follow what your samples (SDI_600) doing. What is the step I missed ? Can you give me some guide to INTEGRATE your library (not just how to import the library by configurate VC++6.0 IDE) to an ordinary SDI / MDI projects ? It is hard to follow by just looking into your code. Why there is no documentation of what your samples are doing ? Can you help me by trying my case ? I think it will happen to many people using your library. Hope that you can help me.


 

Best regards,

HING

Technical Support Jan 17, 2004 - 6:25 AM

Dear Liu,

There is no any point in renaming those files. Instead, you should build the proper library configuration (which you will use in your project). In your particular case, you need to build the ProfUIS223m configuration, which stands for "your exe file will use Prof-UIS as a dynamic library and Prof-UIS in its turn will use MFC as a dynamic library and the character system that should be used is MBCS". Please read the corresponding topic in MSDN. All possible build configurations are listed in the article Prof-UIS Build Configurations at our website .

Unfortunally, so far we haven’t got a ready-to-use tutorial on how to migrate from MFC to Prof-UIS, but we are working on this issue now.

Please note your code line contains a wrong class name *CExtPaintManager2003*, which actually should be CExtPaintManagerOffice2003.