 |
|
 |
Hi:
I installed OnTop & it seemd to work only if I do not move the window I want to remain on top. As soon as I move the window it loses its ability to remain on top. In fact, sometimes the OnTop taskbar icon closes on its own after moving the window & I must restart it.
Also, sometimes I see a checkmark next to my selected window when I click on your taskbar & sometimes I don't see a checkmark.
I'm running XP sp1.
Any suggestions or doc?
Thanks for a very useful utility.
Dan
|
|
|
|
 |
|
 |
Paul,
I'm using your OnTop application to make schedule reminders from Outlook calendar stay on top. It works great! Unbelievably, there isn’t an option within Outlook to make them stay on top. If you’re busy typing away they disappear underneath other work. Even though the reminders pop up with slightly different window names (1 Reminder, 2 Reminders, etc.) OnTop always moves them to the top. I think that is because the window handle is the same. However, if I close and reopen Outlook, then OnTop must be told again to put the reminders on top. There is a VBA macro capability in Outlook that I have had success in getting to run whenever a reminder is sent. Is there a way to send a message to OnTop to put the reminder on top? Alternatively, is there a way that I could tell OnTop to look for Reminder windows when I auto-start it on boot-up?
Thanks,
Steve Zeile
Steve Zeile
|
|
|
|
 |
|
 |
I first looked at this, and for some strange reason that it was some kind of article about sex tips for programmers. Thankfully it was not
¡El diablo está en mis pantalones! ¡Mire, mire!
Real Mentats use only 100% pure, unfooled around with Sapho Juice(tm)!
SELECT * FROM User WHERE Clue > 0
0 rows returned
|
|
|
|
 |
|
 |
Although your project did not compile and link, I managed to get enough knowledge from your code to beable to build Taskbar menu functionality into my own project, so thankyou very much !!!
One question!
You mention the use of Lemmy editor (VI unix standard). Do you use it in the integrated development environment Visual Studio ????
I have been searching, with no luck, for a VI editor which could be used in Visual studio.
I like the functionality of VI and would like to have the same in Visual Studio, perhaps you know of a way to achive this ???
Sincerely,
Johnny Serup
|
|
|
|
 |
|
 |
I would like to know what errors you get when you compile and link, as no-one else has ever reported a problem with it.
As for VI, I don't use it in Visual Studio, only as Lemmy stand-alone. Having said that, it not often I use it at all now. I do like using the tags support though which is why I wrote my Tags Visual Studio Add-In[^]
"The way of a fool seems right to him, but a wise man listens to advice" - Proverbs 12:15 (NIV)
|
|
|
|
 |
|
 |
I have some task writing a program one of whose task is that a web component can communicate with server via DOM. To make the communication process, a small software function called plugin is to be installed. But by now, I don't know how to develop the plugin.
Anyone have an idea about developing IE-Plugins that will be accessible by web Component(HTML Components, Java Applet...) via Document Object Model and can communicate with web server?
thanks in advance.
NNH
|
|
|
|
 |
|
 |
I am trying to add some menu options to the popup window that appears when I right click on my application's taskbar button. For example, I want to have the option of seeing a particular window of my app. by selecting it out of the right click taskbar button menu instead of going into the program and selecting it there. Can you give me some direction about this? I am using Visual C++ 6.0.
|
|
|
|
 |
|
 |
There are two ways to get, and change, the system menu for an app:
1. Use CWnd::GetSystemMenu(FALSE), and modify the returned menu;
2. Add an OnInitPopupMenu handler, and, if the bSysMenu param is TRUE, the CMenu* passed in will be the control menu, so you can modify it.
The second method is fine for greying items, but not good for adding or removing items as the changes persist until the control menu is reset back to the standard menu.
If you want to only show a modified menu some of the time, then use GetSystemMenu(FALSE), which will give you a copy of the current control menu, which you can then modify. When you want to revert back to the standard control menu call GetSystemMenu(TRUE).
If you want the new items on the menu all the time, (ie not just when minimised, and on the 'normal' sys menu, and caption right-click) then use GetSystemMenu(FALSE) to get the menu after creating your main window, and modify it, but don't forget that if anything calls GetSystemMenu(TRUE) you will lose your modifications.
If you want to only display a modified menu when you are minimised, then you could override OnSize, and if nType is SIZE_MINIMIZED you can use GetSystemMenu(FALSE) and modify the returned menu, else call GetSystemMenu(TRUE) to cause it to revert to the standard menu.
(Using these calls in OnInitMenuPopup or OnInitMenu gives strange results, as the control menu has already been 'grabbed' ready for display.)
You can use IsIconic() to determine if your app is minimised, but if you want to know whether the user has right-clicked on the taskbar icon you will have to do something like:
CPoint pt;
CRect rc;
GetCursorPos(&pt);
GetWindowRect(&rc);
if (! rc.PtInRect(pt))
TRACE("User clicked on taskbar icon\n");
else
TRACE("User clicked on caption or sys menu\n");I hope this gives you enough ideas to continue!
---
"The way of a fool seems right to him, but a wise man listens to advice" - Proverbs 12:15 (NIV)
|
|
|
|
 |
|
 |
Thank You for your help! I now can display the string "Inputs" in the system taskbar popup menu but when I click on it, nothing happens. Here is my code I added in my main window's OnInitDialog() function:
CMenu* menu = GetSystemMenu(FALSE);
menu->AppendMenu(MF_STRING, ID_INPUTS_TOOL , "Inputs");
This is in my main window's message map section:
ON_COMMAND(ID_INPUTS_TOOL, OnSelectInputsButton)
The OnSelectInputsButton() is a member function of the main window and it basically makes a modeless dialog box called "Inputs" visible. ID_INPUTS_TOOL is the commmand ID for a button in the main window's toolbar. The button works fine but this menu item isn't doing anything. Am I missing something obvious? A little more help please...
Grateful Novice,
|
|
|
|
 |
|
 |
I see that your app is a dialog-based app, so if you had created it from the wizard and said you wanted an Aboutbox, you would have code in your OnInitDialog which adds the About box command to the system menu. That code looks like:
ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX);
ASSERT(IDM_ABOUTBOX < 0xF000);
CMenu* pSysMenu = GetSystemMenu(FALSE);
if (pSysMenu != NULL)
{
CString strAboutMenu;
strAboutMenu.LoadString(IDS_ABOUTBOX);
if (!strAboutMenu.IsEmpty())
{
pSysMenu->AppendMenu(MF_SEPARATOR);
pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu);
}
}The menu item is added in exactly the same way as you have added your command. Looking at the way their message is handled should give you some clues. As it is on the system menu it doesn't use WM_COMMAND, but WM_SYSCOMMAND. This is what MSDN says about it for CWnd::OnSysCommand:
"In WM_SYSCOMMAND messages, the four low-order bits of the nID parameter are used internally by Windows. When an application tests the value of nID, it must combine the value 0xFFF0 with the nID value by using the bitwise-AND operator to obtain the correct result.
The menu items in a Control menu can be modified with the GetSystemMenu, AppendMenu, InsertMenu, and ModifyMenu member functions. Applications that modify the Control menu must process WM_SYSCOMMAND messages, and any WM_SYSCOMMAND messages not handled by the application must be passed on to OnSysCommand. Any command values added by an application must be processed by the application and cannot be passed to OnSysCommand."
So the AppWizard adds an OnSysCommand override(as there is no "ON_SYSCOMMAND" macro), and adds code which looks like:
if ((nID & 0xFFF0) == IDM_ABOUTBOX)
{
CAboutDlg dlgAbout;
dlgAbout.DoModal();
}
else
{
CDialog::OnSysCommand(nID, lParam);
}So all you need to do is add the override if you don't already have it and use:
if ((nID & 0xFFF0) == ID_INPUT_TOOL)
OnSelectInputsButton();
else ... (Note that as you have an ON_COMMAND handler for your message anyway you can just call that here.)
---
"The way of a fool seems right to him, but a wise man listens to advice" - Proverbs 12:15 (NIV)
|
|
|
|
 |
|
 |
Thank you so much for your help! It works like a charm now!
Most Gratefully
|
|
|
|
 |
|
 |
Have you tested it on XP? I've just tried it and none of the windows are staying on top...
Regards,
Jason
|
|
|
|
 |
|
 |
Yes. A colleague runs it on XP and says it works fine. Is there anything special about your setup and/or the apps you're trying to float?
---
"The way of a fool seems right to him, but a wise man listens to advice" - Proverbs 12:15 (NIV)
|
|
|
|
 |