1
2
3
4 package org.sirius.server.win32.classes;
5
6 import javax.jws.WebService;
7
8 import com.sun.jna.Pointer;
9 import com.sun.jna.platform.win32.WinDef.HWND;
10
11
12
13
14
15 @WebService
16 public class Dialog extends Common {
17
18
19
20
21 public Dialog() {
22
23 }
24
25
26
27
28
29 public final long getDialogBaseUnits() {
30 return this.getDlg32().GetDialogBaseUnits();
31 }
32
33
34
35
36
37
38 public final int getDlgCtrlID(final long hWnd) {
39 HWND handle = this.longToHwnd(hWnd);
40 return this.getDlg32().GetDlgCtrlID(handle);
41 }
42
43
44
45
46
47
48
49 public final long getDlgItem(final long hWnd, final int itemId) {
50 HWND handle = this.longToHwnd(hWnd);
51 return Pointer.nativeValue(this.getDlg32().GetDlgItem(handle, itemId)
52 .getPointer());
53 }
54
55
56
57
58
59
60
61
62
63 public final int getDlgItemInt(final long hWnd, final int itemId,
64 final boolean pbool, final boolean flag2) {
65 HWND handle = this.longToHwnd(hWnd);
66 return this.getDlg32().GetDlgItemInt(handle, itemId, pbool, flag2);
67 }
68
69
70
71
72
73
74
75 public final String getDlgItemTextA(final long hWnd, final int itemId) {
76 HWND handle = this.longToHwnd(hWnd);
77
78 int length = 255;
79 char[] buf = new char[length];
80
81 getDlg32().GetDlgItemTextA(handle, itemId, buf, length);
82 String text = String.valueOf(buf).trim();
83 return text;
84 }
85
86
87
88
89
90
91
92 public final int isDlgButtonChecked(final long hWnd, final int itemId) {
93 HWND handle = this.longToHwnd(hWnd);
94 return getDlg32().IsDlgButtonChecked(handle, itemId);
95 }
96
97
98
99
100
101
102
103
104
105 public final boolean setDlgItemInt(final long hWnd, final int itenId,
106 final int intValue, final boolean flag) {
107 HWND handle = this.longToHwnd(hWnd);
108 return getDlg32().SetDlgItemInt(handle, itenId, intValue, flag);
109 }
110
111
112
113
114
115
116
117
118 public final boolean setDlgItemText(final long hWnd, final int itemId,
119 final String text) {
120 HWND handle = this.longToHwnd(hWnd);
121 return getDlg32().SetDlgItemTextA(handle, itemId, text.toCharArray());
122 }
123
124 }