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.

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. TCHAR szFosterClassName[] = TEXT("FosterWndClass") ;
  10. LRESULT APIENTRY FosterWndProc(HWND hWnd, UINT iMsg,
  11. WPARAM wParam, LPARAM lParam)
  12. {
  13. return DefWindowProc (hWnd, iMsg, wParam, lParam) ;
  14. }
  15. HWND CreateFosterWnd (
  16. VOID
  17. )
  18. {
  19. WNDCLASS wc ;
  20. HWND hWnd;
  21. BEGIN_CRITICAL_SECTION
  22. if (pstrRegisteredClasses[FOSTER_WNDCLASS] == NULL) {
  23. wc.style = 0;
  24. wc.lpfnWndProc = (WNDPROC) FosterWndProc ;
  25. wc.hInstance = g_hInstance;
  26. wc.cbClsExtra = 0 ;
  27. wc.cbWndExtra = 0;
  28. wc.hIcon = NULL ;
  29. wc.hCursor = NULL ;
  30. wc.hbrBackground = NULL ;
  31. wc.lpszMenuName = NULL ;
  32. wc.lpszClassName = szFosterClassName ;
  33. if (RegisterClass (&wc)) {
  34. pstrRegisteredClasses[FOSTER_WNDCLASS] = szFosterClassName;
  35. }
  36. }
  37. END_CRITICAL_SECTION
  38. hWnd = (HWND)NULL;
  39. if (pstrRegisteredClasses[FOSTER_WNDCLASS] != NULL)
  40. {
  41. hWnd = CreateWindow (szFosterClassName, // window class
  42. NULL, // window caption
  43. WS_DISABLED | WS_POPUP, // window style
  44. 0, 0, 0, 0, // window size and pos
  45. NULL, // parent window
  46. NULL, // menu
  47. g_hInstance, // program instance
  48. NULL) ; // user-supplied data
  49. }
  50. return hWnd;
  51. }