The prompt "Debug assertion failed solution" is displayed when the view is changed to scrollview.

Source: Internet
Author: User

I wrote an image histogram in vs2010 and started to use the View class. In order to enable the large image, I changed the view to scrollview, but the debug assertion failed is always displayed when I open the image, after searching for the Internet, most of them think that a wild pointer exists.ProgramI read it all over again from start to end and found that all pointer variables were initialized. Where is the error? You can only find it in output. When you click open image, output displays an error: must call setscrollsizes () or setscaletofitsize () before painting scroll view. this reminds me to change the view to scrollview, and scrollview should set an initial value. According to my personal situation, setscrollsize is added to the initialization function of the View class, and the image can be opened normally after running again.
Unicode is a problem. By default, Unicode is used for vs. The old character set is used for programming, leading to garbled characters in the dialog box during running. In this case, it is okay to change the properties of the project, the method is as follows: Project menu -- Project Properties (the last one) -- configuration properties -- General -- project default value -- character set ), change the Unicode character set to not set ).

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.