flat assembler
Message board for the users of flat assembler.
Index
> Windows > [solved]Taskbar issue |
Author |
|
bitRAKE 07 Jun 2022, 09:22
At least momentarily set WS_EX_TOOLWINDOW to force windows to re-examine the taskbar button visibility. Or look at the "usecom" example in the fasmg distribution (using ITaskBarList).
_________________ ¯\(°_o)/¯ “languages are not safe - uses can be” Bjarne Stroustrup |
|||
07 Jun 2022, 09:22 |
|
Overclick 07 Jun 2022, 20:59
Cheers mate, it works perfect. I planned to use COM for it some day, thanks. The example exist on fasm_1 not fasmg.
WS_EX_TOOLWINDOW does nothing even for temporary solution. Code: To present: cominvk ShellTaskBar,HrInit cominvk ShellTaskBar,AddTab,[hMainWnd] cominvk ShellTaskBar,ActivateTab,[hMainWnd] To remove: cominvk ShellTaskBar,HrInit cominvk ShellTaskBar,DeleteTab,[hMainWnd] |
|||
07 Jun 2022, 20:59 |
|
bitRAKE 08 Jun 2022, 05:05
Of course it works, it's like a sticky flag that is only effected by WS_EX_APPWINDOW/WS_EX_TOOLWINDOW:
Code: format PE64 GUI 6.2 at 0x1234_56780000 include 'mywin.inc' GWL_EXSTYLE := -20 TaskbarDemo: iterate msg, WM_INITDIALOG,WM_COMMAND,WM_CLOSE cmp edx,msg jz .msg end iterate xor eax,eax retn label .WM_INITDIALOG at .message_processed .WM_CLOSE: enter 32,0 EndDialog rcx,0 .message_processed_leave: leave .message_processed: push 1 pop rax retn .WM_COMMAND: iterate cmd, ID_EXIT,ID_SHOW,ID_HIDE cmp r8d,BN_CLICKED shl 16 + cmd jz .CMD_#cmd end iterate jmp .message_processed label .CMD_ID_EXIT at .WM_CLOSE .CMD_ID_SHOW: enter 32,0 SetWindowLongA rcx,GWL_EXSTYLE,WS_EX_APPWINDOW jmp .message_processed_leave .CMD_ID_HIDE: enter 32,0 SetWindowLongA rcx,GWL_EXSTYLE,WS_EX_TOOLWINDOW jmp .message_processed_leave WinMain:entry $ virtual at RBP-.FRAME rq 4 .P5 dq ? _align 16 .FRAME := $ - $$ end virtual enter .FRAME,0 GetModuleHandleA 0 xchg rcx,rax DialogBoxParamA rcx,IDD_TBDEMO,HWND_DESKTOP,ADDR TaskbarDemo,0 ExitProcess 0 int3 .end _winx.entry ; _winx.end? _end ; generate import section section '.rsrc' resource data readable ID_EXIT := IDCANCEL ID_SHOW := 100 ID_HIDE := 101 IDD_TBDEMO := 1 directory RT_DIALOG,dialogs resource dialogs,\ IDD_TBDEMO,LANG_ENGLISH+SUBLANG_DEFAULT,tbdemo dialog tbdemo,'Taskbar item control',70,70,170,24,WS_CAPTION+WS_POPUP+WS_SYSMENU+DS_MODALFRAME dialogitem 'BUTTON','Show',ID_SHOW,4,4,45,15,WS_VISIBLE+WS_TABSTOP dialogitem 'BUTTON','Hide',ID_HIDE,54,4,45,15,WS_VISIBLE+WS_TABSTOP dialogitem 'BUTTON','Exit',ID_EXIT,120,4,45,15,WS_VISIBLE+WS_TABSTOP enddialog _________________ ¯\(°_o)/¯ “languages are not safe - uses can be” Bjarne Stroustrup |
|||
08 Jun 2022, 05:05 |
|
Overclick 08 Jun 2022, 10:06
Not for my layered window.
|
|||
08 Jun 2022, 10:06 |
|
bitRAKE 08 Jun 2022, 14:53
That's why posting fragments of code is bad communication.
Adding the WS_EX_LAYERED flag, and it still works. I'm glad you solved your problem.
_________________ ¯\(°_o)/¯ “languages are not safe - uses can be” Bjarne Stroustrup |
|||||||||||
08 Jun 2022, 14:53 |
|
Overclick 08 Jun 2022, 19:13
Maybe Tray icon/menu confuse it? I don't know. I have to use COM for future things on taskbar anyway so that is ok.
|
|||
08 Jun 2022, 19:13 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.