Skip to main content

Featured

Build docker image from multiple build contexts

Build docker image from multiple build contexts Building a docker image requires specifying a source of truth to include in the image from a local directory or a remote git repository. In the previous version, the docker BuildKit allows users to specify the build context from a single source of truth only. However, the engineers may need to have the context from different locations based on the type of files. For instance, icons, images or other resources that are not included in the same package, including the resource from other docker images. Fortunately, the Docker Buildx toolkit supports multiple build context flag for Docker 1.4. Let's learn how to use this new feature. The following list is a shortcut for jumping into a specific topic handy. What version of Docker is this tutorial targeting? How to specify the version of Dockerfile frontend? Ho

[CListCtrl]在滑鼠指標移過儲存格上方後,顯示底線

目前算只完成一半,因為字跟欄位有個距離,目前還沒辦法動態取得。
ON_WM_MOUSEMOVE()

一樣也是在CListCtrl::OnMouseMove()內處理。
     CRect rect1, rectParent; 
this->GetSubItemRect(nItem, nSubItem, LVIR_BOUNDS, rect1);   
this->GetWindowRect(&rectParent);   
CString cstrDisplayString =    this->GetItemText(nItem, nSubItem);   
int nStrWidth = this->GetStringWidth(cstrDisplayString);   
unsigned int nCurNumOfWorkArea = this->GetNumberOfWorkAreas();  
if ( point.x < rect1.right && point.x > rect1.left && point.y < rect1.bottom && point.y > rect1.top )       
{   
//Clean previous line   
if ( !this->m_PreRect.IsRectEmpty() )   
{   
CDC *pcdc = this->GetDC();   
CPen cp(PS_SOLID, 1, RGB(255,255,255));   
pcdc->SelectObject(cp.m_hObject);   
pcdc->MoveTo(this->m_PreRect.left, this->m_PreRect.bottom);   
pcdc->LineTo(this->m_PreRect.right, this->m_PreRect.bottom);   
this->m_PreRect.SetRectEmpty();   
}   
//Draw line   
CDC *pcdc = this->GetDC();   
CPen cp(PS_SOLID, 1, RGB(255,0,0));   
pcdc->SelectObject(cp.m_hObject);   
pcdc->MoveTo(rect1.left, rect1.bottom);  
pcdc->LineTo((rect1.left + nStrWidth), rect1.bottom);   
this->m_PreRect.SetRect(rect1.left, rect1.top, (rect1.left+nStrWidth), rect1.bottom);   
}else {  
         CDC *pcdc = this->GetDC();   
CPen cp(PS_SOLID, 1, RGB(255,255,255));   
pcdc->SelectObject(cp.m_hObject);   
pcdc->MoveTo(this->m_PreRect.left, this->m_PreRect.bottom);   
pcdc->LineTo(this->m_PreRect.right, this->m_PreRect.bottom);   
this->m_PreRect.SetRectEmpty();   
} 

this->ReleaseDC(pcdc);

Comments

Popular Posts