[Reserved] How to display tool tips in view area display in VC programming

xiaoxiao2021-03-06  45

2001-11-30 · Liu Tao ·· Yesky Tool Tool Tip Control is a small window where the single line of text is displayed to describe the use of tools in the application. The tool refers to the tool here can be either a window (such as a button on the toolbar), or a fixed area. Everyone knows that the toolbar is prompted in the application that uses AppWizard generated. When you put the mouse on a button a button, you will show your button's feature, which is convenient for software. By. However, how to achieve prompts in the view area, this is less information, I encountered this problem when I developed an image handler, and I wanted to display the image on the image when the mouse was placed on the image. The gradation value, later checked some information, finally solved it, now introduce this method to everyone, I hope to help from friends. First, declare the variable of a ctooltipCtrl class, call the CREATE function creation tool universal prompt, and attach it on the CTooltipCtrl object, then call the ctooltipCtrl class AddTool Function Registration Tool Tips to control the cursor to be placed in a specified window or area. Tool tips are prepared. The original shape of this function is: BOOL AddTool (CWND * PWND, LPCTSTOOL, UINT NIDTOOL); where PWND is pointed to the window pointer to the tool prompt control, LPSZTEXT is the text displayed in the tool prompt, lprectTool is Tools. Tip The corresponding window or specified area, Nidtool is the flag number of the tooltime. Active function activation tips in calling the CTooltipCtrl class. The last job is to be the heavy load tool to prompt the parent window's WindowPorc function, call the CTooltipCtrl class's RelayEvent function to pass the mouse message to the tool prompt control object. Take the coordinate of the corresponding point in the view area as an example, give the implementation code:

转载请注明原文地址:https://www.9cbs.com/read-67309.html

New Post(0)