source: trunk/Include/Classes/ActiveBasic/Windows/Windows.ab@ 303

Last change on this file since 303 was 303, checked in by イグトランス (egtra), 17 years ago

フルコンパイルでのミスあぶり出し。註:修正は全て@300や@301以前に行われた。

File size: 1.3 KB
Line 
1'Classes/ActiveBasic/Windows/Windows.ab
2
3Namespace ActiveBasic
4Namespace Windows
5
6Function GetPathFromIDList(pidl As LPITEMIDLIST) As String
7 Dim buf[ELM(MAX_PATH)] As TCHAR
8 If SHGetPathFromIDList(pidl, buf) Then
9 Return New String(buf)
10 Else
11 Return ""
12 End If
13End Function
14
15Function GetFolderPath(hwnd As HWND, folder As Long) As String
16 Dim pidl As LPITEMIDLIST
17 Dim hr = SHGetSpecialFolderLocation(hwnd, folder, pidl)
18 If SUCCEEDED(hr) Then
19 GetFolderPath = GetPathFromIDList(pidl)
20 CoTaskMemFree(pidl)
21 Else
22 GetFolderPath = ""
23 End If
24End Function
25
26Function GetFolderPath(folder As Long) As String
27 Return GetFolderPath(0, folder)
28End Function
29/*
30Function MessageBox(hw As HWND, s As PCSTR, t As PCSTR, b As DWord) As DWord
31 Return MessageBoxA(hw, s, t, b)
32End Function
33
34Function MessageBox(hw As HWND, s As PCWSTR, t As PCWSTR, b As DWord) As DWord
35 Return MessageBoxW(hw, s, t, b)
36End Function
37*/
38
39Namespace Detail
40Function _System_MessageBox(hw As HWND, s As PCSTR, t As PCSTR, b As DWord) As DWord
41 Return MessageBoxA(hw, s, t, b)
42End Function
43
44Function _System_MessageBox(hw As HWND, s As PCWSTR, t As PCWSTR, b As DWord) As DWord
45 Return MessageBoxW(hw, s, t, b)
46End Function
47End Namespace
48
49End Namespace 'Widnows
50End Namespace 'ActiveBasic
Note: See TracBrowser for help on using the repository browser.