Antonio,
It happens also in Windows Vista and XP.
Un saludo, Best regards,
Harbour 3.2.0dev, Borland C++ 5.82 y FWH 13.06 [producción]
Implementando MSVC 2010, FWH64 y ADO.
Abandonando uso xHarbour y SQLRDD.
Antonio,
It happens also in Windows Vista and XP.
Lucas,
Could you provide an example to reproduce it ? thanks
Antonio,
Just the sample at fwh\samples
It happens ramdonly.
Just tried to compile using xHarbour from SVN and lost all the buttons from ribbonbar again after a couple of uses...
Actually I'm using xHarbour 1.2.1 Rev 9388 and never experienced this problem...
=====>
Bayron Landaverry
xBasePHP.com
(215)2226600 Philadelphia,PA, USA
MayaBuilders@gMail.com
Guatemala
FWH25.06--Harbour 3.0.0--BCC7.7--UEstudio 10.10
Windows 10
FiveWin, One line of code and it's done...
I think xHarbour has nothing to do with the buttons of the ribbonbar. We have to dig deep inside FWH...
EMG
Enrico Maria Giordano wrote:I think xHarbour has nothing to do with the buttons of the ribbonbar. We have to dig deep inside FWH...
We are going to place traces in all the painting process of the buttons to find where the problem comes from.
Thanks to all for your feedback and patience ![]()
function TransBmp()
return nil#pragma BEGINDUMP
#include <hbapi.h>
#include <windows.h>
static void TransBmp( HBITMAP hBitmap, int iXsize, int iYsize,
COLORREF rgbTransparent, HDC hDC,
int iXOffset, int iYOffset, int iWidth, int iHeight )
{
HDC mDC, nDC;
HBITMAP hMask, hBmOld1, hBmOld2;
LPBYTE lpBits;
mDC = CreateCompatibleDC( hDC );
if( mDC )
{
hBmOld1 = ( HBITMAP ) SelectObject( mDC, hBitmap );
lpBits = ( LPBYTE ) hb_xgrab( iXsize * iYsize * 2 );
if( lpBits )
{
hMask = CreateBitmap( iXsize, iYsize, 1, 1, lpBits );
if( hMask )
{
nDC = CreateCompatibleDC( hDC );
if( nDC )
{
hBmOld2 = ( HBITMAP ) SelectObject( nDC, hMask );
SetBkColor( mDC, rgbTransparent );
if( ! BitBlt( nDC, 0, 0, iXsize, iYsize, mDC, 0, 0, SRCCOPY ) )
MessageBox( 0, "BitBlt() failed from TransBmp()", "error", 0 );
SetStretchBltMode( hDC, COLORONCOLOR );
if( ! StretchBlt( hDC, iXOffset, iYOffset, iWidth, iHeight,
mDC, 0, 0, iXsize, iYsize,
SRCINVERT ) )
MessageBox( 0, "StretchBlt() 1 failed from TransBmp()", "error", 0 );
if( ! StretchBlt( hDC, iXOffset, iYOffset, iWidth, iHeight,
nDC, 0, 0, iXsize, iYsize,
SRCAND ) )
MessageBox( 0, "StretchBlt() 2 failed from TransBmp()", "error", 0 );
if( ! StretchBlt( hDC, iXOffset, iYOffset, iWidth, iHeight,
mDC, 0, 0, iXsize, iYsize,
SRCINVERT ) )
MessageBox( 0, "StretchBlt() 3 failed from TransBmp()", "error", 0 );
SelectObject( nDC, hBmOld2 );
DeleteDC( nDC );
}
else
MessageBox( 0, "can't create compatible DC 2 from TransBmp()", "error", 0 );
DeleteObject( hMask );
}
hb_xfree( lpBits );
}
else
MessageBox( 0, "hb_xgrab() failed from TransBmp()", "error", 0 );
SelectObject( mDC, hBmOld1 );
DeleteDC( mDC );
}
else
MessageBox( 0, "can't create compatible DC 1 from TransBmp()", "error", 0 );
}
HB_FUNC( TRANSBMP )
{
TransBmp( ( HBITMAP ) hb_parnl( 1 ), hb_parnl( 2 ), hb_parnl( 3 ), hb_parnl( 4 ),
( HDC ) hb_parnl( 5 ), hb_parnl( 6 ), hb_parnl( 7 ), hb_parnl( 8 ),
hb_parnl( 9 ) );
}
#pragma ENDDUMPI placed this function in my prg, at first I was able to reproduce the problem once without getting any messages... But I noticed that one bitmap from my ribbonbar didn't desapear...
The only difference with the rest is that it was smaller, so I reduced the images from 112 to 96 pixels, and so far I have not loose the bitmaps from the ribbonbar... but I have lost other resources from dialogs...
This got me thinking that it may be something else... Could it be Pelles 7.0 release candidate #4????
This story to be continued....
=====>
Bayron Landaverry
xBasePHP.com
(215)2226600 Philadelphia,PA, USA
MayaBuilders@gMail.com
Guatemala
FWH25.06--Harbour 3.0.0--BCC7.7--UEstudio 10.10
Windows 10
FiveWin, One line of code and it's done...
Other steps I took are:
Installing Pelles C 7.0 final release
Open and Modify all the images and save them with the new Pelles C...
I have gone from loosing resources every time i used the software to not being able to reproduce the problem so far...
Just for Info: I'm using:
Windows 7 Ultimate
Pelles C
.Res files
Uestudio 10.10
=====>
Bayron Landaverry
xBasePHP.com
(215)2226600 Philadelphia,PA, USA
MayaBuilders@gMail.com
Guatemala
FWH25.06--Harbour 3.0.0--BCC7.7--UEstudio 10.10
Windows 10
FiveWin, One line of code and it's done...
Unfortunately, I've seen the problem using BCC too. ![]()
EMG
In one of my applications it shows a set of hazardous placard images, up to 4, of a given UN code. About a year ago I upgraded FWH.
The application would appear to randomly loose the ability to show images on buttons and other places.
I finally tracked it down to the hazardous placard images. If I commented that portion of the code out it would keep working. With the code in, it would start loosing images somewhere down the road.
I opened each of the images and changed them to 256 colors indexed 8 bit. After that I had no more problems with images.
I do not know now what their original format was but those particular images were screwing up my app. It was driving me crazy with support calls.
Hi Gale,
I had problems with this images before as well, but what is driving me crazy is that only happens in Harbour 3.0 and up, and in SVN xHarbour...
With xHarbour 1.2.1 Rev 9388 it does not happens at all...
As I pointed out before, modifying the images and saving them again, I have gone from every time to It may happen or It may not happen....
=====>
Bayron Landaverry
xBasePHP.com
(215)2226600 Philadelphia,PA, USA
MayaBuilders@gMail.com
Guatemala
FWH25.06--Harbour 3.0.0--BCC7.7--UEstudio 10.10
Windows 10
FiveWin, One line of code and it's done...
Antonio Linares wrote:
If at any moment it fails a msg will be displayed that will help us to know what it is going on. Thanks for your help!
Ruediger,
FWH\samples\FiveDBU.prg is a good example to test it. I have seen ocasionally the disappearing images issue, but I am unable to reproduce it.
I am sure we will be able to locate it and fix it, but for now we don't how to reproduce it... ![]()