/[winpt]/trunk/Src/wptW32API.cpp
ViewVC logotype

Diff of /trunk/Src/wptW32API.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 190 by twoaday, Mon Mar 27 10:05:14 2006 UTC revision 193 by twoaday, Sat Apr 1 12:36:35 2006 UTC
# Line 41  Line 41 
41  extern "C" void _SHFree (void *p);  extern "C" void _SHFree (void *p);
42    
43    
44    
45    /* Insert a new item into the menu @hm at position @pos. */
46    void
47    insert_menu_item (HMENU hm, int pos, UINT m_id, const char *text)
48    {
49        MENUITEMINFO mi;
50    
51        memset (&mi, 0, sizeof mi);
52        mi.cbSize = sizeof mi;
53        mi.fType = MF_STRING;
54        mi.dwTypeData = (char *)text;
55        mi.cch = strlen (text);
56        mi.wID = m_id;
57        mi.fMask = MIIM_ID|MIIM_DATA| MIIM_TYPE;
58        InsertMenuItem (hm, pos, FALSE, &mi);
59    }
60    
61    
62  static void  static void
63  set_menu_text_ext (HMENU menu, int by_pos, int m_uid, const char *text)  set_menu_text_ext (HMENU menu, int by_pos, int m_uid, const char *text)
64  {  {
# Line 108  enum { Line 126  enum {
126     id can be either FILE_OPEN or FILE_SAVE.     id can be either FILE_OPEN or FILE_SAVE.
127     The return value is the file name or NULL if cancel was chosen. */     The return value is the file name or NULL if cancel was chosen. */
128  const char *  const char *
129  get_filename_dlg (HWND hwnd, int id, const char * title,  get_filename_dlg (HWND hwnd, int id, const char *title,
130                    const char * filter, const char * name)                    const char *filter, const char *name)
131  {  {
132      static char file[512] = "";      static char file[512] = "";
133      OPENFILENAME open;      OPENFILENAME open;

Legend:
Removed from v.190  
changed lines
  Added in v.193

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26