/[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 2 by twoaday, Mon Jan 31 11:02:21 2005 UTC revision 22 by twoaday, Wed Aug 10 11:33:35 2005 UTC
# Line 33  Line 33 
33  #include "wptTypes.h"  #include "wptTypes.h"
34    
35    
36    extern "C" void _SHFree (void *p);
37    
38  /*  /*
39   * The the text of a menu item.   * The the text of a menu item.
40   */   */
# Line 122  get_folder_dlg (HWND hwnd, const char * Line 124  get_folder_dlg (HWND hwnd, const char *
124      il = SHBrowseForFolder (&bi);      il = SHBrowseForFolder (&bi);
125      if (il) {      if (il) {
126          SHGetPathFromIDList (il, folder);          SHGetPathFromIDList (il, folder);
127            _SHFree (il);
128          return folder;          return folder;
129      }      }
130      return NULL;      return NULL;
# Line 325  int Line 328  int
328  dialog_box_param( HINSTANCE hinst, LPCTSTR name, HWND parent, DLGPROC fnc,  dialog_box_param( HINSTANCE hinst, LPCTSTR name, HWND parent, DLGPROC fnc,
329                                    LPARAM param, LPCTSTR title, int title_id )                                    LPARAM param, LPCTSTR title, int title_id )
330  {  {
331  #ifndef LANG_DE      #ifndef LANG_DE
332      if( FindWindowEx( GetDesktopWindow(), NULL, NULL, title ) )      if( FindWindowEx( GetDesktopWindow(), NULL, NULL, title ) )
333          return -1;                return -1;      
334  #else      #else
335      char strdesc[256];      char strdesc[256];
336      LoadString( glob_hinst, title_id, strdesc, sizeof (strdesc) -1 );      LoadString( glob_hinst, title_id, strdesc, sizeof (strdesc) -1 );
337      if( FindWindowEx( GetDesktopWindow(), NULL, NULL, strdesc ) )      if( FindWindowEx( GetDesktopWindow(), NULL, NULL, strdesc ) )
338          return -1;          return -1;
339  #endif      #endif
340            
341      return DialogBoxParam( hinst, name, parent, fnc, param );      return DialogBoxParam( hinst, name, parent, fnc, param );
342  } /* dialog_box_param */  } /* dialog_box_param */
# Line 383  window_reminder( struct reminder_ctx_s * Line 386  window_reminder( struct reminder_ctx_s *
386    
387    
388  char *  char *
389  m_strdup( const char *str )  m_strdup (const char *str)
390  {  {
391      char * p = new char[strlen( str ) + 1];      char * p = new char[strlen (str) + 1];
392      if( p )      if (p)
393          strcpy( p, str );          strcpy (p, str);
394      return p;      return p;
395  } /* m_strdup */  } /* m_strdup */
396    
# Line 428  center_window2 (HWND hwndChild, HWND sty Line 431  center_window2 (HWND hwndChild, HWND sty
431      if (style == HWND_TOPMOST || style == HWND_NOTOPMOST)      if (style == HWND_TOPMOST || style == HWND_NOTOPMOST)
432          flags = SWP_NOMOVE | SWP_NOSIZE;          flags = SWP_NOMOVE | SWP_NOSIZE;
433      SetWindowPos (hwndChild, style? style : NULL, xNew, yNew, 0, 0, flags);      SetWindowPos (hwndChild, style? style : NULL, xNew, yNew, 0, 0, flags);
                     
434  }  }
435    
436    

Legend:
Removed from v.2  
changed lines
  Added in v.22

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26