News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests

Main Menu

Radasm 3 Static build transparent

Started by ragdog, January 03, 2017, 04:09:30 AM

Previous topic - Next topic

ragdog

Hello all

I have ask Ketilo a while ago to make the Static build combobox background Transparent.
But i think he has no many time.

Here is my Mod all works fine but i resize the rebar if a draw bug




I have think i need a notify messages to redraw the staticbuild but is not works.

Radasm.asm line 1772

.elseif eax==WM_NOTIFY
mov esi,lParam
mov eax,[esi].NMHDR.hwndFrom
.if [esi].NMHDR.code==RBN_HEIGHTCHANGE && eax==ha.hReBar
;Rebar
invoke SendMessage,hWin,WM_SIZE,0,0
.elseif [esi].NMHDR.code==RBN_CHILDSIZE && eax==ha.hReBar
invoke InvalidateRect,ha.hStcBuild,0,TRUE
ret



Tools.asm  line 443 - 460

StaticProc proc hWin:HWND,uMsg:UINT,wParam:WPARAM,lParam:LPARAM
LOCAL ps:PAINTSTRUCT
mov eax,uMsg
.if eax==WM_COMMAND
mov edx,wParam
movzx eax,dx
shr edx,16
.if edx==CBN_SELCHANGE && eax==19999
invoke SendMessage,ha.hWnd,uMsg,wParam,lParam
xor eax,eax
jmp Ex
.endif
.elseif eax==WM_PAINT
invoke BeginPaint,hWin,addr ps
mov ebx,eax
invoke GetStockObject,NULL_BRUSH
invoke FillRect,ebx,addr ps.rcPaint,eax
invoke EndPaint,hWin,addr ps
xor eax,eax
jmp Ex
.endif
invoke CallWindowProc,lpOldStaticProc,hWin,uMsg,wParam,lParam
  Ex:
ret
StaticProc endp


Any an idea?

Regards,
Steffen

HSE

Hi ragdog!

I don't have that problem...  because with WS_EX_TRANSPARENT the static not become transparent!!!

LATER
Try this:
StaticProc proc hWin:HWND,uMsg:UINT,wParam:WPARAM,lParam:LPARAM

mov eax,uMsg
.if eax==WM_COMMAND
mov edx,wParam
movzx eax,dx
shr edx,16
.if edx==CBN_SELCHANGE && eax==19999
        invoke SendMessage,ha.hWnd,uMsg,wParam,lParam
xor eax,eax
jmp Ex
.endif
.elseif eax== WM_PAINT || eax == WM_SIZE
invoke SendMessage,ha.hCboBuild,uMsg,wParam,lParam

xor eax, eax
jmp Ex
.endif
invoke CallWindowProc,lpOldStaticProc,hWin,uMsg,wParam,lParam
  Ex:
ret

StaticProc endp
Equations in Assembly: SmplMath

ragdog

#2
QuoteI don't have that problem...  because with WS_EX_TRANSPARENT the static not become transparent!!!

With your code resize the rebar an you see the same effect like my first screenshot



Is only on Windows 7


Now works it with resize and transparent static build

here is my Mod




Radasm.asm line 1772


.elseif eax==WM_NOTIFY
mov esi,lParam
mov eax,[esi].NMHDR.hwndFrom
.if [esi].NMHDR.code==RBN_HEIGHTCHANGE && eax==ha.hReBar
;Rebar
invoke SendMessage,hWin,WM_SIZE,0,0
;----------------------
.elseif [esi].NMHDR.code==RBN_LAYOUTCHANGED && eax==ha.hReBar
      invoke RedrawWindow,ha.hWnd,NULL,NULL,RDW_ERASE or RDW_INVALIDATE or RDW_FRAME or RDW_ALLCHILDREN
;----------------------


Tool.asm line 576

invoke CreateWindowEx,WS_EX_TRANSPARENT,addr szStaticClassName,NULL,WS_CHILD or SS_OWNERDRAW or WS_VISIBLE or WS_CLIPCHILDREN or WS_CLIPSIBLINGS,0,0,0,0,ha.hWnd,NU



Tool.asm line 438

.endw
;-----------------
invoke RedrawWindow,ha.hWnd,NULL,NULL,RDW_ERASE or RDW_INVALIDATE or RDW_FRAME or RDW_ALLCHILDREN
;----------------
ret

LockToolbars endp