Professional UI Solutions
Site Map   /  Register


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 » ProfUIS-282: Problem with instatiation of CExtPaintManagerSkin Collapse All
Subject Author Date
Carsten Pedersen Jan 4, 2008 - 5:15 AM


Tried to use the new 2.82 libs after building them (freeware) and use them instead of the 2.81 I was using before.
I get an exception when performing the following in the InitInstance of my dialogApp class:
CExtPaintManagerSkin *pPM = new CExtPaintManagerSkin;

The specific error arises in line 731 of ExtPaintManager.cpp:

The code works properly in your skinable sample, but not in mine. In ExtCmdIcon.cpp if fails to retrieve a hInst in line 1319:
        hInst =
        if( hInst == NULL )
            if( bEnableThrowException )
            return false;
        } // if( hInst == NULL )

And thus returns false.

It doesn’t do this in the 2.81 version, so until we figure out if it is on my end something is wrong, I’ll be using the 2.81 version.

Best regards

Byron Blattel Jan 13, 2009 - 8:06 AM

The wizard doesn’t add __STATPROFUIS_WITH_DLLMFC__ to ’Resources\General\Preprocessor Definitions’ in the project properties.  You need to add it manually.

Carsten Pedersen Jan 18, 2008 - 7:10 AM


Well I have found the bug, and the fault is mine :)
I realised that I have to include the define
In the resources preprocessor definitions, as well as adding the include path to the "Additional Include directories" in the resources tab.

Hopefully it will help other people.

Best regards

Technical Support Jan 17, 2008 - 4:11 AM

If you sent us a test application, that would be very convenient and really allow us to find out what is wrong. Please send it to the support mail box at this web site.

Carsten Pedersen Jan 16, 2008 - 4:01 AM

Ok, found the older version. But Please look into the 2.82 problem for me. Am I really the only one with this problem?

Carsten Pedersen Jan 16, 2008 - 3:56 AM

It seems I’ve erased the 2.81 zip file, Do you have a server where I can get older revisions of the software?

Carsten Pedersen Jan 16, 2008 - 3:54 AM

I’ve just made a basic dialog app, and instantiated CExtPaintManagerSkin *pPM = new CExtPaintManagerSkin;
I still gives me the same error. I can zip you the project if you want.

I built the libs directly from the freeware zip file without changing anything.

Technical Support Jan 14, 2008 - 11:45 AM

The skin paint manager is not part of the Prof-UIS library. It’s implemented in the ProfSkin library. You should have both libraries compiled first. Then you should include both library headers in your project:

#if (!defined __PROF_UIS_H)
      #include <Prof-UIS.h>
#endif // (!defined __PROF_UIS_H)

#if (!defined __PROF_SKIN_H)
      #include <../ProfSkin/ProfSkin.h>
#endif // (!defined __PROF_SKIN_H)
If you did this and the problem persists, then it’s hidden somewhere else and we need to take a look at your project.

Carsten Pedersen Jan 14, 2008 - 2:51 AM

I’m still having problems using the new version. Although I don’t have the lines described above in my 2.81 project, it seems to work fine. It doesn’t with ver 2.82.

In the FAQ it is stated that this has been introduced since version 2.52, but as I said it hasn’t been a problem for me with version 2.81.

I’m statically linking with MFC dll, so I’m using the ProfUIS282ymd.lib and ProfUIS282ym.lib libs.

What else could I be doing wrong?

Technical Support Jan 11, 2008 - 11:04 AM

If you link Prof-UIS statically to your application, you need to additionally include Prof-UIS resources. You can do that by adding the following lines to your application’s .rc2 file:

#if ( !(defined _AFXDLL && !defined __STATPROFUIS_WITH_DLLMFC__) )
    #include <Resources/Resource.rc>
To find out more, read the article How to link statically with Prof-UIS?

Suhai Gyorgy Jan 4, 2008 - 7:03 AM

I’m not sure if these tips help or not:
- How to link statically with Prof-UIS?
- Maybe it’s just a question of rebuilding your solution/project completely.

Timo Stripf Jan 7, 2008 - 10:54 AM

I’ve the same problem with the full version of 2.82. The problem can be simple reproduced by creating a new project using the ProfUISAppWizard. I changed only the option to use prof-uis in static library and left every other settings unchanged. After compiling i get several debug exceptions in ExtPaintManager.