08-18-2008, 11:05 PM
can this be done with qm ?
here is a c++ article about it:
Insert buttons into a window's caption area
thanks
here is a c++ article about it:
Insert buttons into a window's caption area
thanks
Insert buttons into a window's caption area
|
08-18-2008, 11:05 PM
can this be done with qm ?
here is a c++ article about it: Insert buttons into a window's caption area thanks
08-19-2008, 08:31 AM
Yes, but only for windows in current (qm) process. Also I think on XP and vista you have to do it differently. I cannot give an example because it would take very much time.
08-19-2008, 07:28 PM
what about a hook dll like qmshex.dll ?
in the first step only for vista. register dll and feed it by a trigger list.
08-19-2008, 07:45 PM
On vista, drawing in window caption is especially difficult or even impossible, unless you don't need the glass effect etc. The real solution would be to attach floating windows with buttons, like qm toolbars. And dll is not necessary. Detect window creation and movement using winevents.
08-19-2008, 08:02 PM
something similar
i would not use dialogs warning: to make it to work well, especially on vista, you'll spend several months better use qm toolbars
08-19-2008, 08:25 PM
Register a window class using RegisterClassEx. Create captionless windows using CreateWindowEx, owned by the target windows. To detect target window creation and movement, install winevents hook using SetWinEventHook: I want to use mouse event..
08-19-2008, 09:44 PM
RegisterClassEx
Quote:If the class did not exist, returns class atom what do you mean by atom ?
08-19-2008, 09:54 PM
an integer number that can be used with CreateWindowEx instead of class name. read more in msdn library.
08-19-2008, 09:57 PM
most of that you wrote i already have done many times.
so the storyline should be like this: install winevents hook watch for main windows and dialogs create/attach captionless window using CreateWindowEx, owned by the target window etc
08-19-2008, 09:59 PM
exactly
08-20-2008, 06:51 AM
can be in exe or not
can be in any programming language
02-04-2009, 06:11 PM
Gintaras Wrote:something similar I have been using this with a dialog because I do not understand how to use CreateWindowEx. This makes my program choppy when I move my main dialog. My guess is the CreateWindowEx would create a popup but this never seams to work. Can you please give me an example using CreateWindowEx for a button instead of a dialog?
02-04-2009, 07:58 PM
Macro
;register class Function WndProc_xclass ;/
02-04-2009, 09:42 PM
Every time I take away the wait statement and show a dialog the window in the top left corner disappears. I even tried using notepad as the dialog and I just can not keep the window in the top left corner from disappearing. This might be because I always use the handle to the window and just discovered xclass and do not understand it. Can you show me an example that will show the window in the top left corner of the screen as long as notepad is opened?
02-05-2009, 10:12 AM
the window disappears when the macro ends
06-26-2009, 09:08 PM
should be triggered with a general window created trigger function.
first check what kind of window has been created. i find main windows and dialogs are interesting. getwindowlist windowsmetrics info about theme settings to make the buttons look perfect. like get transparency level of caption area.
01-27-2010, 10:19 PM
shame on me.
i have not continued this idea. we still need a qm way to display extra window function icons on titlebars. i need buttons for collapse, onTop, deskthumb, toMonitor. perfect solution would be to overlay all titlebar buttons. hock: Gintaras Wrote:Macro
09-10-2015, 12:35 AM
Hi Gintaras,
Should have studied this part of forum a long time ago. I "hang" dialogs a lot from various other application windows - they act like extra toolbars containing all sorts of controls - buttons, LBs, CBs, ActiveX WebBrowser controls, etc. I use dialogs because toolbars can't be used in exe's. Above you wrote: Quote:Gintaras wrote: And you gave WndProc_xclass example where it says: Quote:This is window procedure of windows of "xclass" class. It is similar to dialog procedure. Read about window procedures in MSDN library. My question is why is this better than creating dlg? In QM environment you have dialog editor so can use that to layout "application" as dialog window. In your example, it seems like would have to be manual coding effort to do this. Am I missing something fundamental? If so, could you give simple example with a few button elements. Thanks for any insight. S
09-10-2015, 02:07 AM
To expand on my questions from prior post, let me give a couple examples for comments:
hook method: Macro Startup run "$system$\notepad.exe" "" "" "" 0x800 win("Notepad" "Notepad") Function NotePadDlg \Dialog_Editor Function exe_window_trigger function hHook event hwnd idObject idChild dwEventThread dwmsEventTime Timer (rep) loop method: Function NotePadDlg2 \Dialog_Editor The SetWinEventHook seems much quicker - no wobble compared to Timer Loop even with short period. I imagine it is less of drain on CPU usage. I kind of cobbled the hook method from other posts. Is there a better way of doing this? Stuart
09-10-2015, 05:06 AM
Quote:My question is why is this better than creating dlg? In QM environment you have dialog editor so can use that to layout "application" as dialog window. In your example, it seems like would have to be manual coding effort to do this.CreateWindowEx is more lightweight (dialogs also use it, but wrap it in several layers of code), therefore would be better for simple floating windows like QM toolbars. But if you use many various controls, then better dialogs, because much easier. Quote:Is there a better way of doing this?I don't know better ways. Just need to optimize exe_window_trigger, now it looks slow. Does not check parameters, calls win.
09-10-2015, 05:41 PM
Thanks. That confirms my relief that my QM dialog building skills were still useful!
However, would it be possible to provide very simple example (e.g 1-2 buttons) using CreateWindowEx. Also: re hook method, you said: Quote:need to optimize exe_window_trigger, now it looks slow. Does not check parameters, calls win. Not sure I understand about calling win and which parameters to chec. Would it also be possible to provide basic example based on what I did or something else easier for you to demonstrate....nothing fancy necessary Thanks so much for all your help, S
09-13-2015, 08:37 PM
Basic example.
Macro attach dialog to window type TB5016752 hdlg howner
09-14-2015, 05:56 AM
Looks Fantastic!!!! Can't wait to get to my computer to give it a whirl.
Thank you so very much! S |
« Next Oldest | Next Newest »
|