add custem pages to control panel applets

时间:2014-01-14 04:47:40
【文件属性】:

文件名称:add custem pages to control panel applets

文件大小:13KB

文件格式:ZIP

更新时间:2014-01-14 04:47:40

控制面板 属性页 display

在桌面属性里面添加一个页面 STDMETHODIMP CDisplayCplExt::AddPages ( LPFNADDPROPSHEETPAGE lpfnAddPage, LPARAM lParam ) { // This method adds a new page to the Display property sheet. PROPSHEETPAGE psp; HPROPSHEETPAGE hPage; // Set up the PROPSHEETPAGE struct. ZeroMemory ( &psp, sizeof(PROPSHEETPAGE) ); psp.dwSize = sizeof(PROPSHEETPAGE); psp.dwFlags = PSP_USEREFPARENT | PSP_DEFAULT | PSP_USECALLBACK; psp.hInstance = _Module.GetResourceInstance(); psp.pszTemplate = MAKEINTRESOURCE(IDD_NEWPAGE); psp.pfnDlgProc = NewPageDlgProc; psp.pfnCallback = NewPageCallbackProc; psp.pcRefParent = (UINT*) &_Module.m_nLockCnt; // Create the page & get a handle to it. hPage = CreatePropertySheetPage ( &psp ); if ( NULL != hPage ) { // Call the shell's callback function, so it adds the page to // the property sheet. if ( !lpfnAddPage ( hPage, lParam )) { DestroyPropertySheetPage ( hPage ); } } return S_OK; }


【文件预览】:
DisplayPage
----DisplayPage.def(230B)
----DisplayCplExt.rgs(687B)
----DisplayCplExt.cpp(5KB)
----DisplayPage.dsp(13KB)
----DisplayPage.rc(4KB)
----DisplayPage.opt(49KB)
----StdAfx.cpp(315B)
----resource.h(594B)
----DisplayPage.idl(786B)
----DisplayCplExt.h(1KB)
----StdAfx.h(908B)
----DisplayPageps.def(253B)
----DisplayPage.cpp(4KB)
----DisplayPageps.mk(502B)
----dlldata.c(843B)

网友评论