mirror of
https://github.com/reactos/reactos.git
synced 2024-07-01 10:20:03 +00:00
[EXPLORER]
- Use set_cpp instead of hand-coding all the parameters - Use comutil.h and link with comsupp unconditionally, since we now have them - Use STLPort-compatible filebuf constructor for TCHAR iostreams - Fix a few MSVC and GCC 4.7 errors/warnings svn path=/trunk/; revision=58224
This commit is contained in:
parent
9f6d7cdd67
commit
94bb4b7aaf
|
@ -1,15 +1,11 @@
|
|||
|
||||
add_subdirectory(notifyhook)
|
||||
|
||||
#NOTE : explorer doesn't follow standard c++, and so doesn't compile with stlport headers
|
||||
#I'm not willing to do it if explorer_new is hanging around.
|
||||
#jgardou
|
||||
#set_cpp()
|
||||
set_cpp()
|
||||
|
||||
add_definitions(
|
||||
-DWIN32
|
||||
-D__WINDRES__
|
||||
-DUNICODE -D_UNICODE)
|
||||
-D__WINDRES__)
|
||||
|
||||
#add_pch(explorer precomp.h)
|
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
@ -51,20 +47,10 @@ list(APPEND SOURCE
|
|||
utility/shellbrowserimpl.cpp) # utility/shelltests.cpp
|
||||
|
||||
add_executable(explorer ${SOURCE})
|
||||
set_subsystem(explorer windows)
|
||||
set_entrypoint(explorer wWinMainCRTStartup)
|
||||
|
||||
target_link_libraries(explorer
|
||||
-lsupc++
|
||||
-lstdc++
|
||||
-lgcc
|
||||
-lmingwex
|
||||
-lmingw32
|
||||
wine
|
||||
uuid)
|
||||
target_link_libraries(explorer comsupp wine uuid)
|
||||
set_module_type(explorer win32gui UNICODE)
|
||||
|
||||
add_importlibs(explorer advapi32 gdi32 user32 ws2_32 msimg32 comctl32 ole32 oleaut32 shell32 shlwapi notifyhook msvcrt kernel32 ntdll)
|
||||
set_image_base(explorer 0x00400000)
|
||||
add_dependencies(explorer psdk)
|
||||
add_cd_file(TARGET explorer DESTINATION reactos FOR all)
|
||||
add_cd_file(FILE ${CMAKE_CURRENT_SOURCE_DIR}/explorer-cfg-template.xml DESTINATION reactos FOR all)
|
||||
|
|
|
@ -235,8 +235,9 @@ void Desktops::ToggleMinimize()
|
|||
if (minimized.empty()) {
|
||||
EnumWindows(MinimizeDesktopEnumFct, (LPARAM)&minimized);
|
||||
} else {
|
||||
for(list<MinimizeStruct>::const_reverse_iterator it=minimized.rbegin();
|
||||
it!=minimized.rend(); ++it) {
|
||||
const list<MinimizeStruct>& cminimized = minimized;
|
||||
for(list<MinimizeStruct>::const_reverse_iterator it=cminimized.rbegin();
|
||||
it!=cminimized.rend(); ++it) {
|
||||
ShowWindowAsync(it->first, it->second&WS_MAXIMIZE? SW_MAXIMIZE: SW_RESTORE);
|
||||
Sleep(20);
|
||||
}
|
||||
|
|
|
@ -141,7 +141,8 @@ public:
|
|||
/* [out][in] */ DWORD __RPC_FAR *pdwEffect)
|
||||
{
|
||||
TVHITTESTINFO hit;
|
||||
hit.pt = (POINT&)pt;
|
||||
hit.pt.x = pt.x;
|
||||
hit.pt.y = pt.y;
|
||||
ScreenToClient(m_hTargetWnd, &hit.pt);
|
||||
hit.flags = TVHT_ONITEM;
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
|
||||
#include "resource.h"
|
||||
|
||||
//#include <locale.h> // for setlocale()
|
||||
#include <locale.h> // for setlocale()
|
||||
|
||||
#include <wincon.h>
|
||||
|
||||
|
|
|
@ -33,20 +33,7 @@
|
|||
#include "webchild.h"
|
||||
|
||||
|
||||
#ifdef _MSC_VER
|
||||
|
||||
#if _MSC_VER>=1300 // vtMissing for VS.Net
|
||||
#include <comutil.h>
|
||||
#pragma comment(lib, "comsupp")
|
||||
#endif
|
||||
|
||||
#else
|
||||
|
||||
#ifdef __MINGW32__ // MinGW is lacking vtMissing (as of 07.02.2004)
|
||||
static Variant vtMissing;
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
//#include <mshtml.h>
|
||||
|
||||
|
|
|
@ -1874,7 +1874,7 @@ void StartMenuRoot::CloseStartMenu(int id)
|
|||
|
||||
bool StartMenuRoot::IsStartMenuVisible() const
|
||||
{
|
||||
return IsWindowVisible(_hwnd);
|
||||
return IsWindowVisible(_hwnd) != FALSE;
|
||||
}
|
||||
|
||||
void StartMenuRoot::ProcessKey(int vk)
|
||||
|
|
|
@ -61,7 +61,8 @@ public:
|
|||
/* [out][in] */ DWORD __RPC_FAR *pdwEffect)
|
||||
{
|
||||
TVHITTESTINFO hit;
|
||||
hit.pt = (POINT&)pt;
|
||||
hit.pt.x = pt.x;
|
||||
hit.pt.y = pt.y;
|
||||
ScreenToClient(m_hTargetWnd, &hit.pt);
|
||||
hit.flags = TVHT_ONITEM;
|
||||
HTREEITEM hItem = TreeView_HitTest(m_hTargetWnd,&hit);
|
||||
|
|
|
@ -53,7 +53,7 @@
|
|||
//#include <malloc.h> // for alloca()
|
||||
#include <assert.h>
|
||||
//#include <stdlib.h> // for _MAX_DIR, ...
|
||||
//#include <stdio.h> // for sprintf()
|
||||
#include <stdio.h> // for sprintf()
|
||||
//#include <time.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
|
@ -548,11 +548,15 @@ struct tifstream : public std::istream, FileHolder
|
|||
#ifdef __GNUC__
|
||||
_buf(_pfile, std::ios::in)
|
||||
#else
|
||||
_buf(_pfile)
|
||||
_buf()
|
||||
#endif
|
||||
{
|
||||
if (!_pfile)
|
||||
setstate(badbit);
|
||||
#ifdef _MSC_VER
|
||||
else
|
||||
_buf.open(fileno(_pfile));
|
||||
#endif
|
||||
}
|
||||
|
||||
protected:
|
||||
|
@ -570,11 +574,15 @@ struct tofstream : public std::ostream, FileHolder
|
|||
#ifdef __GNUC__
|
||||
_buf(_pfile, std::ios::out)
|
||||
#else
|
||||
_buf(_pfile)
|
||||
_buf()
|
||||
#endif
|
||||
{
|
||||
if (!_pfile)
|
||||
setstate(badbit);
|
||||
#ifdef _MSC_VER
|
||||
else
|
||||
_buf.open(fileno(_pfile));
|
||||
#endif
|
||||
}
|
||||
|
||||
~tofstream()
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
#define _COM_MEMCPY_S(dest,destsize,src,count) memcpy(dest,src,count)
|
||||
|
||||
/* Use of wsprintf might be impossible, if strsafe.h is included. */
|
||||
#ifndef __STDC_SECURE_LIB__
|
||||
#if !defined(__STDC_SECURE_LIB__) || defined(__REACTOS__)
|
||||
#define _COM_PRINTF_S_1(dest,destsize,format,arg1) wsprintf(dest,format,arg1)
|
||||
#elif defined(UNICODE)
|
||||
#define _COM_PRINTF_S_1(dest,destsize,format,arg1) swprintf_s(dest,destsize,format,arg1)
|
||||
|
|
Loading…
Reference in a new issue