I have got a problem with my window and DIBSection BitBlt cooperation problem.


When the size of them is more than about 300X300 pixels the progr is crushing.

Also sometimes the animetion on it is stopping so i have to resize it to start it working properly agein. And sometimes when I start the prog the Window conteins nothing but the shit that is under it.


BDW All that stuff is related to one prog :(
Posted on 2002-12-08 14:17:08 by drakoforma
Code?
Posted on 2002-12-08 14:28:51 by comrade
THE .CODE :eek:

parts of the code (as some of variables) are not necessary they are simply remainings from different programs.
Posted on 2002-12-10 13:10:27 by drakoforma
First, just so that you know I dont know anything about this sort of
coding. So I can tell you about the 300x300 pixels thing. However,
I have found the bug concerning the stopping of the animation.


.ELSEIF uMsg==WM_PAINT
invoke BeginPaint,hWnd,ADDR ps
mov eax,hdc <- Should be: mov hdc,eax
Posted on 2002-12-10 13:18:22 by natas
HOLLY shit this kind of bug should never heapend.

Damn i was so sure that that part of code is correct (at last the picture was appearing) that i not even thought about searching for a bug there.
But thx anyway

bdw notas what sort of coding are u interested in ?






AverageImage proc BitArray:DWORD,WidthA:DWORD,HeightA:DWORD
LOCAL XL:DWORD
LOCAL YL:DWORD

mov ecx,WidthA
@loopmageX:
push ecx
mov XL,ecx
mov ecx,HeightA
@loopmageY:
mov YL,ecx

invoke AveragePixel,BitArray,XL,YL
invoke ChangePixel,BitArray,XL,0,YL,1,eax
; Prog is crushing when i write 2 instead of 1. If 1 is correct than why 2 is error prone ?

dec ecx
jnz @loopmageY
pop ecx
dec ecx
jnz @loopmageX

ret
AverageImage endp
Posted on 2002-12-10 13:27:27 by drakoforma
bdw notas what sort of coding are u interested in ?

Well basically im interesting in anything except for making virii. ( :grin: )
I see no limitation to anything, except that I will only learn things wich
I have interest in learning. Graphics being one of those things wich have
no appeal to me.

Without going much into this graphical code, these to sizes will crash/not crash
WWidth EQU 100
WHeight EQU 100
if the both / one of the 'X' arguments are changed here.
invoke ChangePixel,BitArray,XL, X ,YL, X ,eax

So all in all I think there must be some calculation problems somewhere
inside the code wich causes somekind of overflow maybe. And it seems
like the main problem lies within the TakePixel routine, end line:
mov eax, <- Atleast this is whats causing the crash. When the
above values are set with a erronus value.
Posted on 2002-12-10 13:54:06 by natas
still do not know why 1 is ok and 2 makes error
Posted on 2002-12-11 06:35:46 by drakoforma
K i solved the problem with 1 2 3 4 and so on but i still do not know why i cant make bigger window ? than about 300X300 (try 400X400):mad:
Posted on 2002-12-11 15:02:15 by drakoforma
Afternoon, drakoforma.

...XA:DWORD,XM:SDWORD,YA:DWORD,YM:SDWORD,COLORA:DWORD

Shouldn't Xm and YM be a DWORD, not a signed dword?

AFAIK, where you've got XM as 0 in the previous posts, that would make it FFFFFFFFh?

So having :
mov eax,XA
add eax,XM
means that eax just has the same value as in XA.

Cheers,
Scronty
Posted on 2002-12-11 15:43:21 by Scronty
Maby ur right but i will change this two into SDWORD than DWORD but i dont think that this cause a problem with window size. ( but i will check it)
Posted on 2002-12-11 16:21:14 by drakoforma
:mad: :mad: :mad: :mad: :mad: :mad: :mad: :mad: :mad: :mad: :mad: :mad: :mad:
Still do not know why i cant have bigger window size.



bdw how big is window title bar ?:confused:
Posted on 2002-12-12 06:23:58 by drakoforma