/[winpt]/trunk/Include/wptW32API.h
ViewVC logotype

Diff of /trunk/Include/wptW32API.h

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

revision 151 by twoaday, Wed Jan 18 11:53:10 2006 UTC revision 204 by twoaday, Wed Apr 26 06:37:23 2006 UTC
# Line 21  Line 21 
21  #ifndef WPT_W32_API_H  #ifndef WPT_W32_API_H
22  #define WPT_W32_API_H  #define WPT_W32_API_H
23    
24    /* Macros to change the cursor */
25    #define op_begin()  SetCursor (LoadCursor (NULL, IDC_WAIT))
26    #define op_end()    SetCursor (LoadCursor (NULL, IDC_ARROW))
27    
28  #include "wptCrypto.h"  #include "wptCrypto.h"
29  #include "wptUtil.h"  #include "wptUtil.h"
30    
# Line 35  int mapi_send_pubkey (const char *keyid, Line 39  int mapi_send_pubkey (const char *keyid,
39  int mapi_send_ascfile (char *ascfile);  int mapi_send_ascfile (char *ascfile);
40  void mapi_deinit (void);  void mapi_deinit (void);
41    
42    /*-- wptSafeEditCtrl.cpp --*/
43    UINT SafeGetDlgItemText (HWND dlg, int id, char *buf, int buflen);
44    void safe_edit_control_init (HWND dlg, int ctlid);
45    void safe_edit_control_free (HWND dlg, int ctlid);
46    
47  /*-- wptW32API.cpp --*/  /*-- wptW32API.cpp --*/
48  char* make_filename (const char *path, const char *file, const char *ext);  char* make_filename (const char *path, const char *file, const char *ext);
49  char* make_special_filename (int folder, const char *file, const char *ext);  char* make_special_filename (int folder, const char *file, const char *ext);
# Line 51  void center_window (HWND hwndChild, HWND Line 60  void center_window (HWND hwndChild, HWND
60  void center_window2 (HWND hwndChild, HWND parent, HWND style);  void center_window2 (HWND hwndChild, HWND parent, HWND style);
61  void force_foreground_window (HWND dlg, int msecs);  void force_foreground_window (HWND dlg, int msecs);
62    
63    void insert_menu_item (HMENU hm, int by_pos, UINT m_id, const char *text);
64  void set_menu_text (HMENU menu, UINT m_uid, const char *text);  void set_menu_text (HMENU menu, UINT m_uid, const char *text);
65  void set_menu_text_bypos (HMENU menu, UINT pos, const char *text);  void set_menu_text_bypos (HMENU menu, UINT pos, const char *text);
66  void set_menu_state (HMENU menu, UINT m_uid, UINT state);  void set_menu_state (HMENU menu, UINT m_uid, UINT state);
# Line 71  const char * get_folder_dlg( HWND hwnd, Line 81  const char * get_folder_dlg( HWND hwnd,
81  char * m_strdup (const char *str);  char * m_strdup (const char *str);
82  const char * strtimestamp (long timestamp);  const char * strtimestamp (long timestamp);
83  const char* get_locale_date (long tm_t, char *buf, DWORD buflen);  const char* get_locale_date (long tm_t, char *buf, DWORD buflen);
84    int get_temp_name (char *buf, DWORD buflen, const char *name);
85    
86    void SetWindowText_utf8 (HWND hwnd, const char *txt);
87    void SetDlgItemText_utf8 (HWND dlg, int id, const char *txt);
88    int GetDlgItemText_utf8 (HWND dlg, int id, char **r_txt);
89    
90  #define listbox_add_string(lb, string) \  #define listbox_add_string(lb, string) \
91      SendMessage( (lb), LB_ADDSTRING, 0, (LPARAM)(LPCSTR)(string) )      SendMessage( (lb), LB_ADDSTRING, 0, (LPARAM)(LPCSTR)(string) )
# Line 88  const char* get_locale_date (long tm_t, Line 102  const char* get_locale_date (long tm_t,
102  #ifdef _MSC_VER  #ifdef _MSC_VER
103  #include <htmlhelp.h>  #include <htmlhelp.h>
104    
 /* Support for the new html context sentensive help. For  
    now it can be only used with native W32 compilers. */  
105  #define html_help_init(cookie) \  #define html_help_init(cookie) \
106      HtmlHelp (NULL, NULL, HH_INITIALIZE, (DWORD)(cookie))      HtmlHelp (NULL, NULL, HH_INITIALIZE, (DWORD)(cookie))
107    
108  #define html_help_deinit() \  #define html_help_deinit(cookie) \
109      HtmlHelp (NULL, NULL, HH_UNINITIALIZE, 0)      HtmlHelp (NULL, NULL, HH_UNINITIALIZE, (DWORD)(cookie))
110    
111  #define html_help_dispatch(param, file, helparr) do { \  #define html_help_dispatch(param, file, helparr) do { \
112      HELPINFO *inf; \      HELPINFO *inf; \
# Line 105  const char* get_locale_date (long tm_t, Line 117  const char* get_locale_date (long tm_t,
117      } while (0)      } while (0)
118  #else  #else
119  #define html_help_init(cookie) do {} while (0)  #define html_help_init(cookie) do {} while (0)
120  #define html_help_deinit() do {} while (0)  #define html_help_deinit(cookie) do { (cookie) = 0; } while (0)
121  #define html_help_dispatch(param, file, helparr) do {} while (0)  #define html_help_dispatch(param, file, helparr) do {} while (0)
122  #endif  #endif
123    

Legend:
Removed from v.151  
changed lines
  Added in v.204

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26