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

[MFC]設定RichEdit內顯示文字顏色

設定文字插入位置
//移動游標m_RichEdit.SendMessage(EM_LINEINDEX, m_RichEdit.GetLineCount(), 0);            //移到最底行m_RichEdit.SendMessage(EM_SETSEL, m_RichEdit.GetWindowTextLength(), m_RichEdit.GetWindowTextLength());    //移到最後一個字元後面

改變顯示顏色
    CHARFORMAT chFormat;
    ::ZeroMemory(&chFormat, sizeof(CHARFORMAT));        
    m_RichEdit.GetSelectionCharFormat(chFormat);     //取得目前文字格式  
    chFormat.dwMask |= CFM_COLOR;                    //設定修改顏色屬性
    chFormat.dwEffects &= ~CFE_AUTOCOLOR;        //移除 CFE_AUTOCOLOR
    chFormat.crTextColor = RGB(255, 0, 0);

    m_RichEdit.SetSelectionCharFormat(chFormat);
    m_RichEdit.ReplaceSel(str);        //因為沒有選擇文字,所以會將str塞到最後面

Memo用,可直接使用,需再新增其他功能時,要再修改與測試。

Comments

Popular Posts