home *** CD-ROM | disk | FTP | other *** search
/ Piper's Pit BBS/FTP: ibm 0020 - 0029 / ibm0020-0029 / ibm0028.tar / ibm0028 / PV31-3.ZIP / EXAMPLES / EXAMPLE3 / EXAMPLE3.C < prev    next >
Encoding:
C/C++ Source or Header  |  1991-02-14  |  18.4 KB  |  539 lines

  1. /* Example3.c -- demonstration */
  2.  
  3. #include <windows.h>
  4. #include <dos.h>
  5. #include <time.h>
  6. #include "pv.h"
  7. #include "exampl3a.h"
  8. #include "exampl3b.h"
  9. #include "exampl3c.h"
  10. #include "string.h"
  11. #include "stdlib.h"
  12.  
  13. HANDLE      key;
  14. HDC         hDC;
  15. VIEWPROC  lpfnMainWndProc;
  16. LONG FAR PASCAL  MainWndProc(HWND, WORD, WORD, LONG);
  17.  
  18. TEXTMETRIC  tmFontInfo;    // Font information for signon screen
  19. LOGFONT     lfNewFont;
  20. HANDLE      hTitleFont, hOldFont, hTitleTextFont;
  21. RECT        rect;
  22. int         xWidth, yHeight;
  23.  
  24. VIEW        DeskTop;        // Background window
  25. VIEW        Insure1;        // Signon screen
  26. VIEW        insure2;        // Address information screen
  27. VIEW        insure3;        // Policy information screen
  28. HWND        hWndDeskTop;    // Window handles
  29. HWND        hWndInsure1;
  30. HWND        hWndinsure2;
  31. HWND        hWndinsure3;
  32. HANDLE      hInst;          // Global module instance handle
  33.  
  34. struct tm   *pTime;         // tm structure for date comparisons
  35. long        ltime;
  36. int         Okay = FALSE;   // Signifies when WM_SIZE and WM_MOVE messages
  37.                             // should move the two data input screens.
  38.                             // Only after signon is completed. Okay = TRUE.
  39.  
  40. RECT        Rect;           // Used for resizing data input screens
  41. POINT       Point;
  42.  
  43. int PASCAL WinMain(hInstance, hPrevInstance, lpszCmdLine, nCmdShow)
  44.     HANDLE     hInstance, hPrevInstance;
  45.     LPSTR      lpszCmdLine;
  46.     int        nCmdShow;
  47. {
  48.    static char szAppName[] = "insure1";
  49.    MSG      msg;
  50.  
  51.    hInst = hInstance;
  52.    time(<ime);
  53.    pTime = gmtime(<ime);
  54.    v3StartDate = *pTime;
  55.    v3EndDate   = *pTime;
  56.    v3EndDate.tm_year++;
  57.  
  58.    /* Prepare View Proc for UserId and Password Screen */
  59.    lpfnInsure1ViewProc    = (VIEWPROC)MakeProcInstance((FARPROC)Insure1ViewProc, hInstance);
  60.    lpfnMainWndProc    = (VIEWPROC)MakeProcInstance((FARPROC)MainWndProc, hInstance);
  61.  
  62.    /* Prepare Field Procs */
  63.    lpfnLastNameFieldProc  = (FIELDPROC)MakeProcInstance((FARPROC)LastNameFieldProc, hInstance);
  64.    lpfnFirstNameFieldProc = (FIELDPROC)MakeProcInstance((FARPROC)FirstNameFieldProc, hInstance);
  65.    lpfnMidInitFieldProc   = (FIELDPROC)MakeProcInstance((FARPROC)MidInitFieldProc, hInstance);
  66.    lpfnUserIDFieldProc    = (FIELDPROC)MakeProcInstance((FARPROC)UserIDFieldProc, hInstance);
  67.    lpfnPasswordFieldProc  = (FIELDPROC)MakeProcInstance((FARPROC)PasswordFieldProc, hInstance);
  68.    lpfnStartDateFieldProc = (FIELDPROC)MakeProcInstance((FARPROC)StartDateFieldProc, hInstance);
  69.    lpfnEndDateFieldProc   = (FIELDPROC)MakeProcInstance((FARPROC)EndDateFieldProc, hInstance);
  70.  
  71.    lpfnMakeLongPointer    = MakeProcInstance(MakeLongPointer, hInstance);
  72.  
  73.  
  74.    // Create Background window
  75.    DeskTop = vwOpenView(hInstance,
  76.                    "Example3.exe",
  77.                    WS_VISIBLE | WS_OVERLAPPEDWINDOW | WS_MAXIMIZE,
  78.                    NULL,
  79.                    lpfnMainWndProc,
  80.                    lpfnMakeLongPointer);
  81.  
  82.    vwSetViewIcon(DeskTop, LoadIcon(hInstance, "Example3")); // Attach an icon
  83.    hWndDeskTop = vwShowView(DeskTop);                       // Display
  84.  
  85.  
  86.    /* Open User ID and Password entry screen */
  87.    Insure1 = vwCreateView(hInstance,
  88.                    "Insure1",
  89.                    hWndDeskTop,
  90.                    lpfnInsure1ViewProc,
  91.                    lpfnMakeLongPointer);
  92.  
  93.  
  94.    // Set up application variables and fieldprocs for both fields
  95.    vwSetFieldVar(Insure1, 1, v1UserID);
  96.    vwSetFieldVar(Insure1, 2, v1Password);
  97.    vwSetFieldVar(Insure1, 7, &v2Okay);
  98.    vwSetFieldProc(Insure1, 1, lpfnUserIDFieldProc);
  99.    vwSetFieldProc(Insure1, 2, lpfnPasswordFieldProc);
  100.  
  101.  
  102.  
  103.  
  104.    /* Open Name and Address entry screen */
  105.    insure2 = vwCreateView(hInstance,
  106.                    "insure2",
  107.                    hWndDeskTop,
  108.                    lpfnInsure1ViewProc,
  109.                    lpfnMakeLongPointer);
  110.  
  111.    // Setup application variables for all fields
  112.    vwSetFieldVar(insure2, 1, v2LastName);
  113.    vwSetFieldVar(insure2, 2, v2FirstName);
  114.    vwSetFieldVar(insure2, 3, v2MidInit);
  115.    vwSetFieldVar(insure2, 4, v2Street);
  116.    vwSetFieldVar(insure2, 5, v2City);
  117.    vwSetFieldVar(insure2, 6, v2State);
  118.    vwSetFieldVar(insure2, 7, v2Zipcode);
  119.    vwSetFieldVar(insure2, 8, v2Telephone);
  120.    vwSetFieldVar(insure2, 9, &v2Okay);
  121.    vwSetFieldVar(insure2, 10, &v2Cancel);
  122.  
  123.    // Set up field procs for First, Last and Middle name fields
  124.    // As the user moves through each of these fields, the name field on
  125.    // the Policy input screen is dynamically updated to reflect the part
  126.    // of the name entered. When all three are entered, the color of this
  127.    // field on the policy screen is changed to rgbWHITE on rgbBLACK.
  128.  
  129.    vwSetFieldProc(insure2, 1, lpfnLastNameFieldProc);
  130.    vwSetFieldProc(insure2, 2, lpfnFirstNameFieldProc);
  131.    vwSetFieldProc(insure2, 3, lpfnMidInitFieldProc);
  132.  
  133.    /* Add color to the two button fields */
  134.    vwSetFieldColors(insure2, 9, rgbBLUE, rgbGREEN, 0L, 0L);
  135.    vwSetFieldColors(insure2, 10, rgbWHITE, rgbRED, 0L, 0L);
  136.  
  137.  
  138.    /* Open Policy information screen */
  139.    insure3 = vwCreateView(hInstance,
  140.                    "insure3",
  141.                    hWndDeskTop,
  142.                    lpfnInsure1ViewProc,
  143.                    lpfnMakeLongPointer);
  144.  
  145.    /* Set up application variables */
  146.    vwSetFieldVar(insure3, 1, v3Name);
  147.    vwSetFieldVar(insure3, 2, v3Policy);
  148.    vwSetFieldVar(insure3, 3, &v3StartDate);
  149.    vwSetFieldVar(insure3, 4, &v3EndDate);
  150.    vwSetFieldVar(insure3, 5, &v3Coverage);
  151.    vwSetFieldVar(insure3, 6, &v3Premium);
  152.    vwSetFieldVar(insure3, 7, &v2Okay);
  153.    vwSetFieldVar(insure3, 8, &v2Cancel);
  154.  
  155.    // Initialize application date fields to today's data and 1 year from
  156.    // today
  157.    time(<ime);
  158.    pTime = gmtime(<ime);
  159.    v3EndDate = v3StartDate = *pTime;
  160.    v3EndDate.tm_year++;
  161.  
  162.    // Set up field procs for date fields for date checking
  163.    vwSetFieldProc(insure3, 3, lpfnStartDateFieldProc);
  164.    vwSetFieldProc(insure3, 4, lpfnEndDateFieldProc);
  165.  
  166.    // Add color to the two button fields
  167.    vwSetFieldColors(insure3, 7, rgbBLUE, rgbGREEN, 0L, 0L);
  168.    vwSetFieldColors(insure3, 8, rgbWHITE, rgbRED, 0L, 0L);
  169.  
  170.    // Temporarily turn off editing in each view as they are being
  171.    // initially displayed. This prevents errors from being detected
  172.    // before the user has had a chance to input data as the input focus
  173.    // changes from view to view as they are displayed.
  174.  
  175.    vwSetViewEditingOff(Insure1);
  176.    vwSetViewEditingOff(insure2);
  177.    vwSetViewEditingOff(insure3);
  178.  
  179.    // Show Views from back to front for layered appearance
  180.    hWndinsure3 = vwShowView(insure3);
  181.    hWndinsure2 = vwShowView(insure2);
  182.  
  183.  
  184.    // Obtain the text metrics for the system font and
  185.    //  modify various parameters to indirectly create two new fonts
  186.    hDC = GetDC(hWndinsure3);
  187.    GetTextMetrics(hDC, &tmFontInfo);
  188.    memset( &lfNewFont, 0, sizeof (LOGFONT));
  189.  
  190.    // Change the height, width, weight, facename, pitch and family
  191.    xWidth = tmFontInfo.tmAveCharWidth;
  192.    yHeight = tmFontInfo.tmHeight + tmFontInfo.tmExternalLeading;
  193.    lfNewFont.lfHeight = tmFontInfo.tmHeight * 2;
  194.    lfNewFont.lfPitchAndFamily = FF_ROMAN;
  195.    lfNewFont.lfWeight = 500;
  196.    strcpy(lfNewFont.lfFaceName, "TMSRE");
  197.  
  198.    hTitleFont = CreateFontIndirect (&lfNewFont);
  199.  
  200.    // Set the height back to normal size for other text
  201.    lfNewFont.lfHeight = tmFontInfo.tmHeight;
  202.    hTitleTextFont = CreateFontIndirect (&lfNewFont);
  203.    ReleaseDC(hWndinsure3, hDC);
  204.  
  205.    // Add text fields to the view dynamically using the new fonts
  206.    vwSetTextField(Insure1, -1, 5, "Confidence Insurance Co.", hTitleFont);
  207.    vwSetTextField(Insure1, -1, 25,
  208.          "ProtoView Demonstration by ProtoView Development Co.", hTitleTextFont);
  209.  
  210.    // Show the UserID, Password entry screen
  211.    hWndInsure1 = vwShowView(Insure1);
  212.  
  213.    // Turn on editing for all of the views
  214.    vwSetViewEditingOn(Insure1);
  215.    vwSetViewEditingOn(insure2);
  216.    vwSetViewEditingOn(insure3);
  217.  
  218.    while(GetMessage(&msg, NULL, 0, 0))
  219.    {
  220.        TranslateMessage(&msg);
  221.        DispatchMessage(&msg);
  222.    }
  223.    FreeProcInstance((FARPROC)LastNameFieldProc);
  224.    FreeProcInstance((FARPROC)FirstNameFieldProc);
  225.    FreeProcInstance((FARPROC)MidInitFieldProc);
  226.    FreeProcInstance((FARPROC)UserIDFieldProc);
  227.    FreeProcInstance((FARPROC)PasswordFieldProc);
  228.    FreeProcInstance((FARPROC)StartDateFieldProc);
  229.    FreeProcInstance((FARPROC)EndDateFieldProc);
  230.    FreeProcInstance(MakeLongPointer);
  231.    DeleteObject(hTitleFont);
  232.    DeleteObject(hTitleTextFont);
  233.  
  234.    return msg.wParam;
  235. }
  236.  
  237. // All three views, insure1, insure2 and insure3 use this function for the viewproc.
  238. // Its purpose is process Okay and Cancel button clicks.
  239. long FAR PASCAL Insure1ViewProc(HWND hWnd, WORD wMessage, WORD wParam, LONG lParam)
  240. {
  241.    GETVIEW;
  242.    switch(wMessage)
  243.    {
  244.        case WM_COMMAND :
  245.             if(wParam == vwGetFieldNo(View, &v2Okay))
  246.                 if(!vwEditView(View) && (View == Insure1))
  247.                 {
  248.                   Point.x = Point.y = 0;
  249.                   ClientToScreen(hWndDeskTop, &Point);
  250.                   GetClientRect(hWndDeskTop, &Rect);
  251.                   Rect.left = Point.x;
  252.                   Rect.top  = Point.y;
  253.                   if(IsWindow(hWndinsure2))
  254.                   MoveWindow(hWndinsure2, Rect.left,
  255.                                           Rect.top,
  256.                                           Rect.right,
  257.                                           Rect.bottom / 2, TRUE);
  258.                   if(IsWindow(hWndinsure3))
  259.                   MoveWindow(hWndinsure3, Rect.left,
  260.                                           (Rect.bottom / 2) + Rect.top,
  261.                                           Rect.right,
  262.                                           Rect.bottom / 2, TRUE);
  263.                   vwHideView(Insure1);
  264.                   Okay = TRUE;
  265.                   return(0);
  266.                 }
  267.                 return 0;
  268.             if(wParam == vwGetFieldNo(View, &v2Cancel))
  269.                 return 0;
  270.    }
  271.    return DefViewProc(hWnd, wMessage, wParam, lParam);
  272. }
  273.  
  274.  
  275. long FAR PASCAL MainWndProc(HWND hWnd, WORD wMessage, WORD wParam, LONG lParam)
  276. {
  277.    GETVIEW;
  278.    switch(wMessage)
  279.    {
  280.        /* If this view gets destroyed, Destroy the others as well */
  281.        case WM_MOVE :
  282.        case WM_SIZE :
  283.             if(Okay && IsWindow(hWndinsure2) && IsWindow(hWndinsure3))
  284.             {
  285.                 Point.x = Point.y = 0;
  286.                 ClientToScreen(hWndDeskTop, &Point);
  287.                 GetClientRect(hWndDeskTop, &Rect);
  288.                 Rect.left = Point.x;
  289.                 Rect.top  = Point.y;
  290.                 MoveWindow(hWndinsure2, Rect.left,
  291.                                         Rect.top,
  292.                                         Rect.right,
  293.                                         Rect.bottom / 2, TRUE);
  294.                 MoveWindow(hWndinsure3, Rect.left,
  295.                                         (Rect.bottom / 2) + Rect.top,
  296.                                         Rect.right,
  297.                                         Rect.bottom / 2, TRUE);
  298.             }
  299.             break;
  300.        case WM_DESTROY :
  301.             PostQuitMessage(0);
  302.    }
  303.    return DefViewProc(hWnd, wMessage, wParam, lParam);
  304. }
  305.  
  306. long FAR PASCAL UserIDFieldProc(HWND hWnd, WORD wMessage, WORD wParam, LONG lParam)
  307. {
  308. char szBuffer[50];
  309.    VIEW View = vwGetView(hWnd);
  310.    VWFIELD Field = GetWindowWord(hWnd, GWW_ID);
  311.    switch(wMessage)
  312.    {
  313.        case WM_KILLFOCUS :
  314.             /* When the user tries to leave the userid field, check to see if
  315.              * the proper userid has been entered.
  316.              * If it has not, then set the view error status to ViewScope */
  317.  
  318.             GetWindowText(hWnd, szBuffer, 40);
  319.             if(lstricmp("Smith", szBuffer))
  320.                    vwSetViewError(View, Field,
  321.                          "  Invalid User ID.  Valid ID: SMITH", VE_APPSCOPE);
  322.             return(vwGetDefFieldProc(View, Field)(hWnd, wMessage, wParam, lParam));
  323.             break;
  324.  
  325.        default :
  326.             return (vwGetDefFieldProc(View, Field)(hWnd, wMessage, wParam, lParam));
  327.    }
  328.    return 0L;
  329. }
  330.  
  331. long FAR PASCAL PasswordFieldProc(HWND hWnd, WORD wMessage, WORD wParam, LONG lParam)
  332. {
  333. char szBuffer[50];
  334. static int ItemSelected;
  335.    VIEW View = vwGetView(hWnd);
  336.    VWFIELD Field = GetWindowWord(hWnd, GWW_ID);
  337.    switch(wMessage)
  338.    {
  339.  
  340.        case WM_KILLFOCUS :
  341.             /* When the user tries to leave the password field, check to see if
  342.              * the proper password has been entered.
  343.              * If it has not, then set the view error status to ViewScope */
  344.             GetWindowText(hWnd, szBuffer, 40);
  345.             if(lstricmp("Tree", szBuffer))
  346.                    vwSetViewError(View, Field,
  347.                          "  Invalid User Password. Valid Password: TREE", VE_VIEWSCOPE | VE_POPUP);
  348.             return (vwGetDefFieldProc(View, Field)(hWnd, wMessage, wParam, lParam));
  349.             break;
  350.        default :
  351.             return (vwGetDefFieldProc(View, Field)(hWnd, wMessage, wParam, lParam));
  352.    }
  353.    return 0L;
  354. }
  355.  
  356. long FAR PASCAL StartDateFieldProc(HWND hWnd, WORD wMessage, WORD wParam, LONG lParam)
  357. {
  358. int error = FALSE;
  359. int Current;
  360.    VIEW View = vwGetView(hWnd);
  361.    VWFIELD Field = GetWindowWord(hWnd, GWW_ID);
  362.    switch(wMessage)
  363.    {
  364.        case WM_KILLFOCUS :
  365.             vwDoScrToApp(View, Field);
  366.             vwDoScrToApp(View, Field + 1);
  367.             if(v3StartDate.tm_year > v3EndDate.tm_year)
  368.                error = TRUE;
  369.             else
  370.             if(v3StartDate.tm_year == v3EndDate.tm_year)
  371.                if(v3StartDate.tm_mon > v3EndDate.tm_mon)
  372.                   error = TRUE;
  373.             else
  374.             if(v3StartDate.tm_year == v3EndDate.tm_year)
  375.                if(v3StartDate.tm_mon == v3EndDate.tm_mon)
  376.                   if(v3StartDate.tm_mday > v3EndDate.tm_mday)
  377.                      error = TRUE;
  378.             if(error)
  379.                  vwSetViewError(View, Field,
  380.                        "  Start Date cannot be greater than End Date", VE_VIEWSCOPE | VE_POPUP);
  381.  
  382.        default :
  383.             return (vwGetDefFieldProc(View, Field)(hWnd, wMessage, wParam, lParam));
  384.    }
  385.    return 0L;
  386. }
  387.  
  388. long FAR PASCAL EndDateFieldProc(HWND hWnd, WORD wMessage, WORD wParam, LONG lParam)
  389. {
  390. int error = FALSE;
  391.    VIEW View = vwGetView(hWnd);
  392.    VWFIELD Field = GetWindowWord(hWnd, GWW_ID);
  393.    switch(wMessage)
  394.    {
  395.        case WM_KILLFOCUS :
  396.             vwDoScrToApp(View, Field);
  397.             vwDoScrToApp(View, Field - 1 );
  398.             if(v3StartDate.tm_year > v3EndDate.tm_year)
  399.                error = TRUE;
  400.             else
  401.             if(v3StartDate.tm_year == v3EndDate.tm_year)
  402.                if(v3StartDate.tm_mon > v3EndDate.tm_mon)
  403.                   error = TRUE;
  404.             else
  405.             if(v3StartDate.tm_year == v3EndDate.tm_year)
  406.                if(v3StartDate.tm_mon == v3EndDate.tm_mon)
  407.                   if(v3StartDate.tm_mday > v3EndDate.tm_mday)
  408.                      error = TRUE;
  409.             if(error)
  410.                  vwSetViewError(View, Field,
  411.                        "  End Date cannot be less than Start Date", VE_VIEWSCOPE | VE_POPUP);
  412.  
  413.        default :
  414.  
  415.             return (vwGetDefFieldProc(View, Field)(hWnd, wMessage, wParam, lParam));
  416.    }
  417.    return 0L;
  418. }
  419.  
  420. long FAR PASCAL LastNameFieldProc(HWND hWnd, WORD wMessage, WORD wParam, LONG lParam)
  421. {
  422. static char szBuffer[60];
  423. char Buff[60];
  424.    VIEW View = vwGetView(hWnd);
  425.    VWFIELD Field = GetWindowWord(hWnd, GWW_ID);
  426.    switch(wMessage)
  427.    {
  428.        case WM_KILLFOCUS :
  429.             GetWindowText(vwGetFieldWindow(View, Field), szBuffer, 40);
  430.             if(!strlen(szBuffer))
  431.                  vwSetViewError(View, Field,
  432.                        "  Please enter a Name", VE_APPSCOPE | VE_POPUP);
  433.             GetWindowText(vwGetFieldWindow(View, 2), szBuffer, 40);
  434.             lstrcat(szBuffer, " ");
  435.             GetWindowText(vwGetFieldWindow(View, 3), Buff, 40);
  436.             lstrcat(szBuffer, Buff);
  437.             lstrcat(szBuffer, " ");
  438.             GetWindowText(vwGetFieldWindow(View, 1), Buff, 40);
  439.             lstrcat(szBuffer, Buff);
  440.             lstrcpy(v3Name, szBuffer);
  441.  
  442.             if(insure3)
  443.             {
  444.                vwDoAppToScr(insure3, 1);
  445.             }
  446.        default :
  447.             return (vwGetDefFieldProc(View, Field)(hWnd, wMessage, wParam, lParam));
  448.    }
  449.    return 0L;
  450. }
  451.  
  452. long FAR PASCAL FirstNameFieldProc(HWND hWnd, WORD wMessage, WORD wParam, LONG lParam)
  453. {
  454. static char szBuffer[60];
  455. char Buff[60];
  456.    VIEW View = vwGetView(hWnd);
  457.    VWFIELD Field = GetWindowWord(hWnd, GWW_ID);
  458.    switch(wMessage)
  459.    {
  460.        case WM_KILLFOCUS :
  461.             GetWindowText(vwGetFieldWindow(View, 2), szBuffer, 40);
  462.             lstrcat(szBuffer, " ");
  463.             GetWindowText(vwGetFieldWindow(View, 3), Buff, 40);
  464.             lstrcat(szBuffer, Buff);
  465.             lstrcat(szBuffer, " ");
  466.             GetWindowText(vwGetFieldWindow(View, 1), Buff, 40);
  467.             lstrcat(szBuffer, Buff);
  468.             lstrcpy(v3Name, szBuffer);
  469.  
  470.             if(insure3)
  471.             {
  472.                vwDoAppToScr(insure3, 1);
  473.             }
  474.        default :
  475.             return (vwGetDefFieldProc(View, Field)(hWnd, wMessage, wParam, lParam));
  476.    }
  477.    return 0L;
  478. }
  479.  
  480. long FAR PASCAL MidInitFieldProc(HWND hWnd, WORD wMessage, WORD wParam, LONG lParam)
  481. {
  482. static char szBuffer[60];
  483. char Buff[60];
  484. static int sw = FALSE;
  485.    VIEW View = vwGetView(hWnd);
  486.    VWFIELD Field = GetWindowWord(hWnd, GWW_ID);
  487.    switch(wMessage)
  488.    {
  489.        case WM_KILLFOCUS :
  490.             GetWindowText(vwGetFieldWindow(View, 2), szBuffer, 40);
  491.             lstrcat(szBuffer, " ");
  492.             GetWindowText(vwGetFieldWindow(View, 3), Buff, 40);
  493.             lstrcat(szBuffer, Buff);
  494.             lstrcat(szBuffer, " ");
  495.             GetWindowText(vwGetFieldWindow(View, 1), Buff, 40);
  496.             lstrcat(szBuffer, Buff);
  497.             lstrcpy(v3Name, szBuffer);
  498.  
  499.             if(insure3)
  500.             {
  501.                vwDoAppToScr(insure3, 1);
  502.             }
  503.             if(!sw)
  504.             {
  505.               vwSetFieldColors(insure3, 1, rgbWHITE, rgbBLACK, rgbBLACK, rgbWHITE);
  506.               vwPaintField(insure3, 1);
  507.               sw =TRUE;
  508.             }
  509.  
  510.        default :
  511.             return (vwGetDefFieldProc(View, Field)(hWnd, wMessage, wParam, lParam));
  512.    }
  513.    return 0L;
  514. }
  515.  
  516.  
  517.  
  518. BOOL FAR PASCAL MakeLongPointer()
  519. {
  520. static void far *Ptr;
  521.    Ptr = &Ptr;
  522.    return(FP_SEG(Ptr));
  523. }
  524.  
  525.  
  526.  
  527.  
  528.  
  529.  
  530.  
  531.  
  532.  
  533.  
  534.  
  535.  
  536.  
  537.  
  538.  
  539.