Bug in TBar?
Re: Bug in TBar?
Antonio,
This how it looks the Bitmap at the Ribbon when generating the error:
[IMG=http://img838.imageshack.us/img838/511/errortransbmp.png][/IMG]
Uploaded with ImageShack.us
Thanks.
This how it looks the Bitmap at the Ribbon when generating the error:
[IMG=http://img838.imageshack.us/img838/511/errortransbmp.png][/IMG]
Uploaded with ImageShack.us
Thanks.
FWH 11.11, Harbour 3.1 and Borland C++ 5.82
Re: Bug in TBar?
Antonio,
Also, I got it in TTabs:
Also, I got it in TTabs:
Code: Select all
Called from: => TRANSBMP( 0 )
Called from: .\source\classes\TABS.PRG => TTABS:PAINTTAB( 365 )
Called from: .\source\classes\TABS.PRG => TTABS:PAINTOVER( 523 )
Called from: .\source\classes\TABS.PRG => TTABS:MOUSEHOVER( 553 )
Called from: .\source\classes\TABS.PRG => (b)TTABS_NEW( 182 )
Called from: .\source\classes\WINDOW.PRG => TWINDOW:MOUSEMOVE( 2911 )
Called from: .\source\classes\CONTROL.PRG => TCONTROL:MOUSEMOVE( 741 )
Called from: .\source\classes\TABS.PRG => TTABS:MOUSEMOVE( 1041 )
Called from: => TWINDOW:HANDLEEVENT( 0 )
Called from: .\source\classes\CONTROL.PRG => TCONTROL:HANDLEEVENT( 1699 )
Called from: .\source\classes\TABS.PRG => TTABS:HANDLEEVENT( 1021 )
Called from: .\source\classes\WINDOW.PRG => _FWH( 3160 )
Called from: => DIALOGBOXINDIRECT( 0 )
Called from: .\source\classes\DIALOG.PRG => TDIALOG:ACTIVATE( 266 )
FWH 11.11, Harbour 3.1 and Borland C++ 5.82
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: Bug in TBar?
What is the error ? This is the calls stack only...
Re: Bug in TBar?
Antonio,
Thanks for reply.
It was indicated in previous post.
I modified with your help Transbmp to add error msgs:
Thanks for reply.
It was indicated in previous post.
I got it in Ribbon and Tabs.Error (2) Can't create bitmap
I modified with your help Transbmp to add error msgs:
Code: Select all
#pragma BEGINDUMP
#include <windows.h>
#include <hbapi.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 );
BitBlt( nDC, 0, 0, iXsize, iYsize, mDC, 0, 0, SRCCOPY );
SetStretchBltMode( hDC, COLORONCOLOR );
StretchBlt( hDC, iXOffset, iYOffset, iWidth, iHeight,
mDC, 0, 0, iXsize, iYsize,
SRCINVERT );
StretchBlt( hDC, iXOffset, iYOffset, iWidth, iHeight,
nDC, 0, 0, iXsize, iYsize,
SRCAND );
StretchBlt( hDC, iXOffset, iYOffset, iWidth, iHeight,
mDC, 0, 0, iXsize, iYsize,
SRCINVERT );
SelectObject( nDC, hBmOld2 );
DeleteDC( nDC );
}
else
MessageBox( 0, "(1) Can't create compatible DC!", "Error", 0 );
DeleteObject( hMask );
}
else
MessageBox( 0, "(2) Can't create bitmap!", "Error", 0 );
hb_xfree( lpBits );
}
else
MessageBox( 0, "(3) Can't allocate memory!", "Error", 0 );
SelectObject( mDC, hBmOld1 );
DeleteDC( mDC );
}
else
MessageBox( 0, "(4) Can't create DC!", "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 ENDDUMP
FWH 11.11, Harbour 3.1 and Borland C++ 5.82
Re: Bug in TBar?
Antonio, Daniel,
Any help please?.
Thanks a lot!!
Any help please?.
Thanks a lot!!
FWH 11.11, Harbour 3.1 and Borland C++ 5.82
- Daniel Garcia-Gil
- Posts: 2365
- Joined: Wed Nov 02, 2005 11:46 pm
- Location: Isla de Margarita
- Contact:
Re: Bug in TBar?
i started a test with this code in ribbon.prg sample
after 1 hour i'll report
Code: Select all
define timer oTimer interval 1000 action ( oWnd:cTitle := Time(), oRBar:refresh() ) of oWnd
our best documentation is the source code
Isla de Margarita Venezuela.
danielgarciagil@gmail.com
http://tdolphin.blogspot.com/
https://www.dropbox.com/referrals/NTI5N ... rc=global9
Isla de Margarita Venezuela.
danielgarciagil@gmail.com
http://tdolphin.blogspot.com/
https://www.dropbox.com/referrals/NTI5N ... rc=global9
- Daniel Garcia-Gil
- Posts: 2365
- Joined: Wed Nov 02, 2005 11:46 pm
- Location: Isla de Margarita
- Contact:
Re: Bug in TBar?
Hello
after 1:30 all is fine...
the test still continue
after 1:30 all is fine...
the test still continue
our best documentation is the source code
Isla de Margarita Venezuela.
danielgarciagil@gmail.com
http://tdolphin.blogspot.com/
https://www.dropbox.com/referrals/NTI5N ... rc=global9
Isla de Margarita Venezuela.
danielgarciagil@gmail.com
http://tdolphin.blogspot.com/
https://www.dropbox.com/referrals/NTI5N ... rc=global9
Re: Bug in TBar?
Daniel,
Thanks for your help again.
But also it is required to work with the program, click on buttons, open dialogs, treport, etc.
With the MessageBox at transbmp I am able to trace it as it shows the message, I can capture the screen and see stack calls.
It is not easy to trace it. Sorry.
Who is the author of TransBmp?.
Thanks for your help again.
But also it is required to work with the program, click on buttons, open dialogs, treport, etc.
With the MessageBox at transbmp I am able to trace it as it shows the message, I can capture the screen and see stack calls.
It is not easy to trace it. Sorry.
Who is the author of TransBmp?.
FWH 11.11, Harbour 3.1 and Borland C++ 5.82
- Daniel Garcia-Gil
- Posts: 2365
- Joined: Wed Nov 02, 2005 11:46 pm
- Location: Isla de Margarita
- Contact:
Re: Bug in TBar?
fivetechukservice wrote:Who is the author of TransBmp?.
it's really a hard test... i added a sysrefresh too, after 1:30 (more) continue stable the sampleukservice wrote:But also it is required to work with the program, click on buttons, open dialogs, treport, etc.
our best documentation is the source code
Isla de Margarita Venezuela.
danielgarciagil@gmail.com
http://tdolphin.blogspot.com/
https://www.dropbox.com/referrals/NTI5N ... rc=global9
Isla de Margarita Venezuela.
danielgarciagil@gmail.com
http://tdolphin.blogspot.com/
https://www.dropbox.com/referrals/NTI5N ... rc=global9
- Daniel Garcia-Gil
- Posts: 2365
- Joined: Wed Nov 02, 2005 11:46 pm
- Location: Isla de Margarita
- Contact:
Re: Bug in TBar?
Other samples
More hard
More hard
Code: Select all
define timer oTimer interval 1000 action ( If( n++%2 == 0, oWnd:Move( , , 100, 100 ), oWnd:Move( , , 800, 800 ) ), sysrefresh() ) of oWnd
our best documentation is the source code
Isla de Margarita Venezuela.
danielgarciagil@gmail.com
http://tdolphin.blogspot.com/
https://www.dropbox.com/referrals/NTI5N ... rc=global9
Isla de Margarita Venezuela.
danielgarciagil@gmail.com
http://tdolphin.blogspot.com/
https://www.dropbox.com/referrals/NTI5N ... rc=global9
Re: Bug in TBar?
Daniel,
Thanks for helping.
I am afraid it can´t be traced just with a timer
The sequence of Transbmp is ok?.
What the bitmap can´t be created?.
And what about METHOD Paint() at CLASS TRBtn?. At the end of it //ReleaseDC( ::hWnd, ::hDC ) is commented. I don´t know why.
Thanks again.
Thanks for helping.
I mean the person.ukservice wrote:
Who is the author of TransBmp?.
I am afraid it can´t be traced just with a timer
The sequence of Transbmp is ok?.
What the bitmap can´t be created?.
Code: Select all
MessageBox( 0, "(2) Can't create bitmap!", "Error", 0 );
And what about METHOD Paint() at CLASS TRBtn?. At the end of it //ReleaseDC( ::hWnd, ::hDC ) is commented. I don´t know why.
Thanks again.
FWH 11.11, Harbour 3.1 and Borland C++ 5.82
- Daniel Garcia-Gil
- Posts: 2365
- Joined: Wed Nov 02, 2005 11:46 pm
- Location: Isla de Margarita
- Contact:
Re: Bug in TBar?
because is not necessary, it's automatically releaseukservice wrote:And what about METHOD Paint() at CLASS TRBtn?. At the end of it //ReleaseDC( ::hWnd, ::hDC ) is commented. I don´t know why.
our best documentation is the source code
Isla de Margarita Venezuela.
danielgarciagil@gmail.com
http://tdolphin.blogspot.com/
https://www.dropbox.com/referrals/NTI5N ... rc=global9
Isla de Margarita Venezuela.
danielgarciagil@gmail.com
http://tdolphin.blogspot.com/
https://www.dropbox.com/referrals/NTI5N ... rc=global9
- Daniel Garcia-Gil
- Posts: 2365
- Joined: Wed Nov 02, 2005 11:46 pm
- Location: Isla de Margarita
- Contact:
Re: Bug in TBar?
Hello
it's a screenshot of a personal project... this system work around 12 hours daily and never show error (using ribbon and tabs)
work with socket, mysql, fivewin, fastreport
it's a screenshot of a personal project... this system work around 12 hours daily and never show error (using ribbon and tabs)
work with socket, mysql, fivewin, fastreport
our best documentation is the source code
Isla de Margarita Venezuela.
danielgarciagil@gmail.com
http://tdolphin.blogspot.com/
https://www.dropbox.com/referrals/NTI5N ... rc=global9
Isla de Margarita Venezuela.
danielgarciagil@gmail.com
http://tdolphin.blogspot.com/
https://www.dropbox.com/referrals/NTI5N ... rc=global9
Re: Bug in TBar?
Daniel,
Thanks again.
Did you interact with your software?.
Also, during my tests i found out sometimes a resource leak with checkres():
Line in window.prg FW 11.1.1 is:
Main(179) is my DEFINE WINDOW:
Thanks again.
Did you interact with your software?.
Also, during my tests i found out sometimes a resource leak with checkres():
Code: Select all
FONT,1292505504,TWINDOW:GETFONT(2732)->TWINDOW:NEW(847)->MAIN(179)
Line in window.prg FW 11.1.1 is:
Code: Select all
::GetFont()
return Self
Main(179) is my DEFINE WINDOW:
Code: Select all
DEFINE WINDOW oWndMain FROM 1, 1 TO 28, 75 ;
TITLE "TEST" ;
MENU MenuMain()
FWH 11.11, Harbour 3.1 and Borland C++ 5.82