The MASM Forum

Projects => Rarely Used Projects => RadAsm IDE Support => Topic started by: ragdog on January 03, 2017, 04:09:30 AM

Title: Radasm 3 Static build transparent
Post by: ragdog on January 03, 2017, 04:09:30 AM
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

(http://fs5.directupload.net/images/170102/dz8djuvm.png)


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
Title: Re: Radasm 3 Static build transparent
Post by: HSE on January 03, 2017, 05:52:33 AM
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
Title: Re: Radasm 3 Static build transparent
Post by: ragdog on January 03, 2017, 06:51:56 AM
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
(http://fs5.directupload.net/images/170102/ycr37pzt.png)


Is only on Windows 7


Now works it with resize and transparent static build

here is my Mod

(http://fs5.directupload.net/images/170102/xadfnky9.png)


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