4.25 beta

This commit is contained in:
Igor Pavlov
2005-08-01 00:00:00 +00:00
committed by Kornel Lesiński
parent 47f4915611
commit af1fe52701
359 changed files with 5969 additions and 9853 deletions

View File

@@ -6,6 +6,8 @@
#include "Windows/Window.h"
#include "Windows/Defs.h"
#include <commctrl.h>
namespace NWindows {
namespace NControl {

View File

@@ -9,22 +9,22 @@ extern HINSTANCE g_hInstance;
namespace NWindows {
namespace NControl {
BOOL APIENTRY DialogProcedure(HWND dialogHWND, UINT message,
static INT_PTR APIENTRY DialogProcedure(HWND dialogHWND, UINT message,
WPARAM wParam, LPARAM lParam)
{
CWindow aDialogTmp(dialogHWND);
CWindow dialogTmp(dialogHWND);
if (message == WM_INITDIALOG)
aDialogTmp.SetUserDataLongPtr(lParam);
CDialog *aDialog = (CDialog *)(aDialogTmp.GetUserDataLongPtr());
if (aDialog == NULL)
dialogTmp.SetUserDataLongPtr(lParam);
CDialog *dialog = (CDialog *)(dialogTmp.GetUserDataLongPtr());
if (dialog == NULL)
return FALSE;
if (message == WM_INITDIALOG)
aDialog->Attach(dialogHWND);
dialog->Attach(dialogHWND);
return BoolToBOOL(aDialog->OnMessage(message, wParam, lParam));
return BoolToBOOL(dialog->OnMessage(message, wParam, lParam));
}
bool CDialog::OnMessage(UINT message, UINT wParam, LPARAM lParam)
bool CDialog::OnMessage(UINT message, WPARAM wParam, LPARAM lParam)
{
switch (message)
{

View File

@@ -9,8 +9,6 @@
namespace NWindows {
namespace NControl {
BOOL APIENTRY DialogProcedure(HWND dialogHWND, UINT message, UINT wParam, LPARAM lParam);
class CDialog: public CWindow
{
public:

View File

@@ -6,6 +6,8 @@
#include "Windows/Window.h"
#include "Windows/Defs.h"
#include <commctrl.h>
namespace NWindows {
namespace NControl {

View File

@@ -7,8 +7,8 @@
namespace NWindows {
namespace NControl {
BOOL APIENTRY ProperyPageProcedure(HWND dialogHWND, UINT message,
UINT wParam, LONG lParam)
INT_PTR APIENTRY ProperyPageProcedure(HWND dialogHWND, UINT message,
WPARAM wParam, LPARAM lParam)
{
CDialog tempDialog(dialogHWND);
if (message == WM_INITDIALOG)

View File

@@ -9,7 +9,7 @@
namespace NWindows {
namespace NControl {
BOOL APIENTRY ProperyPageProcedure(HWND dialogHWND, UINT message, UINT wParam, LONG lParam);
INT_PTR APIENTRY ProperyPageProcedure(HWND dialogHWND, UINT message, WPARAM wParam, LPARAM lParam);
class CPropertyPage: public CDialog
{

9
Windows/Control/StdAfx.h Executable file
View File

@@ -0,0 +1,9 @@
// StdAfx.h
#ifndef __STDAFX_H
#define __STDAFX_H
#include "../../Common/MyWindows.h"
#include "../../Common/NewHandler.h"
#endif

View File

@@ -18,7 +18,7 @@ static LRESULT CALLBACK WindowProcedure(HWND aHWND, UINT message,
LONG_PTR(((LPCREATESTRUCT)lParam)->lpCreateParams));
CWindow2 *window = (CWindow2*)(tempWindow.GetUserDataLongPtr());
if (window == NULL)
return FALSE;
return DefWindowProc(aHWND, message, wParam, lParam);
if (message == WM_NCCREATE)
window->Attach(aHWND);
if (window == 0)
@@ -55,7 +55,7 @@ bool CWindow2::CreateEx(DWORD exStyle, LPCTSTR className,
idOrHMenu, instance, this);
}
LRESULT CWindow2::OnMessage(UINT message, UINT wParam, LPARAM lParam)
LRESULT CWindow2::OnMessage(UINT message, WPARAM wParam, LPARAM lParam)
{
LRESULT result;
switch (message)

View File

@@ -331,7 +331,7 @@ bool MyGetFullPathName(LPCTSTR fileName, CSysString &resultPath,
if (fileNamePointer == 0)
fileNamePartStartIndex = lstrlen(fileName);
else
fileNamePartStartIndex = fileNamePointer - buffer;
fileNamePartStartIndex = (int)(fileNamePointer - buffer);
return true;
}
@@ -470,7 +470,7 @@ bool MySearchPath(LPCTSTR path, LPCTSTR fileName, LPCTSTR extension,
LPTSTR filePartPointer;
DWORD value = ::SearchPath(path, fileName, extension,
MAX_PATH, resultPath.GetBuffer(MAX_PATH), &filePartPointer);
filePart = filePartPointer - (LPCTSTR)resultPath;
filePart = (UINT32)(filePartPointer - (LPCTSTR)resultPath);
resultPath.ReleaseBuffer();
if (value == 0 || value > MAX_PATH)
return false;

View File

@@ -1,4 +1,4 @@
// Windows/FileIO.cpp
// Windows/FileMapping.cpp
#include "StdAfx.h"

View File

@@ -38,13 +38,13 @@ static void ConvertNETRESOURCEToCResource(const NETRESOURCE &netResource,
SetComplexString(resource.ProviderIsDefined, resource.Provider, netResource.lpProvider);
}
static void SetComplexString2(LPCTSTR &destString, bool defined,
const CSysString &srsString)
static void SetComplexString2(LPTSTR *destString, bool defined,
const CSysString &srcString)
{
if (defined)
destString = srsString;
*destString = (TCHAR *)(const TCHAR *)srcString;
else
destString = 0;
*destString = 0;
}
static void ConvertCResourceToNETRESOURCE(const CResource &resource,
@@ -54,10 +54,10 @@ static void ConvertCResourceToNETRESOURCE(const CResource &resource,
netResource.dwType = resource.Type;
netResource.dwDisplayType = resource.DisplayType;
netResource.dwUsage = resource.Usage;
SetComplexString2(netResource.lpLocalName, resource.LocalNameIsDefined, resource.LocalName);
SetComplexString2(netResource.lpRemoteName, resource.RemoteNameIsDefined, resource.RemoteName);
SetComplexString2(netResource.lpComment, resource.CommentIsDefined, resource.Comment);
SetComplexString2(netResource.lpProvider, resource.ProviderIsDefined, resource.Provider);
SetComplexString2(&netResource.lpLocalName, resource.LocalNameIsDefined, resource.LocalName);
SetComplexString2(&netResource.lpRemoteName, resource.RemoteNameIsDefined, resource.RemoteName);
SetComplexString2(&netResource.lpComment, resource.CommentIsDefined, resource.Comment);
SetComplexString2(&netResource.lpProvider, resource.ProviderIsDefined, resource.Provider);
}
DWORD CEnum::Open(DWORD scope, DWORD type, DWORD usage,

View File

@@ -3,9 +3,13 @@
#ifndef __WINDOWS_SHELL_H
#define __WINDOWS_SHELL_H
#include <windows.h>
#include <shlobj.h>
#include "Common/String.h"
#include "Windows/Defs.h"
namespace NWindows{
namespace NShell{

View File

@@ -4,5 +4,6 @@
#define __STDAFX_H
#include "../Common/MyWindows.h"
#include "../Common/NewHandler.h"
#endif

View File

@@ -102,9 +102,9 @@ public:
LONG_PTR GetLong(int index) const
{ return ::GetWindowLong(_window, index ); }
LONG_PTR SetUserDataLong(LONG_PTR newLongPtr )
{ return SetLong(GWL_USERDATA, newLongPtr); }
{ return SetLong(GWLP_USERDATA, newLongPtr); }
LONG_PTR GetUserDataLong() const
{ return GetLong(GWL_USERDATA); }
{ return GetLong(GWLP_USERDATA); }
#ifndef _WIN32_WCE
LONG_PTR SetLongPtr(int index, LONG_PTR newLongPtr )