By default if I set the tooltip on the control(s) the tooltips will be displayed when the mouse will be hovered.
However, what should I do if I want to disable the tooltips temporarily? All of them for all controls?
Is there some kind of message which will be sent in this case? Or I should simply jave some kind of variable which will be checked for displaying the tooltips?
Related
How can I change the background color of a property sheet? I can change the color of the actual pages by handling the WM_CTLCOLOR... messages but the tabs and other parts of the property sheet seem to be beyond my reach.
Might there be something in the callback?
Here's what it looks like when I handle the WM_CTLCOLOR msgs in the page dialogs.
Tab controls are notoriously difficult to work with. You will likely have to implement an owner-drawn tab control to get the level of customization that you want.
I have developed on application, which shows a dialog box with two list controls.
In this list control, I am showing images. Now I want is, when we move the mouse on images from the list control of dialog box, It will show tool tip for that.
How can I show tool tips for images in a list control in a dialog box?
The CToolTipCtrl control is the MFC wrapper class around the Win32 "tool tip". You can use this to display a small pop-up window to describe another control or provide additional information in your app.
If you're using a ListBox control, explore one of these sample projects to see how to display tooltips for individual items displayed within that ListBox control:
ListBox With ToolTip Support
List Box With ToolTips
And if you're using a ListView control (CListCtrl in MFC), then you should start by reading the documentation for the GetToolTips function and the corresponding SetToolTips function. You can also check out how this sample ListView control implements tooltips:
CListCtrl and Displaying a Tooltip
My application (C++ WinAPI) creates an icon in the system tray. I have set a tooltip text for this icon, so that when a user places a mouse cursor over the icon, this text shows.
But I want to programmatically show different balloon notications when certan events occur and at the same time keep that behavior of showing the constant notification message when a user places a mouse over the icon.
How to achieve this in C++ WinAPI?
Thanks
Alexander Smirnov
You can add the balloon using the .szInfo (message) and .szInfoTitle (title) members of the NOTIFYICONDATA structure that you send to Shell_NotifyIcon(). The mouse-over tooltip text is set in .szTip so this is independent of the balloon - as long as you keep .szTip to the tooltip you want you can do as much NIM_MODIFY calls to change the balloon while not changing anything to the tooltip.
See http://www.stromcode.com/2008/03/02/cwin32-the-system-tray-and-balloon-tips/
I am trying to create owner drawn listbox on windows mobile 6.1 I have specified LBS_OWNERDRAWFIXED style while creating listbox control. I am handling WM_MEASUREITEM and WM_DRAWITEM accordingly.
I want to change height of listbox item whenever its font changes (I change it using WM_SETFONT after creating control). The problem is that WM_MEASUREITEM message gets sent only once. I need a way to generate WM_MEASUREITEM message again so that I can set height of item to height of font. I have seen the article http://www.codeguru.com/Cpp/controls/listview/advanced/article.php/c1013/, but it uses MFC, while I am developing this control directly using WINAPI. Some articles mention that resizing the control generates WM_MEASUREITEM message again. However, it is not getting generated in my case.
Please let me know is there any way to achieve this in windows mobile.
There is nothing particularly MFC in that code. OnSetFont is, simply, handling WM_SETFONT. MeasureItem is handling, in the MyListCtrl, the WM_MEASUREITEM sent to its parent.
As for generating a new WM_MEASUREITEM when you resize the window can't you just do a SendMessage when handling the WM_SIZE/WM_SIZING?
I have an ATL application with a dialog containing a TAB control. The App uses a common controls manifest.
Under XP with visual styles, the tab control background is a different color than the dialog and the controls (mostly checkboxes), so it looks quite ugly.
Screenshot
How can I fix that?
There is - apparently - one thing to do to get tab control pages colored correctly using XP visual styles.
In the WM_INITDIALOG handler for each page, call the uxtheme API EnableThemeDialogTexture
With the ETDT_ENABLETAB flag this automatically changes the background color of the dialog and all its child controls to paint appropriately on a tab.
The dialog pages do not need any kind of transparent flag, or indeed any style bit set differently from previously. If you have overridden WM_ERASEBKGND or WM_CTLCOLORDLG in your pages DialogProc you will need to revert to default handling (return FALSE).
Here you could find answer to your question.
The check boxes will post WM_CTLCOLORBTN notifications to their parent. If, for the checkbox control IDs, the parent window's message handler returns the result of
GetStockObject(HOLLOW_BRUSH)
then the check boxes should be drawn with a transparent background, which should give you the look you want.