fix some gcc 4.2 compilation problems and warnings

svn path=/trunk/; revision=25528
This commit is contained in:
Christoph von Wittich 2007-01-19 09:26:20 +00:00
parent fa8f26e7c6
commit a356a76c21
10 changed files with 36 additions and 25 deletions

View file

@ -149,14 +149,16 @@ MainFrameBase::MainFrameBase(HWND hwnd)
rbBand.cyMaxChild = 0;
rbBand.cyIntegral = btn_hgt;
rbBand.lpText = TEXT("Toolbar");
TCHAR ToolBarText[] = _T("Toolbar");
rbBand.lpText = ToolBarText;
rbBand.hwndChild = _htoolbar;
rbBand.cxMinChild = 0;
rbBand.cyMinChild = btn_hgt + 4;
rbBand.cx = 182;
SendMessage(_hwndrebar, RB_INSERTBAND, (WPARAM)-1, (LPARAM)&rbBand);
rbBand.lpText = TEXT("Address");
TCHAR AddressText[] = _T("Address");
rbBand.lpText = AddressText;
rbBand.hwndChild = _haddressedit;
rbBand.cxMinChild = 0;
rbBand.cyMinChild = btn_hgt - 2;

View file

@ -25,6 +25,10 @@
// Martin Fuchs, 23.07.2003
//
// STL headers for strings and streams
#include <string>
#include <iostream>
using namespace std;
// standard windows headers
#define WIN32_LEAN_AND_MEAN
@ -155,11 +159,6 @@ BOOL exists_path(LPCTSTR path);
#pragma warning(disable: 4786) // disable warnings about too long debug information symbols
#endif
// STL headers for strings and streams
#include <string>
#include <iostream>
using namespace std;
// containers
#include <map>
#include <set>

View file

@ -133,7 +133,7 @@ void BrowserNavigator::goto_url(LPCTSTR url)
else {
_new_url = url;
_browser->Navigate(L"about:blank", NULL, NULL, NULL, NULL);
_browser->Navigate(BStr(L"about:blank"), NULL, NULL, NULL, NULL);
}
}

View file

@ -107,15 +107,18 @@ FindProgramDlg::FindProgramDlg(HWND hwnd)
LV_COLUMN column = {LVCF_FMT|LVCF_WIDTH|LVCF_TEXT, LVCFMT_LEFT, 250};
column.pszText = _T("Name");
TCHAR lvColName[] = _T("Name");
column.pszText = lvColName;
ListView_InsertColumn(_list_ctrl, 0, &column);
column.cx = 300;
column.pszText = _T("Path");
TCHAR lvColPath[] = _T("Path");
column.pszText = lvColPath;
ListView_InsertColumn(_list_ctrl, 1, &column);
column.cx = 400;
column.pszText = _T("Menu Path");
TCHAR lvColMenuPath[] = _T("Menu Path");
column.pszText = lvColMenuPath;
ListView_InsertColumn(_list_ctrl, 2, &column);
ListView_SetExtendedListViewStyleEx(_list_ctrl, LVS_EX_FULLROWSELECT, LVS_EX_FULLROWSELECT);

View file

@ -865,7 +865,8 @@ MDIMainFrame::MDIMainFrame(HWND hwnd)
#endif
rbBand.fStyle = RBBS_CHILDEDGE|RBBS_GRIPPERALWAYS|RBBS_HIDETITLE;
rbBand.lpText = TEXT("Extras");
TCHAR ExtrasBand[] = _T("Extras");
rbBand.lpText = ExtrasBand;
rbBand.hwndChild = _hextrabar;
rbBand.cxMinChild = 0;
rbBand.cyMinChild = btn_hgt;
@ -874,7 +875,8 @@ MDIMainFrame::MDIMainFrame(HWND hwnd)
#ifndef _NO_WIN_FS
rbBand.fStyle |= RBBS_BREAK;
rbBand.lpText = TEXT("Drives");
TCHAR DrivesBand[] = _T("Drives");
rbBand.lpText = DrivesBand;
rbBand.hwndChild = _hdrivebar;
rbBand.cxMinChild = 0;
rbBand.cyMinChild = btn_hgt;

View file

@ -230,12 +230,14 @@ void NtObjDirectory::read_directory(int scan_flags)
if (info->name.string_ptr) {
info->name.string_ptr[info->name.string_len / sizeof(WCHAR)] = 0;
} else {
info->name.string_ptr = TEXT("");
TCHAR empty_string_ptr[] = _T("");
info->name.string_ptr = empty_string_ptr;
}
if (info->type.string_ptr) {
info->type.string_ptr[info->type.string_len / sizeof(WCHAR)] = 0;
} else {
info->type.string_ptr = TEXT("");
TCHAR empty_string_ptr[] = _T("");
info->type.string_ptr = empty_string_ptr;
}
lstrcpynW(p, info->name.string_ptr, COUNTOF(buffer));
#else

View file

@ -133,7 +133,7 @@ void BrowserNavigator::goto_url(LPCTSTR url)
else {
_new_url = url;
_browser->Navigate(L"about:blank", NULL, NULL, NULL, NULL);
_browser->Navigate(BStr(L"about:blank"), NULL, NULL, NULL, NULL);
}
}

View file

@ -148,13 +148,15 @@ LRESULT DesktopBar::Init(LPCREATESTRUCT pcs)
rbBand.cxMinChild = rbBand.cyIntegral * 3;
rbBand.fStyle = RBBS_VARIABLEHEIGHT|RBBS_GRIPPERALWAYS|RBBS_HIDETITLE;
rbBand.lpText = TEXT("Quicklaunch");
TCHAR QuickLaunchBand[] = _T("Quicklaunch");
rbBand.lpText = QuickLaunchBand;
rbBand.hwndChild = _hwndQuickLaunch;
rbBand.cx = 250;
rbBand.wID = IDW_QUICKLAUNCHBAR;
SendMessage(_hwndrebar, RB_INSERTBAND, (WPARAM)-1, (LPARAM)&rbBand);
rbBand.lpText = TEXT("Taskbar");
TCHAR TaskbarBand[] = _T("Taskbar");
rbBand.lpText = TaskbarBand;
rbBand.hwndChild = _hwndTaskBar;
rbBand.cx = 200; //pcs->cx-_taskbar_pos-quicklaunch_width-(notifyarea_width+1);
rbBand.wID = IDW_TASKTOOLBAR;

View file

@ -26,6 +26,12 @@
//
// STL headers for strings and streams
#include <string>
#include <iostream>
using namespace std;
// standard windows headers
#define WIN32_LEAN_AND_MEAN
#define WIN32_EXTRA_LEAN
@ -194,11 +200,6 @@ BOOL exists_path(LPCTSTR path);
#pragma warning(disable: 4786) // disable warnings about too long debug information symbols
#endif
// STL headers for strings and streams
#include <string>
#include <iostream>
using namespace std;
// containers
#include <map>
#include <set>

View file

@ -123,8 +123,8 @@ extern "C" {
#endif /* __GNUC__/__WATCOMC__ */
#define MAKEWORD(a,b) ((WORD)(((BYTE)(a))|(((WORD)((BYTE)(b)))<<8)))
#define MAKELONG(a,b) ((LONG)(((WORD)(a))|(((DWORD)((WORD)(b)))<<16)))
#define LOWORD(l) ((WORD)((DWORD)(l)))
#define HIWORD(l) ((WORD)(((DWORD)(l)>>16)&0xFFFF))
#define LOWORD(l) ((WORD)((DWORD_PTR)(l)))
#define HIWORD(l) ((WORD)(((DWORD_PTR)(l)>>16)&0xFFFF))
#define LOBYTE(w) ((BYTE)(w))
#define HIBYTE(w) ((BYTE)(((WORD)(w)>>8)&0xFF))