Author Topic: Radasm 3 Static build transparent  (Read 84 times)

ragdog

  • Member
  • ***
  • Posts: 476
Radasm 3 Static build transparent
« 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




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

Radasm.asm line 1772

Code: [Select]
.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
Code: [Select]
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

  • Member
  • ***
  • Posts: 347
  • <AMD>< 7-32>
Re: Radasm 3 Static build transparent
« Reply #1 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:
Code: [Select]
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

ragdog

  • Member
  • ***
  • Posts: 476
Re: Radasm 3 Static build transparent
« Reply #2 on: January 03, 2017, 06:51:56 AM »
Quote
I 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

Code: [Select]

.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
Code: [Select]
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
Code: [Select]
.endw
;-----------------
invoke RedrawWindow,ha.hWnd,NULL,NULL,RDW_ERASE or RDW_INVALIDATE or RDW_FRAME or RDW_ALLCHILDREN
;----------------
ret

LockToolbars endp
« Last Edit: January 03, 2017, 07:56:08 AM by ragdog »