Windows message text display method

Source: Internet
Author: User

More than once I heard a friend ask how to display windows messages in text format.

 

During debugging, messages in windows are displayed in numbers and cannot be intuitively displayed, as shown in figure

 

Wm_create message. If 1 is displayed during debugging, it is inconvenient for beginners.

 

Windows-like error messages can be viewed using errlook.

 

 

The formatmessage function can be used for text output for conversion of error messages. However, is there any API for conversion in windows such as wm_create messages,

I did not search for it, but it is not very difficult to write it by myself. So I listed the text of all messages in a table and converted it myself. A tool that converts a message value to a text value is as follows:

 

You can download the function from the following address, and the download package contains a text display function call.

Http://download.csdn.net/source/2134811

 

The function call method is as follows:

Put the three showwinmsg. dll showwinmsg. h showwinmsg. Lib files in the program directory.

Add the following two lines to stdafx. h:

 

# Include "showwinmsg. H"

 

# Pragma comment (Lib, "showwinmsg. lib ")

 

 

 

Call the getmessagestr function where the message text is displayed.

 

For example:

MessageBox (getmessagestr (nmessage ));

 

Attachment download

Http://download.csdn.net/source/2134811

 

 

Related Article

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.