Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
696 B

  1. #ifndef _OBJWINDOW_H_
  2. #define _OBJWINDOW_H_
  3. #pragma warning(disable:4100) // disable 'unreferenced formal parameter' because this params are needed for interface compat.
  4. class CObjectWindow : public IOleWindow
  5. {
  6. public:
  7. CObjectWindow(void) {}
  8. virtual ~CObjectWindow() {}
  9. //*** IUnknown ****
  10. // (client must provide!)
  11. //*** IOleWindow ***
  12. STDMETHOD(ContextSensitiveHelp)(IN BOOL fEnterMode) {return E_NOTIMPL;}
  13. STDMETHOD(GetWindow)(IN HWND * phwnd)
  14. {
  15. HRESULT hr = E_INVALIDARG;
  16. if (phwnd)
  17. {
  18. *phwnd = _hwnd;
  19. hr = S_OK;
  20. }
  21. return hr;
  22. }
  23. protected:
  24. HWND _hwnd;
  25. };
  26. #endif // _OBJWINDOW_H_