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 );
}