Artificial setting window icon

zhaozj2021-02-16  46

Use the code in the VC to modify any dialog window to get the icon, and the main code is as follows:

Add the following code in the OnInitDialog function:

Where IDR_my specifies the icon for yourself

HINSTANCE hInstResource = AfxFindResourceHandle (MAKEINTRESOURCE (IDR_MY), RT_GROUP_ICON); HICON m_hIcon = (HICON) :: LoadImage (hInstResource, MAKEINTRESOURCE (IDRMY), IMAGE_ICON, 15, 15, 0); if (! M_hIcon = 0) {SetIcon (m_hIcon , TRUE);

2003.6.18, welcome to advise

转载请注明原文地址:https://www.9cbs.com/read-24975.html

New Post(0)