Bootstrap implements validation when input control loses focus

  • 2021-07-09 06:35:54
  • OfStack

In fact, this is the corresponding "cut" down and then "paste" into your control, see the code below for the location of the so-called transparent background picture:


CClientDC CLDC (of getParent ()) ; 
 Adj. CRect Rectangle ; 
 Adj. CRect rect1; 
GetClientRect ( RECT ) ; 
GetWindowRect ( rect1 ) ; 
 Adj. getParent ()  - > ScreenToClient ( rect1 ) ; If 
 ( m_dcBk.m_hDC == NULL ) {
m_dcBk.CreateCompatibleDC ( CLDC ) ; 
m_bmpBk.CreateCompatibleBitmap ( CLDC , rect.Width (), rect.Height ()) ; 
m_pbmpOldBk = m_dcBk.SelectObject ( m_bmpBk ) ; 
m_dcBk.BitBlt ( 0 , 0 , rect.Width (), rect.Height (), CLDC , rect1.left , rect1.top , SRCCOPY ) ; 
} // If 
pDC-> BitBlt Of ( 0 , 0 , rect.Width (), rect.Height (), m_dcBk , 0 , 0 , SRCCOPY ) ;

The above content is only about the core code of verification when bootstrap input control loses focus, and the code is appropriately added, modified and deleted according to personal needs.


Related articles: