flat assembler
Message board for the users of flat assembler.
Index
> Windows > WM_STLCOLORxxx |
Author |
|
zhak 24 Apr 2005, 11:20
I've got it.
After passing a brush handle to eax I did jump to .retp: label, where .retp: mov eax, 1 return so eax register with the brush handle was simply overwritten. It's just a lack of attention |
|||
24 Apr 2005, 11:20 |
|
Vasilev Vjacheslav 25 Apr 2005, 10:41
my method:
1. create brush: Code: invoke GetSysColor,COLOR_BTNFACE invoke CreateSolidBrush,eax or eax,eax jz @F mov [hBackBrushLogo],eax @@: 2. in window proc catch WM_CTLCOLORxxx message: Code:
cmp ax,WM_CTLCOLORSTATIC
jz .colordlg
3. at .colordlg i check some values and then paint: Code: invoke GetDlgItem,[hWnd],ID_STLOGO or eax,eax jz .not_processed cmp [lParam],eax jnz .not_processed cmp [hBackBrushLogo],NULL jz .not_processed invoke SetBkMode,[wParam],TRANSPARENT invoke GetSysColor,COLOR_BTNSHADOW invoke SetTextColor,[wParam],eax mov eax,[hBackBrushLogo] jmp .finish |
|||
25 Apr 2005, 10:41 |
|
Vasilev Vjacheslav 25 Apr 2005, 10:42
4. don't forget to free brush object when WM_CLOSE is sent:
Code: cmp [hBackBrushLogo],NULL jz @F invoke DeleteObject,[hBackBrushLogo] @@: |
|||
25 Apr 2005, 10:42 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.