I want to display text in the XP taskbar after the executable name, for example, "lll c:\RDF", "lllSTABLE g:\...\fin", etc.
Can anyone help me get started researching how to do this? I have not had much luck on msdn or in the SDK.
Thanks.
Don't see really what you want to do.The taskar show the window title of the program being excuted.To modify this text,modify the title of the executable.
just set the window caption text (SetWindowText) - that is what gets displayed in the taskbar
in the program ,no problem invoke sendmessage,hwnd,WM_SETTEXT,,
By an outside prog you need to hook the program to know it's class.
and then EnumWindows GetClassName
Perhaps is there better way.
Quote from: ToutEnMasm on October 07, 2012, 05:36:52 AM
By an outside prog you need to hook the program to know it's class.
and then EnumWindows GetClassName
Perhaps is there better way.
Is there better way:
include \masm32\MasmBasic\MasmBasic.inc ; download (http://masm32.com/board/index.php?topic=94.0)
Init
.If WinByTitle("Post reply -")
SetWin$ eax="Salut Yves"
.endif
Exit
end start
No hook needed.
Quote from: jj2007 on October 07, 2012, 05:52:35 AMIs there better way:
as dave said, the best way is: SetWindowText() (http://msdn.microsoft.com/en-us/library/windows/desktop/ms633546(v=vs.85).aspx) :bgrin:
Quote from: dedndave on October 07, 2012, 04:32:18 AM
just set the window caption text (SetWindowText) - that is what gets displayed in the taskbar
That works!
Thank you.
(I am happy to have the text in the title bar also.)
Quote from: qWord on October 07, 2012, 06:14:39 AM
Quote from: jj2007 on October 07, 2012, 05:52:35 AMIs there better way:
as dave said, the best way is: SetWindowText() (http://msdn.microsoft.com/en-us/library/windows/desktop/ms633546(v=vs.85).aspx) :bgrin:
That works, sure, but in any case you
never need a hook to perform that simple task ;-)
include \masm32\MasmBasic\MasmBasic.inc ; download (http://masm32.com/board/index.php?topic=94.0)
Init
.If WinByTitle("Untitled") ; needs a new file in qEditor
.if rv(GetDlgItem, eax, 1F4H)
xchg eax, ecx
SetWin$ ecx=FileRead$("\masm32\include\Windows.inc") ; Try that with SetWindowText ;-)
.endif
.endif
Exit
end start
Quote from: jj2007 on October 07, 2012, 07:07:38 AMSetWin$ ecx=FileRead$("\masm32\include\Windows.inc") ; Try that with SetWindowText ;-)
Your wish is my command:
include \masm32\include\masm32rt.inc
.data?
hInstance HINSTANCE ?
.code
DlgProc proc uses edi ebx edi hDlg:HWND,uMsg:UINT,wParam:WPARAM,lParam:LPARAM
.if uMsg == WM_CLOSE
invoke EndDialog,hDlg,0
.elseif uMsg == WM_INITDIALOG
mov edi,rv(GetDlgItem,hDlg,100)
invoke GlobalFree,ASM(mov rv(SetWindowText,edi,ASM(mov ebx,InputFile("\masm32\include\Windows.inc"))),ebx) ; ;-D
.else
xor eax,eax
ret
.endif
mov eax,1
ret
DlgProc endp
main proc
mov hInstance,rv(GetModuleHandle,0)
Dialog "SetWindowText","Arial",10,WS_SYSMENU OR DS_CENTER,1,0,0,220,220,1024
DlgEdit WS_BORDER or ES_MULTILINE,0,0,200,200,100
CallModalDialog hInstance,0,DlgProc,0
invoke ExitProcess,0
main endp
end main
8)
Not bad, young friend, really not bad :t
Note, however, that my proggie (in response to ToutEnMasm's claim that you need all sorts of complicated stuff - hooks, class info etc) sets the text in the child window of another process - and that would indeed fail miserably with SetWindowText, as you certainly know ;-)
:icon14:
P.S.: I attach the MasmBasic equivalent to your dialog example. Here is the source code:
include \masm32\MasmBasic\MasmBasic.inc ; download (http://masm32.com/board/index.php?topic=94.0)
Init
DlgDefine "Resources", 0, 0, 500, 200
DlgControl dcEdit, Cat$(FileRead$("DlgTest.rc")), ES_MULTILINE, 1, 1, 100.0, 100.0 ; DlgTest.rc must be a Unicode text file
DlgShow
Exit
end start
Quote
in response to ToutEnMasm's claim that you need all sorts of complicated stuff - hooks, class info etc
Don't write only lies.I was just asking what was the exact need.
just read the title of a window to get his handle is not the only way to do and couldn't be apply to all case.
There is a number of functions in the sdk who are abble to solve any case.
Quote from: ToutEnMasm on October 07, 2012, 06:27:33 PM
Don't write only lies.I was just asking what was the exact need.
See your reply #3.
This is of better use than your library:
http://vbsedit.en.softonic.com/ (http://vbsedit.en.softonic.com/)
Looks nice, Yves. Is that what you are using nowadays? Unfortunately it doesn't assemble with JWasm :(
Quote
Unfortunately it doesn't assemble with JWasm
Try masmbasic,he surely assemble it :lol:
Hi TotEnMasm,
Quote from: ToutEnMasm on October 08, 2012, 03:42:39 AM
Try masmbasic,he surely assemble it :lol:
are you sure? I've strong doubts.
Gunther