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 » CreateCompatibleBitmap Collapse All
Subject Author Date
Sergio Buonanno Nov 21, 2006 - 2:06 AM

I’m using a pattern brush to paint the background of an MDI application child windows. There is a pattern brush for each MDI child window and each brush uses a bitmap created by CreateCompatibleBitmap (a quite large bitmap; 800x600 pixels). The problem is that I can open just a few MDI child windows, because CreateCompatibleBitmap fails with error ERROR_NOT_ENOUGH_MEMORY. I checked my code with a simple MDI application (not using Prof-UIS ver. 2.52 that I’m currently using) and I haven’t such a problem. It appears only when I link my code with Prof-UIS.

Sergio Buonanno Nov 23, 2006 - 8:58 AM

May you help me to find out why such a behavior from Prof-UIS 2.52 ?

Sergio Buonanno Nov 22, 2006 - 2:37 AM

Unfortunately I cannot use CExtBitmap, I need a CBrush object for other reasons too. I don’t understand why Prof-UIS (at least ver. 2.52) is using so much system resources. Just after 10-15 windows are openend I receive the error ERROR_NOT_ENOUGH_MEMORY. Any other hint ?

Technical Support Nov 23, 2006 - 12:09 PM

Prof-UIS 2.62 really consumes more handles than in the later versions but it cannot use "so many" system resources as you wrote. Could you send us a modified version of one of our sample projects so we can help you?

Sergio Buonanno Nov 28, 2006 - 1:05 AM

I’m trying to move my application to Prof-UIS 2.60 or 2.61 but the MDI Tab control doesn’t work anymore. If I’ll be able to use a newer version of Prof-UIS I’ll check if this problem is fixed and in that case there will be no need to test a sample application. The problem is that I cannot update my application to ver. 2.6x because the MDI tab control has changed behavior and now it isn’t compatible with my application anymore. As I wrote you in another post, the function CExtTabWnd::AssertValid() fails because m_nVisibleItemCount == -1. Can you help me in finding the problem whith the MDI Tab ?

Technical Support Nov 28, 2006 - 12:04 PM

The behavior of the tab window has not changed. We cannot confirm this. The tab window is used in the sample applications of different Prof-UIS versions exactly in the same way. We eager to help you and if you send us a sample that reproduces the problem that would really help us to find what’s wrong.

Sergio Buonanno Nov 29, 2006 - 2:12 AM

In the end I succeeded to build my application with Prof-UIS 2.61 and now the situation is even worse. CreateCompatibleBitmap fails before than with ver. 2.52. I verified my application with Bound Checker and there isn’t any anomaly in our code, not only that, if I remove support to Prof-UIS and build a simple MFC MDI application everything is fine. I will try to repeat the problem with your sample applications, in the meantime I can also send you a video streaming to show you the problem if you want.

Technical Support Nov 30, 2006 - 1:09 PM

We can guess the problem is not related to any potential bug in Prof-UIS. At least, this problem has never been reported before. We can help you what causes the problem by means of remote debugging.

Technical Support Nov 21, 2006 - 11:42 AM

You can use the handle-less CExtBitmap class instead of pattern brushes. The CExtBitmap::DrawSkinParts() method with zero padding and CExtBitmap::__EDM_TILE draws the bitmap as a pattern.