Leaked source code of windows server 2003
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.

47 lines
1.2 KiB

  1. //**********************************************************************
  2. // File name: CebOC.cpp
  3. //
  4. // WndProc for Hosting a WebOC in a dialog
  5. //
  6. // Functions:
  7. //
  8. // Copyright (c) 1992 - 1998 Microsoft Corporation. All rights reserved.
  9. //**********************************************************************
  10. #include "pre.h"
  11. LRESULT CALLBACK WebOCWndProc (HWND hwnd, UINT mMsg, WPARAM wParam, LPARAM lParam)
  12. {
  13. CICWWebView *pICWWebView = (CICWWebView *) GetWindowLongPtr(hwnd, GWLP_USERDATA);
  14. switch (mMsg)
  15. {
  16. case WM_SETFOCUS:
  17. {
  18. ASSERT(pICWWebView);
  19. if (pICWWebView)
  20. pICWWebView->SetFocus();
  21. return TRUE;
  22. }
  23. default:
  24. return (DefWindowProc (hwnd, mMsg, wParam, lParam));
  25. }
  26. }
  27. void RegWebOCClass()
  28. {
  29. WNDCLASSEX wc;
  30. //Register the WebOC class and bind to dummy proc
  31. ZeroMemory (&wc, sizeof(WNDCLASSEX));
  32. wc.style = CS_GLOBALCLASS;
  33. wc.cbSize = sizeof(wc);
  34. wc.lpszClassName = TEXT("WebOC");
  35. wc.hInstance = ghInstance;
  36. wc.lpfnWndProc = WebOCWndProc;
  37. wc.lpszMenuName = NULL;
  38. RegisterClassEx (&wc);
  39. }