first use CButtonST

    技术2024-07-03  64

    base on MFC Dialog.

    add two files to you project . they are : btnst.h btnst.cpp.

    write "#include "btnst.h" " in your  stdafx.h file.

    using class wizard defines a object of CButton ,  asume its name is m_btn.

    in your dialog header file change m_btn's definition, use CButtonST to replace CButton.

    add  the following two lines in the initialization fuction:

    m_btn.SetIcon(IDR_MAINFRAME);//set icon

    m_btn.SetFlat(FALSE);//remove the effect of this line is flat

    最新回复(0)