20 __inout_opt LPUNKNOWN pUnk,
36 __inout_opt LPUNKNOWN pUnk,
55 LONG lRef = InterlockedIncrement(&
m_cRef);
67 LONG lRef = InterlockedDecrement(&
m_cRef);
76 return max(
ULONG(lRef),1ul);
86 if (
riid == IID_IPropertyPage) {
107 NOTE(
"No caption memory");
111 pPageInfo->cb =
sizeof(PROPPAGEINFO);
112 pPageInfo->pszTitle = pszTitle;
113 pPageInfo->pszDocString =
NULL;
114 pPageInfo->pszHelpFile =
NULL;
115 pPageInfo->dwHelpContext = 0;
118 pPageInfo->size.cx = 340;
119 pPageInfo->size.cy = 150;
144 if (pPropertyPage ==
NULL) {
147 pPropertyPage->
m_Dlg = hwnd;
152 pPropertyPage = _GetWindowLongPtr<CBasePropertyPage*>(hwnd,
DWLP_USER);
153 if (pPropertyPage ==
NULL) {
166 if ((ppUnk ==
NULL) || (*ppUnk ==
NULL)) {
171 m_bObjectSet = TRUE ;
174 }
else if (cObjects == 0) {
177 m_bObjectSet = FALSE ;
181 DbgBreak(
"No support for more than one object");
195 if (m_bObjectSet == FALSE) {
209 return E_OUTOFMEMORY;
214 return Show(SW_SHOWNORMAL);
251 if ((nCmdShow != SW_SHOW) && (nCmdShow != SW_SHOWNORMAL) && (nCmdShow != SW_HIDE)) {
255 ShowWindow(
m_hwnd,nCmdShow);
271 DWORD dwStyle = GetWindowLong(
m_hwnd, GWL_EXSTYLE);
272 dwStyle = dwStyle & (~WS_EX_CONTROLPARENT);
279 SetWindowLong(hwnd, GWL_EXSTYLE, dwStyle);
328 if (m_bObjectSet == FALSE) {
366 pPropertyPage = _GetWindowLongPtr<CBasePropertyPage*>(hwnd,
DWLP_USER);
372 case WM_STYLECHANGING:
373 if (wParam == GWL_EXSTYLE) {
374 LPSTYLESTRUCT lpss = (LPSTYLESTRUCT)lParam;
375 lpss->styleNew |= WS_EX_CONTROLPARENT;
381 return DefWindowProc(hwnd,uMsg,wParam,lParam);