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.

73 lines
1.7 KiB

  1. /*++
  2. Copyright (C) 1996-1999 Microsoft Corporation
  3. Module Name:
  4. fostrwnd.cpp
  5. Abstract:
  6. <abstract>
  7. --*/
  8. #include "Polyline.h"
  9. WCHAR szFosterClassName[] = L"FosterWndClass";
  10. LRESULT APIENTRY FosterWndProc(HWND hWnd, UINT iMsg, WPARAM wParam, LPARAM lParam)
  11. {
  12. return DefWindowProc (hWnd, iMsg, wParam, lParam) ;
  13. }
  14. HWND CreateFosterWnd (
  15. VOID
  16. )
  17. {
  18. WNDCLASS wc ;
  19. HWND hWnd;
  20. BEGIN_CRITICAL_SECTION
  21. if (pstrRegisteredClasses[FOSTER_WNDCLASS] == NULL) {
  22. wc.style = 0;
  23. wc.lpfnWndProc = FosterWndProc;
  24. wc.hInstance = g_hInstance;
  25. wc.cbClsExtra = 0;
  26. wc.cbWndExtra = 0;
  27. wc.hIcon = NULL ;
  28. wc.hCursor = NULL ;
  29. wc.hbrBackground = NULL ;
  30. wc.lpszMenuName = NULL ;
  31. wc.lpszClassName = szFosterClassName ;
  32. if (RegisterClass (&wc)) {
  33. pstrRegisteredClasses[FOSTER_WNDCLASS] = szFosterClassName;
  34. }
  35. }
  36. END_CRITICAL_SECTION
  37. hWnd = NULL;
  38. if (pstrRegisteredClasses[FOSTER_WNDCLASS] != NULL)
  39. {
  40. hWnd = CreateWindow (szFosterClassName, // window class
  41. NULL, // window caption
  42. WS_DISABLED | WS_POPUP, // window style
  43. 0, 0, 0, 0, // window size and pos
  44. NULL, // parent window
  45. NULL, // menu
  46. g_hInstance, // program instance
  47. NULL) ; // user-supplied data
  48. }
  49. return hWnd;
  50. }