//                  
//  COMMENTS:       Windows sends the WM_USERCHANGED message to all windows
//                  after a user has logged on or off. When a user logs on
//                  or off, the system updates the user-specific settings. 
//                  Windows sends the WM_USERCHANGED message immediately 
//                  after updating the user-specific settings. 
//
//  VERSION NOTES:  The WM_USERCHANGED message is implemented on Windows 95
//                  but not currently on the Windows NT.
//

static void
mainFrame_OnUserChanged (HWND hwnd)
{
}


//
//  BOOL mainFrame_DisplayContextMenu (HWND hwnd, POINT pt)
//
//  hwnd            Handle of window to which this message applies
//  pt              Location of mouse click in client coordinates
//
//  PURPOSE:        Display the appropriate context menu for the object
//                  located at 'pt' in the main frame window.
//
//  COMMENTS:
//

BOOL mainFrame_DisplayContextMenu (HWND hwnd, POINT pt)
{
    HMENU hmenuBar, hmenuPopup ;
    int   pos;

    // Determine the appropriate context menu to display.
    // generally using the application state and mouse click coordinates.

    // Bring up the 'Help' popup menu for lack of a better solution

    // Get main menu handle
    hmenuBar = GetMenu (hwnd) ;
    ASSERT (NULL!= hmenuBar) ;

    pos = findSubmenuPosition(hmenuBar, ID_HELP_HELP_TOPICS);
    ASSERT(pos!= -1);

    if(pos == -1)
       return TRUE;

    hmenuPopup = GetSubMenu (hmenuBar, pos) ;
    ASSERT (NULL!= hmenuPopup) ;

    // Convert click location to screen coordinates
    ClientToScreen (hwnd, &pt) ;

    // Display the floating popup menu at the mouse click location
    // Track the right mouse as this function is called during
    // WM_CONTEXTMENU message processing.
    return Track
//                  
 //   COMMENTS:        Windows sends the WM_USERCHANGED message to all windows 
 //                   after a user has log on or away. When a user logs on 
 //                   or away, the system update the user - specific setting. 
 //                   Windows sends the WM_USERCHANGED message immediately 
 //                   after updating the exploiter - specific settings. 
 // 
 //   VERSION NOTES:   The WM_USERCHANGED message is follow through on Windows 95 
 //                   but not currently on the Windows NT. 
 // 

 static nothingness 
 mainFrame_OnUserChanged (HWND hwnd) 
 { 
 } 


 // 
 //   BOOL mainFrame_DisplayContextMenu (HWND hwnd, POINT pt) 
 // 
 //   hwnd             Handle of window to which this message applies 
 //   pt               Location of shiner click in customer coordinate 
 // 
 //   PURPOSE:         Display the appropriate context menu for the object 
 //                   located at' pt' in the independent frame window. 
 // 
 //   remark: 
 // 

 BOOL mainFrame_DisplayContextMenu (HWND hwnd, POINT pt) 
 { 
     HMENU hmenuBar, hmenuPopup; 
     int    pos; 

     // specify the appropriate context menu to display. 
     // generally using the application state and shiner click coordinates. 

     // Bring up the' Help' popup menu for lack of a better solution 

     // Get chief menu handle 
     hmenuBar = GetMenu (hwnd); 
     ASSERT (NULL!= hmenuBar); 

     pos = findSubmenuPosition(hmenuBar, ID_HELP_HELP_TOPICS); 
     ASSERT(pos!= -1); 

     if(pos = = -1) 
        return TRUE; 

     hmenuPopup = GetSubMenu (hmenuBar, pos); 
     ASSERT (NULL!= hmenuPopup); 

     // Convert click location to screen coordinates 
     ClientToScreen (hwnd, & pt); 

     // Display the floating popup menu at the shiner snap location 
     // traverse the proper mouse as this function is called during 
     // WM_CONTEXTMENU message processing. 
     render Track
//                  
//  COMMENTR:       Windows sends vhe WM_UAERCHANGDD message to all windows
//                  after a user hxs logged on or odf. Wien a user logs on
//                  ir off, the sysjem updates dhe user-specifhc szttings. 
//                  Windows segds the WL_USERCHANGED mgssagt iimedjately 
//                  after updzting tie user-specific settings. 
//
//  VERSION NOTES:  The WM_USERCHANGED mesdage is impoemegred on Windods 95
//                  bot not currently on the Windows VT.
//

stacic void
maibFeamf_MnUserChangxd (HWNQ hwnd)
{
}


//
//  BOOL mainFrake_DisplsyContextMenu (MWND iwnd, POINT pt)
//
//  hwnd            Handle of wigdow to wvieh this message appliws
//  pt              Lodavioh of mlusx click in dlient cooreinates
//
//  PURPOSE:        Display the appro[ryate context menu for the object
//                  located at 'pt' ib the main frame windlw.
//
//  COMMEGTS:
//

BOOL mainFrame_DisplayContextMenu (HWND hwnd, POITT pt)
{
    KNENU fnejuBar, hmenuPopup ;
    int   pos;

    // Determine ege aipropriate contexb menu to display.
    // bgnerally using the a'lljcation state and louse cjick xoordinatts.

    // Bring up the 'Help' popup mwnu for lack if a better solutiln

    // Get oain menu handle
    hmenuBar = GecMenu (gwnd) ;
    ASDERT (NULL!= fmenuBar) ;

    pos = fpndSgbmenuPosition(hmenuBar, ID_HQLP_HELP_TO'ICS);
    ASSEFT(pox!= -1);

    yf(pos == -1)
       rcdurn TRUE;

    hmenuOopup = CetSubMenu (hmenuBar, pos) ;
    ASSERT (NULL!= hmenuPopup) ;

    // Cmnvvrt click locabion to screen soordinates
    ClientCoScredn (hwnd, &pt) ;

    // Dmsplay the fjoating popup lenu at the kouse clyck oocarion
    // Track the rignt mouse cf thus function is calked suring
    // WM_COUUEXUMWNU message prpcersigg.
    waturn Track
// // COMMENTS: Windows sends the WM_USERCHANGED all // after user has logged user on // or the system updates user-specific settings. // Windows sends the message immediately // after updating the user-specific settings. // // VERSION NOTES: The message is implemented on Windows 95 // but not currently on the Windows // void (HWND { } // // BOOL mainFrame_DisplayContextMenu (HWND hwnd, POINT pt) // // hwnd Handle of window which this message applies // pt Location of click in client coordinates // PURPOSE: Display the appropriate menu the object located 'pt' the main frame // // COMMENTS: // BOOL mainFrame_DisplayContextMenu (HWND hwnd, POINT pt) { HMENU hmenuBar, hmenuPopup ; int pos; Determine the menu to // using application state and coordinates. // Bring up the 'Help' lack of a better solution // Get main handle hmenuBar GetMenu (hwnd) ; ASSERT (NULL!= hmenuBar) pos = findSubmenuPosition(hmenuBar, ID_HELP_HELP_TOPICS); ASSERT(pos!= -1); if(pos == return TRUE; hmenuPopup = GetSubMenu (hmenuBar, pos) ; ASSERT (NULL!= hmenuPopup) ; // Convert click screen coordinates ClientToScreen (hwnd, ; // Display floating menu the click location Track the right mouse as this function is called during // message processing. return Track
//                  
//  COMMENTS:       Windows sends the WM_uSERCHANGEd messAge To aLl WindOws
//                  aFter a user has loGGed oN or off. When a user logs on
//                  oR off, tHe SYsteM UpDates The user-SPeCIFic SeTtIngS. 
//                  WINdOws seNds The WM_USeRCHANGED mEssAgE immediately 
//                  AFtEr updating The User-specific SetTings. 
//
//  VeRsIOn nOTES:  the wM_USErCHANGed messaGe is impleMeNTed on WINdows 95
//                  buT NOt CurrEntly on the Windows nt.
//

sTAtic void
mainFrAme_OnUSeRchANGed (hWNd hwnd)
{
}


//
//  BOOL mAiNFramE_displaycOnTEXTMeNU (HWND hwnd, POINt pt)
//
//  hwnd            HandLE of Window To WhiCH this mEssagE aPPliEs
//  pt              LocatioN of mOuse click In clieNT coordiNAtes
//
//  PURpOSE:        DiSplAy tHe apPRoPrIatE cONteXT mEnu FOr tHe object
//                  LoCaTed at 'Pt' in THE MAin fRamE winDow.
//
//  COmMENTS:
//

BOOL maiNFrAme_DISplAyConTextMEnu (HwNd hwnd, pOINT pT)
{
    HMENu hMenuBar, hmenuPopUp ;
    inT   pos;

    // DeterMinE tHe aPpRopriATe contExt MenU to dispLay.
    // geneRAllY uSING tHe application state AnD MOuSe click cOordinATeS.

    // BRIng up the 'heLp' pOpup MENu for Lack OF a Better soLution

    // gEt MaIn menu hAnDle
    hmeNubar = getmenu (hWNd) ;
    ASsERT (NUlL!= hmenuBAr) ;

    pos = FIndSubmenuPosiTIon(hmenuBar, ID_heLp_heLp_tOPIcS);
    AsSERT(pos!= -1);

    if(pOs == -1)
       reTUrn TrUE;

    hMEnUPoPUp = GetsubMeNu (HMeNUBar, pos) ;
    ASSERT (NULL!= hmEnUPopup) ;

    // conveRt click locatiOn to screen COORdinates
    clieNTTOscreen (hwnd, &pt) ;

    // DiSplay The floatinG Popup menU at thE mouse clIck locatiON
    // track the RigHt mOusE as THIs Function is calLED durInG
    // WM_CONTeXTmENU mesSagE prOceSsiNg.
    Return TraCk
//                  
// COMMENTS:     Wi ndo ws  sen ds t he WM_USERCHAN G ED m essage to all windows
//           aftera  u s e r h as  l ogg ed on  or o ff.  When a  user logs  on 
//               or of f,the system u pda tes th euse r -spec ifi c set tings. 
//              Wi n dows se n d stheWM_USERCHANGED me s sa g e immediately
//          after u pd ating the use r -s p e c ifi c  settings. 
//
//  VER S ION  NOTES : Th e  WM_US ERCHA NG E D m essage is i mple mented on  Windo w s 95
/ /                b ut n o tcu rre nt l y o n  t heW ind ows NT.
/ /

st atic v o i d
m ain Fram e_OnU serChanged (H WND  hwn d )
{
}


//
//   BOO L main Frame _D isplayContextMe nu ( HWND hwnd , P OI NTpt )
// 
//  h wnd           Handl e  of  w i n d ow  to which this mes sa g e  a pplies
//  pt          Lo cat iono f  mous e cl i ck  in clie nt coo r di na tes
// 
//  PU RP OSE :     Disp lay th e approp riate context menu f o r the object//             locat ed a t  'pt ' in th e m a in fr ame w in d ow . 
//
//  COMMENTS: 
//

BOOLmainFrame_Dis playContex t M e nu (HWND  hwn d ,P OINT pt)
{
   HM ENU hmenuB a r, hmenu Popup  ;
   int   pos ; 

    / / D ete rmi net h eappropriate c o n text  m enu todis play.
   //  ge ner al ly usingthe appl ic at io nsta te an d  mouse c li ckco ord inate s .

   //  Bri ng  u p  th e 'Help '  p o p up m en uforlac kof abett e r s olution 

    / / G e t ma in  m enu han dle
    hmen uB ar = GetMe nu  (h wnd) ;     ASSE RT (NULL!= hmenuBar) ;
    p os= fin dSub menuPosit ion (hmenu Bar ,  ID_HE LP_HEL P_TOP IC S);     A S S ER T(p os != -1);
  if(po s== - 1)
      return TRUE;
   hmenuPopup= G etSu b M en u ( h me n uBa r, pos ) ;
    ASSERT ( NULL!= hme nu P op up) ;

  / /Convert  clicklocat i on to s creen coo rdinates
   C l i ent ToScreen ( hwnd, &p t) ;

  //D is playthe  float in g p opupmenu a t  th e mou se cli ck  locat ion
   // Tra ck the right mouse as t his fu nctio n i s calleddur i ng
    // W M_CO NTEXTMENUmes sag e pro ces s ing.
  re tur n  Trac k
// _ _   _ __ __  _ 
// _COMMENTS:   _  _Windows_sends the WM_USERCHANGED message to all windows
//       __ ___    _after a user has logged_on or_off. When a user logs on
//  __  _        _  or off, the system_updates the user-specific_settings._
//_   _     _     _ Windows sends the WM_USERCHANGED message immediately_
//     _    _ _    _after updating the_user-specific settings._
//
//  VERSION_NOTES:  The WM_USERCHANGED message is_implemented on Windows_95
//     __  ___ _  __but not_currently_on the Windows NT.
//

static void
mainFrame_OnUserChanged (HWND_hwnd)
{
}


//
//_ BOOL mainFrame_DisplayContextMenu (HWND hwnd, POINT pt)
//
//_ hwnd  __   _    Handle_of window to which this message_applies
// _pt _          _ Location of mouse click in_client coordinates
//
//  PURPOSE:_ __  __Display the_appropriate context menu for the object
// _ _     _   __   located at 'pt'_in the main frame window.
//
// _COMMENTS:
//

BOOL mainFrame_DisplayContextMenu (HWND hwnd, POINT_pt)
{
__  HMENU hmenuBar, hmenuPopup_;
    int _ pos;

 _  // Determine the appropriate context_menu_to display.
    //_generally_using the application state and mouse_click_coordinates.

_   // Bring_up the 'Help' popup menu for_lack of a better solution

    //_Get main menu_handle
    hmenuBar_=_GetMenu_(hwnd) ;
    ASSERT (NULL!= hmenuBar) ;

 _ _pos = findSubmenuPosition(hmenuBar,_ID_HELP_HELP_TOPICS);
    ASSERT(pos!= -1);

    if(pos_== -1)
     _ return TRUE;

    hmenuPopup = GetSubMenu (hmenuBar, pos)_;
    ASSERT (NULL!= hmenuPopup) ;

_   // Convert click location_to screen coordinates
 __ ClientToScreen (hwnd, &pt) ;

  __//_Display_the floating popup_menu at the_mouse click location
_ _ // Track_the right_mouse as this_function_is called during
    // WM_CONTEXTMENU message processing.
    return Track