Bubble prompt.

Source: Internet
Author: User
Tags microsoft website

The bubble prompt is different from the balloon prompt. If you want to implement the balloon prompt (the prompt is often displayed in the system bar), you need to download a new SDK on the Microsoft website to support it.

Let's take a look at the bubble prompts.

1,Write a class inheritanceCtooltipctrl.

2,Add the following methods to the class:

Bool addtool (uint NID, lpctstr text)

{

Toolinfo Ti;

Memset (& Ti, 0, sizeof (toolinfo ));

Ti. cbsize = sizeof (toolinfo );

Ti. hwnd = This-> getowner ()-> getsafehwnd ();

Ti. uflags = ttf_idishwnd | ttf_subclass;

Ti. uid = (uint) getparent ()-> getdlgitem (NID)-> m_hwnd;

Ti. lpsztext = (lpstr) text;

Return (bool) sendmessage (ttm_addtool, 0, (lparam) & Ti );

}

ParametersNidControls to add bubblesID,TextThat is, text content.

3,Declare a new class variable in the header file.Textarea

4,Then in the dialog boxOninitdialog() To add the followingCode

Textarea. creat (this );

//The following is the prompt for adding bubbles to the control.

Textarea. addtool (controlid, "this is an textarea example ");

The result is as follows:

 

From: http://blog.csdn.net/sllins/article/details/5557434

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.