Antonio Linares wrote:Carlos,
Otra posible pista: Si BeginPaint() falla (según la documentación del API de Windows) entonces el hDC devuelto no es válido, por lo que al intentar usarlo más adelante no funcionaría. Una posible prueba sería este cambio:
- Code: Select all Expand view RUN
METHOD _BeginPaint() CLASS TWindow
local cPS
if ::nPaintCount == nil
::nPaintCount = 1
else
::nPaintCount++
endif
::hDC = BeginPaint( ::hWnd, @cPS )
::cPS = cPS
if ::hDC == 0
MsgBeep() // tenemos un hDC no válido !
endif
return nil
METHOD _BeginPaint() CLASS TOutLook2
local cPS
if ::nPaintCount == nil
::nPaintCount = 1
else
::nPaintCount++
endif
::hDC = BeginPaint( ::hWnd, @cPS )
::cPS = cPS
Debug ::hDC
return nil
METHOD Colors( hDC ) CLASS TOutLook2
Debug hDC
Return NIL
TOUTLOOK2:BEGINPAINT(146) - ::hDC (N): 1359024382
TOUTLOOK2:BEGINPAINT(146) - ::hDC (N): -385806109
TOUTLOOK2:BEGINPAINT(146) - ::hDC (N): 939593962
TOUTLOOK2:BEGINPAINT(146) - ::hDC (N): 1543573760
TOUTLOOK2:BEGINPAINT(146) - ::hDC (N): 1359024382
TOUTLOOK2:BEGINPAINT(146) - ::hDC (N): 1543573760
TOUTLOOK2:BEGINPAINT(146) - ::hDC (N): -1124003575
TOUTLOOK2:BEGINPAINT(146) - ::hDC (N): 1476464714
TOUTLOOK2:BEGINPAINT(146) - ::hDC (N): 1359024382
TOUTLOOK2:BEGINPAINT(146) - ::hDC (N): 922816754
TOUTLOOK2:BEGINPAINT(146) - ::hDC (N): 889262400
TOUTLOOK2:BEGINPAINT(146) - ::hDC (N): 788599041
TOUTLOOK2:BEGINPAINT(146) - ::hDC (N): -385806109
TOUTLOOK2:BEGINPAINT(146) - ::hDC (N): -167702589
TOUTLOOK2:BEGINPAINT(146) - ::hDC (N): -1124003575
TOUTLOOK2:BEGINPAINT(146) - ::hDC (N): 1543573760
TOUTLOOK2:BEGINPAINT(146) - ::hDC (N): 1040256830
TOUTLOOK2:BEGINPAINT(146) - ::hDC (N): 1359024382
TOUTLOOK2:BEGINPAINT(146) - ::hDC (N): 788599041
TOUTLOOK2:BEGINPAINT(146) - ::hDC (N): 939593962
TOUTLOOK2:BEGINPAINT(146) - ::hDC (N): 1359024382
TOUTLOOK2:BEGINPAINT(146) - ::hDC (N): 788599041
TOUTLOOK2:BEGINPAINT(146) - ::hDC (N): -2097082404
TOUTLOOK2:BEGINPAINT(146) - ::hDC (N): 788599041
TOUTLOOK2:BEGINPAINT(146) - ::hDC (N): 922816754
TOUTLOOK2:BEGINPAINT(146) - ::hDC (N): 1359024382
TOUTLOOK2:BEGINPAINT(146) - ::hDC (N): 788599041
TOUTLOOK2:BEGINPAINT(146) - ::hDC (N): 922816754
TOUTLOOK2:BEGINPAINT(146) - ::hDC (N): 922816754
TOUTLOOK2:BEGINPAINT(146) - ::hDC (N): 922816754
TOUTLOOK2:BEGINPAINT(146) - ::hDC (N): -167702589
TOUTLOOK2:BEGINPAINT(146) - ::hDC (N): 1929449739
TOUTLOOK2:BEGINPAINT(146) - ::hDC (N): -385806109
TOUTLOOK2:BEGINPAINT(146) - ::hDC (N): 1543573760
TOUTLOOK2:BEGINPAINT(146) - ::hDC (N): -2097082404
TOUTLOOK2:BEGINPAINT(146) - ::hDC (N): 1359024382
TOUTLOOK2:BEGINPAINT(146) - ::hDC (N): 184619263
TOUTLOOK2:BEGINPAINT(146) - ::hDC (N): 1744900316
TOUTLOOK2:BEGINPAINT(146) - ::hDC (N): 1744900316
TOUTLOOK2:BEGINPAINT(146) - ::hDC (N): -385806109
TOUTLOOK2:BEGINPAINT(146) - ::hDC (N): 1040256830
TOUTLOOK2:BEGINPAINT(146) - ::hDC (N): 184619263
TOUTLOOK2:BEGINPAINT(146) - ::hDC (N): 922816754
TOUTLOOK2:BEGINPAINT(146) - ::hDC (N): -1912534408
TOUTLOOK2:BEGINPAINT(146) - ::hDC (N): 1812008841
TOUTLOOK2:BEGINPAINT(146) - ::hDC (N): 889262400
TOUTLOOK2:BEGINPAINT(146) - ::hDC (N): -1912534408
TOUTLOOK2:BEGINPAINT(146) - ::hDC (N): 2063667294
TOUTLOOK2:BEGINPAINT(146) - ::hDC (N): 1040256830
TOUTLOOK2:BEGINPAINT(146) - ::hDC (N): 2063667294
TOUTLOOK2:BEGINPAINT(146) - ::hDC (N): -167702589
TOUTLOOK2:BEGINPAINT(146) - ::hDC (N): 184619263
TOUTLOOK2:BEGINPAINT(146) - ::hDC (N): 1929449739
TOUTLOOK2:BEGINPAINT(146) - ::hDC (N): 889262400
TOUTLOOK2:BEGINPAINT(146) - ::hDC (N): 788599041
TOUTLOOK2:BEGINPAINT(146) - ::hDC (N): 1744900316
TOUTLOOK2:BEGINPAINT(146) - ::hDC (N): -1124003575
TOUTLOOK2:BEGINPAINT(146) - ::hDC (N): 1812008841
TOUTLOOK2:BEGINPAINT(146) - ::hDC (N): -385806109
TOUTLOOK2:BEGINPAINT(146) - ::hDC (N): 922816754
TOUTLOOK2:HANDLEEVENT(178) - "WM_PAINT "
TOUTLOOK2:HANDLEEVENT(177) - "WM_NCPAINT "
TOUTLOOK2:HANDLEEVENT(173) - "WM_ERASEBKGND "
TOUTLOOK2:HANDLEEVENT(188) - "WM_CTLCOLORSTATIC"
TOUTLOOK2:HANDLEEVENT(188) - "WM_CTLCOLORSTATIC"
TOUTLOOK2:HANDLEEVENT(188) - "WM_CTLCOLORSTATIC"
TOUTLOOK2:HANDLEEVENT(188) - "WM_CTLCOLORSTATIC"
TOUTLOOK2:HANDLEEVENT(188) - "WM_CTLCOLORSTATIC"
TOUTLOOK2:HANDLEEVENT(178) - "WM_PAINT "
TOUTLOOK2:HANDLEEVENT(177) - "WM_NCPAINT "
TOUTLOOK2:HANDLEEVENT(173) - "WM_ERASEBKGND "
TOUTLOOK2:HANDLEEVENT(177) - "WM_NCPAINT "
TOUTLOOK2:HANDLEEVENT(173) - "WM_ERASEBKGND "
TOUTLOOK2:HANDLEEVENT(188) - "WM_CTLCOLORSTATIC"
TOUTLOOK2:HANDLEEVENT(178) - "WM_PAINT "
TOUTLOOK2:HANDLEEVENT(177) - "WM_NCPAINT "
TOUTLOOK2:HANDLEEVENT(173) - "WM_ERASEBKGND "
TOUTLOOK2:HANDLEEVENT(173) - "WM_ERASEBKGND "
TOUTLOOK2:HANDLEEVENT(188) - "WM_CTLCOLORSTATIC"
TOUTLOOK2:HANDLEEVENT(188) - "WM_CTLCOLORSTATIC"
TOUTLOOK2:HANDLEEVENT(188) - "WM_CTLCOLORSTATIC"
TOUTLOOK2:HANDLEEVENT(188) - "WM_CTLCOLORSTATIC"
TOUTLOOK2:HANDLEEVENT(188) - "WM_CTLCOLORSTATIC"
A&C wrote:colegas alguien me puede explicar esto q esta hecho en C y forma parte de FWH,, el archivo se llama dc.c esta en winapi
.....
he notado q si de la clase twindow suprimo la coneccion a esta rutina en C el problema del mal pintado se corrige,, pero no se pq.. quizas alguien u antonio q es el master me lo pueda explicar.. o quizas hay algo mal en esto codigo,, quizas entre en conflicto con algo
Antonio Linares wrote:Carlos,
gracias por tu ayuda. La verdad es que no veo nada extraño salvo que hay dos erasebkgnd seguidos
Return to FiveWin para Harbour/xHarbour
Users browsing this forum: No registered users and 57 guests