Merge commit 'origin/master'
[versaplex.git] / vxodbc / dlg_wingui.cc
blobb71698add2a1d0a6f69422355d83da4da668cddc
1 #ifdef WIN32
2 /*
3 * Description: This module contains any specific code for handling
4 * dialog boxes such as driver/datasource options. Both the
5 * ConfigDSN() and the SQLDriverConnect() functions use
6 * functions in this module. If you were to add a new option
7 * to any dialog box, you would most likely only have to change
8 * things in here rather than in 2 separate places as before.
9 */
10 /* Multibyte support Eiji Tokuya 2001-03-15 */
12 #include "dlg_specific.h"
13 #include "win_setup.h"
15 #include "convert.h"
17 #include "multibyte.h"
18 #include "pgapifunc.h"
20 extern GLOBAL_VALUES globals;
22 extern HINSTANCE NEAR s_hModule;
24 void SetDlgStuff(HWND hdlg, const ConnInfo * ci)
27 * If driver attribute NOT present, then set the datasource name
29 SetDlgItemText(hdlg, IDC_DSNAME, ci->dsn);
30 SetDlgItemText(hdlg, IDC_DATABASE, ci->database);
31 SetDlgItemText(hdlg, IDC_SERVER, ci->server);
32 SetDlgItemText(hdlg, IDC_USER, ci->username);
33 SetDlgItemText(hdlg, IDC_PASSWORD, ci->password);
34 SetDlgItemText(hdlg, IDC_PORT, ci->port);
38 void GetDlgStuff(HWND hdlg, ConnInfo * ci)
40 GetDlgItemText(hdlg, IDC_DATABASE, ci->database,
41 sizeof(ci->database));
42 GetDlgItemText(hdlg, IDC_SERVER, ci->server, sizeof(ci->server));
43 GetDlgItemText(hdlg, IDC_USER, ci->username, sizeof(ci->username));
44 GetDlgItemText(hdlg, IDC_PASSWORD, ci->password,
45 sizeof(ci->password));
46 GetDlgItemText(hdlg, IDC_PORT, ci->port, sizeof(ci->port));
49 #endif /* WIN32 */