VCenterEdit a perfect CEdit class with vertical text Center (and improvement)

Source: Internet
Author: User

Vcenteredit is a perfect cedit class in vertical center of text (and improved ),:

Http://download.csdn.net/detail/shuren8/5602349

Vcenteredit is a perfect cedit class in vertical center of text. This class is derived from the cvedit class on the network and added code for processing the readonly column to form a more practical vcenteredit cedit class with perfect vertical center of text. For your reference and exchange. Tested, it can run stably and properly.

It cannot be deleted or modified after the upload. Therefore, this post is improved. The following functions are improvements to the disable and readonly processes. See:

// The disable and readonly situations have been processed. You only need to replace the original vcenteredit: onncpaint () with this function.
Void vcenteredit: onncpaint ()
{
Default ();

Cwindowdc DC (this );

Cbrush brush = (0 = This-> iswindowenabled () | (this-> getstyle () & es_readonly) = es_readonly ))?
Getsyscolor (color_btnface): getsyscolor (color_window );

DC. fillrect (m_rectncbottom, & brush );
DC. fillrect (m_rectnctop, & brush );
}

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.