wstatbar.c

Go to the documentation of this file.
00001 
00002 /* Copyright (C) 1998-2002 Chancelier Jean-Philippe */
00003 /*********************************************
00004  *   STATBAR.C -- Status bar helper functions.
00005  *              (c) Paul Yao, 1996
00006  * Modifications for Scilab 
00007  *   Jean-Philipe Chancelier (1997)
00008  *   Bugs and mail : Scilab@inria.fr 
00009  *********************************************/
00010 
00011 
00012 #ifndef STRICT
00013 #define STRICT
00014 #endif
00015 #include <windows.h>
00016 #include <windowsx.h>
00017 #include <commdlg.h>
00018 #include <commctrl.h>
00019 
00020 #include "Messages.h"
00021 #include "Warnings.h"
00022 #include "Errors.h"
00023 
00024 
00025 typedef struct tagPOPUPSTRING
00026   {
00027     HMENU hMenu;
00028     UINT uiString;
00029   }
00030 POPUPSTRING;
00031 
00032 #define MAX_MENUS 5
00033 
00034 static POPUPSTRING popstr[MAX_MENUS];
00035 
00036 DWORD dwStatusBarStyles = WS_CHILD | WS_VISIBLE |
00037 WS_CLIPSIBLINGS | CCS_BOTTOM |
00038 SBARS_SIZEGRIP;
00039 
00040 
00041 /*-------------------------------------------------------------------*/
00042 
00043 HWND 
00044 InitStatusBar (HWND hwndParent)
00045 {
00046   HWND hwndSB;
00047   /* Initialize values for WM_MENUSELECT message handling */
00048   hwndSB = CreateStatusWindow (dwStatusBarStyles,
00049                                MSG_SCIMSG55,
00050                                hwndParent,
00051                                2);
00052   return hwndSB;
00053 }
00054 
00055 /**********************************
00056  * Not used XXXXX to be finished 
00057  * GADGET in PETZOLD 
00058  ********************************/
00059 
00060 LRESULT
00061 Statusbar_MenuSelect (HWND hwnd, WPARAM wParam, LPARAM lParam)
00062 {
00063   UINT fuFlags = (UINT) HIWORD (wParam);
00064   HMENU hMainMenu = NULL;
00065   int iMenu = 0;
00066   /* Handle non-system popup menu descriptions. */
00067   if ((fuFlags & MF_POPUP) &&
00068       (!(fuFlags & MF_SYSMENU)))
00069     {
00070       for (iMenu = 1; iMenu < MAX_MENUS; iMenu++)
00071         {
00072           if ((HMENU) lParam == popstr[iMenu].hMenu)
00073             {
00074               hMainMenu = (HMENU) lParam;
00075               break;
00076             }
00077         }
00078     }
00079 
00080   /* Display helpful text in status bar
00081      MenuHelp (WM_MENUSELECT, wParam, lParam, hMainMenu, hInst, 
00082      hwndStatusBar, (UINT *) &popstr[iMenu]) ;
00083    */
00084   return 0;
00085 }

Generated on Sun Mar 4 15:03:55 2007 for Scilab [trunk] by  doxygen 1.5.1