karinha wrote:And why, until you find out where you went wrong, don't you turn off the "X" in the Dialog Box?
¿Y por qué, hasta que descubras dónde te equivocaste, no apagas la "X" en el cuadro de diálogo?
Regards.
porque no me equivoco, el problema esta en la clase btnbmp cuando se usa gdiplus con archivos png, porque a nadie le importa cuando estan deshabilitados, se ve mal sin el comando gdiplus, ya lo mencione en el foro, y porque ¿Tengo que eliminar la "X" en el
cuadro de diálogo para corregir un error de btnbmp?
Code: Select all | Expand
Application Internal Error - C:\Work\errori\test_btn_gdi\test.Exe
Terminated at: 2023-05-20 20:24:51
Unrecoverable error 6005: Exception error:
Exception Code:C0000005 ACCESS_VIOLATION
Exception Address:777B43A9
EAX:00003E26 EBX:029A80D0 ECX:000001E6 EDX:029A0270
ESI:029A80D0 EDI:029A0000 EBP:0019F048
CS:EIP:0023:777B43A9 SS:ESP:002B:0019EEF8
DS:002B ES:002B FS:0053 GS:002B
Flags:00210202
Exception Parameters: 00000001 029A9004
CS:EIP: 66 89 44 CE 04 EB 11 6A 00 50 51 52 8B D7 B9 0D
SS:ESP: 8BC6F855 029A8188 029A0000 00000000 C60001C7 029A0000 3A00003A 028248C4 0000007F 029A84D8 00890814 00000110 FFFFFE2F 000001A8 FFFFF729 029A1DE0
C stack:
EIP: EBP: Frame: OldEBP, RetAddr, Params...
777B43A9 0019F048 0019F0A4 777F7B1D 029A8188 029A8190 029A8190 029A0000 00000001 029A81B0 00000000 029A8190
777F7B1D 0019F0A4 0019F0C0 777B3CA6 00000000 00000000 00000000 005CBAA7 777B3C60
777B3CA6 0019F0C0 0019F100 6BD6741C 029A0000 00000000 029A8190 005CBAA7 00001372 029A8190 0282AAF4 008951CC
6BD6741C 0019F100 0019F128 74C67726 029A0000 00000000 029A8190 00000000 0000177F 0000043F FFFFF3C0 00001372
74C67726 0019F128 0019F138 00449BED 029A8190 00845910
00449BED 0019F138 0019F174 00446D13 029A8190 00000003 0019FAB0 0041EECF 007D2D24 0019F148 00000024 005CBAA7
00446D13 0019F174 0019F190 004EAC4C 00000054 00000000 00B91A74 00000000 00000000
004EAC4C 0019F190 0019F2A4 004E49D3 00000001 005D420F 00000000 00845910 00845CB4 0000000C 00845D24 0000001A
004E49D3 0019F2A4 0019F2B4 0042698C 005CB9F2 005C848C
0042698C 0019F2B4 0019F2D0 004EAC4C 0000004A 00000000 00B91A74 00000000 000004A0
004EAC4C 0019F2D0 0019F3E4 004E49D3 00000001 005D3F20 00000000 005D0824 02967E40 0280F8BC 02A80484 02A80484
004E49D3 0019F3E4 0019F3F4 00426DB4 005D411C 005CF684
00426DB4 0019F3F4 0019F414 004EAE09 00845910 00000048 00000000 00B91A74 02BD000C 00000458
004EAE09 0019F414 0019F528 004E4B14 00000000 00000000 00000002 005B5180 00000004 00000001 027FC194 02967E5C
004E4B14 0019F528 0019F538 00426D3C 005D3F19 005CF684
00426D3C 0019F538 0019F558 004EACFC 00000000 00000043 00000000 00B91A74 0147000C 000003F3
004EACFC 0019F558 0019F564 004EB11D 00B80000
004EB11D 0019F564 0019F58C 00441125 00000000 005E8F08 00000000 005E4A54 00000004 0019F5AC 004EADCA 00B62554
00441125 0019F58C 0019F5AC 004EAE09 00845910 0000003D 00000000 00B91A74 01220006 00000000
004EAE09 0019F5AC 0019F6C0 004E4B14 00000003 005D665E 00000000 005D0FE4 0019F970 0280F8BC 02A80484 02A80484
Modules:
00400000 0047B000 C:\Work\errori\test_btn_gdi\test.Exe
77770000 001A4000 C:\WINDOWS\SYSTEM32\ntdll.dll
75840000 000F0000 C:\WINDOWS\System32\KERNEL32.DLL
77490000 00223000 C:\WINDOWS\System32\KERNELBASE.dll
74F20000 0009F000 C:\WINDOWS\SYSTEM32\apphelp.dll
6BD40000 00285000 C:\WINDOWS\SYSTEM32\AcLayers.DLL
75960000 000BF000 C:\WINDOWS\System32\msvcrt.dll
76040000 0019C000 C:\WINDOWS\System32\USER32.dll
77740000 00018000 C:\WINDOWS\System32\win32u.dll
75930000 00023000 C:\WINDOWS\System32\GDI32.dll
76CD0000 000E1000 C:\WINDOWS\System32\gdi32full.dll
75A90000 0007B000 C:\WINDOWS\System32\msvcp_win.dll
75640000 00120000 C:\WINDOWS\System32\ucrtbase.dll
76ED0000 005B6000 C:\WINDOWS\System32\SHELL32.dll
757F0000 00045000 C:\WINDOWS\System32\SHLWAPI.dll
76E30000 00096000 C:\WINDOWS\System32\OLEAUT32.dll
76710000 00280000 C:\WINDOWS\System32\combase.dll
76BA0000 000BF000 C:\WINDOWS\System32\RPCRT4.dll
75B10000 00434000 C:\WINDOWS\System32\SETUPAPI.dll
75A20000 0003B000 C:\WINDOWS\System32\cfgmgr32.dll
76DC0000 00019000 C:\WINDOWS\System32\bcrypt.dll
73DE0000 00019000 C:\WINDOWS\SYSTEM32\MPR.dll
66680000 00003000 C:\WINDOWS\SYSTEM32\sfc.dll
74890000 00073000 C:\WINDOWS\SYSTEM32\WINSPOOL.DRV
74F10000 00010000 C:\WINDOWS\SYSTEM32\sfc_os.DLL
75A60000 00025000 C:\WINDOWS\System32\IMM32.DLL
776C0000 0007B000 C:\WINDOWS\System32\ADVAPI32.DLL
763D0000 00076000 C:\WINDOWS\System32\sechost.dll
76990000 000AF000 C:\WINDOWS\System32\COMDLG32.DLL
74D90000 00008000 C:\WINDOWS\SYSTEM32\VERSION.DLL
76340000 00087000 C:\WINDOWS\System32\shcore.dll
74970000 00210000 C:\WINDOWS\WinSxS\x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.19041.1110_none_a8625c1886757984\COMCTL32.DLL
75F50000 000E3000 C:\WINDOWS\System32\OLE32.DLL
74F00000 00006000 C:\WINDOWS\SYSTEM32\MSIMG32.DLL
74ED0000 00028000 C:\WINDOWS\SYSTEM32\WINMM.DLL
74EA0000 0002C000 C:\WINDOWS\SYSTEM32\OLEDLG.DLL
74C00000 00167000 C:\WINDOWS\WinSxS\x86_microsoft.windows.gdiplus_6595b64144ccf1df_1.1.19041.2251_none_d9513b1fe1046fc7\GDIPLUS.DLL
73C50000 00074000 C:\WINDOWS\system32\uxtheme.dll
76AC0000 000D4000 C:\WINDOWS\System32\MSCTF.dll
6BBC0000 00171000 C:\WINDOWS\SYSTEM32\WindowsCodecs.dll
747C0000 0000F000 C:\WINDOWS\SYSTEM32\kernel.appcore.dll
76450000 0005F000 C:\WINDOWS\System32\bcryptPrimitives.dll
74DE0000 000BA000 C:\WINDOWS\SYSTEM32\textinputframework.dll
6B8A0000 0009B000 C:\WINDOWS\System32\CoreMessaging.dll
6B940000 0027E000 C:\WINDOWS\System32\CoreUIComponents.dll
76C60000 00063000 C:\WINDOWS\System32\WS2_32.dll
73D20000 00029000 C:\WINDOWS\SYSTEM32\ntmarta.dll
6B7C0000 000DB000 C:\WINDOWS\SYSTEM32\wintypes.dll
6B720000 00094000 C:\WINDOWS\SYSTEM32\TextShaping.dll
6E1F0000 00053000 C:\WINDOWS\system32\Oleacc.dll
Called from GDIP_DELETEIMAGE(0)
Called from PALBMPFREE(1184) in .\source\classes\BITMAP.PRG
Called from TBTNBMP:FREEBITMAPS(1112) in .\source\classes\BTNBMP.PRG
Called from TBTNBMP:DESTROY(1011) in .\source\classes\BTNBMP.PRG
Called from TWINDOW:HANDLEEVENT(0)
Called from TCONTROL:HANDLEEVENT(1855) in .\source\classes\CONTROL.PRG
Called from TBTNBMP:HANDLEEVENT(2051) in .\source\classes\BTNBMP.PRG
Called from _FWH(3560) in .\source\classes\WINDOW.PRG
Called from DIALOGBOXINDIRECT(0)
Called from TDIALOG:ACTIVATE(304) in .\source\classes\DIALOG.PRG
Called from TEST(83) in test.prg
the test
Code: Select all | Expand
#include "FiveWin.ch"
Function Test()
local oFont,oBold
local oDlgSub,oBarSub
local nRecord
local oBtnAnnulla,oBtnAiuto,oBtnConferma
local oCursorBtn :=TCursor():New(,'HAND')
local nWd := GetSysMetrics(0) * .35
local nHt := (GetSysMetrics(1) / 5 )
local ddatacambio:=ctod(" / / "),cGiorno:="",nCambio:=""
local nRow:= 0,nCol:= 10
local nInterlinea := 30
local oBtnGetExchange
local cMoneta_azienda:="EUR"
local oSay:=array(2)
local aGet:=array(2)
oFont := TFont():New( "Tahoma", 0, 14,, )
oBold := TFont():New( "Tahoma", 0, 14,,.t. )
DEFINE DIALOG oDlgSub SIZE nWd, nHt PIXEL TRUEPIXEL ;
COLOR CLR_BLACK, RGB( 245,245,235) FONT oFont ;
TITLE "test"
//------------------------------------------ButtonBar
DEFINE BUTTONBAR oBarSub OF oDlgSub SIZE 80, 70 2015 BOTTOM NOBORDER
oBarSub:bRClicked = { || nil }
DEFINE BUTTON oBtnAnnulla OF oBarSub ;
FILENAME "DLG_NO";
PROMPT "Annulla" TOOLTIP "Esci" ;
ACTION ( oDlgSub:end( IDCANCEL ) )
DEFINE BUTTON oBtnAiuto OF oBarSub ;
FILENAME "HLP_DLG";
PROMPT "Aiuto" TOOLTIP "Aiuto" ;
ACTION NIL GROUP
DEFINE BUTTON oBtnConferma OF oBarSub BTNRIGHT ;
FILENAME "DLG_OK";
PROMPT "Conferma" ;
TOOLTIP "Conferma i dati" ;
ACTION ( oDlgSub:end( IDOK ) )
oBarSub:bClrGrad := { | lPressed | If( ! lPressed,;
{ { 1, RGB( 250,250,245), RGB( 250,250,245)} },;
{ { 1, RGB( 245,245,235), RGB( 245,245,235)} } ) }
//------------------------------------------ButtonBar
nRow+=8
@ nRow, 10 SAY oSay[1] PROMPT "Data " SIZE 100,25 PIXEL OF oDlgSub TRANSPARENT FONT oFont
nRow-=2
@ nRow, 70 GET aGet[1] VAR ddatacambio SIZE 100,24 PIXEL OF oDlgSub;
BITMAP "CALEND" ACTION NIL //msgdate(ddatacambio,"Seleziona una data",aGet[1])
nRow+=nInterlinea
@ nRow,10 SAY oSay[2] PROMPT "Cambio" SIZE 100,25 PIXEL OF oDlgSub TRANSPARENT FONT oFont
nRow-=2
@ nRow, 70 GET aGet[2] VAR nCambio SIZE 250,24 PIXEL OF oDlgSub RIGHT
@ nRow-0.2, 320 BTNBMP oBtnGetExchange ;
PROMPT "Aggiorna on line" OF oDlgSub;
SIZE 120, 24 PIXEL FLAT GDIPLUS ; //
BITMAP "BTN_INTERNET" LEFT NOROUND ;
ACTION (nCambio:= GetExchangeRates(cMoneta_azienda,cCode,ddatacambio),;
aGet[2]:refresh(), oBarSub:setfocus() ) WHEN !empty(ddatacambio)
oBtnGetExchange:bClrGrad := { | lPressed | If( ! lPressed,;
{ { 1, RGB( 250,250,245), RGB( 250,250,245)} },;
{ { 1, RGB( 245,245,235), RGB( 245,245,235)} } ) }
oBtnGetExchange:nClrBorder := RGB(195,195,185)
oBtnGetExchange:oCursor:= oCursorBtn
ACTIVATE DIALOG oDlgSub CENTER ;
ON INIT ( oDlgSub:resize(),;
ChangeButtons( oBarSub))
return nil
//----------------------------------------------------------------------------------------//
Function GetExchangeRates(cCurrency,cMoneta,dDate)
return "1.0807"
//----------------------------------------------------------------------------------------//
function ChangeButtons( oBar )
AEval( oBar:aControls, { | oCtrl | oCtrl:nTop += 4, oCtrl:nHeight -= 4 } )
return .T.
//----------------------------------------------------------------------------------------//
the file rc
Code: Select all | Expand
1 24 "WindowsXP.Manifest"
BTN_INTERNET 10 "table/internet_16.png"
DLG_OK 10 "table/ok.png"
DLG_NO 10 "table/cancel.png"
HLP_DLG 10 "table/help.png"
CALEND BITMAP "table/date.bmp"
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com