lafe @ ウィキ
メニュー

作成したソフトウェア






プログラムtip



合計: -
今日: -
昨日: -


TEMP


※上記の広告は60日以上更新のないWIKIに表示されています。更新することで広告が下部へ移動します。


#if 0	//\\ こっちはscriptタグを追加する
				CComPtr<IHTMLElement>	spScriptElm;
				spDoc->createElement(CComBSTR(L"script"), &spScriptElm);
				if (spScriptElm == nullptr)
					return NULL;
 
				CComQIPtr<IHTMLScriptElement>	spScript = spScriptElm;
				spScript->put_type(CComBSTR(L"text/javascript"));
				spScript->put_text(CComBSTR(strFile));
 
 
				CComPtr<IHTMLElement>	spBodyElm;
				spDoc->get_body(&spBodyElm);
				CComQIPtr<IHTMLDOMNode>	spBodyNode = spBodyElm;
				if (spBodyNode == nullptr)
					return NULL;
				CComQIPtr<IHTMLDOMNode>	spScriptNode = spScript;
				CComPtr<IHTMLDOMNode>	sptempNode;
				spBodyNode->appendChild(spScriptNode, &sptempNode);
				TRACEIN(_T("javascript追加 正常終了!"));
				return NULL;
#endif
 

#ifdef DEBUG	// メニューのデバッグ
	CMenuHandle menu = hMenuSub;
	ATLTRACE(_T("メニュー開始↓↓↓↓↓↓↓↓↓↓↓\n"));
	for (int i = 0; i < menu.GetMenuItemCount(); ++i) {
		CString strText;
		menu.GetMenuString(i, strText, MF_BYPOSITION);
		UINT uCmdID = menu.GetMenuItemID(i);
		if (uCmdID == 0) { strText = _T("――――――"); }
		ATLTRACE(_T("%s : %d\n"), strText, uCmdID);
	}
	ATLTRACE(_T("メニュー終了↑↑↑↑↑↑↑↑↑↑↑\n\n"));
#endif
 

/**
 *	@file	TabCtrl.h
 *	@brief	MTL : タブ制御
 */
////////////////////////////////////////////////////////////////////////////
// MTL Version 0.10
// Copyright (C) 2001 MB<mb2@geocities.co.jp>
// All rights unreserved.
//
// This file is a part of Mb Template Library.
// The code and information is *NOT* provided "as-is" without
// warranty of any kind, either expressed or implied.
//
// TabCtrl.h: Last updated: February 12, 2001
/////////////////////////////////////////////////////////////////////////////
 
// April 10, 2004 minit added some
 
#pragma once

#include <vector>
#include "DropDownButton.h"
//#include "atltheme_d.h"
#include "option/SkinOption.h"
#include "DonutPFunc.h"
//スキン切り替えとかの機能を入れたので移植性とかかなり損なわれてます。
//ごめんなさい(minit)
 
 
 
/////////////////////////////////////////////////////////////////////////////
// CTabButton
 
// CTabButton state flags
enum ETcistate {
	TCISTATE_HIDDEN 			= 0x01,
	// standard text state
	TCISTATE_ENABLED			= 0x02,
	TCISTATE_INACTIVE			= 0x04,
	// select or not
	TCISTATE_SELECTED			= 0x08, 	// ordianry selected
	TCISTATE_MSELECTED			= 0x10, 	// multi-selected
	// event state
	TCISTATE_PRESSED			= 0x20, 	// mouse pressed
	TCISTATE_HOT				= 0x40, 	// mouse above item
	TCISTATE_MOUSEAWAYCAPTURED	= 0x80, 	// mouse away but captured
};
 
 
 
 
 
 
/////////////////////////////////////////////////////////////////////////////
// CTabCtrl2 - MTL implementation of Tab Ctrl2
 
template <class T, class TBase = CWindow, class TWinTraits = CControlWinTraits>
class ATL_NO_VTABLE CTabCtrl2Impl
	: public CDoubleBufferWindowImpl< T, TBase, TWinTraits >
	, public CTrackMouseLeave<CTabCtrl2Impl< T, TBase, TWinTraits > >
	, public CThemeImpl<CTabCtrl2Impl< T, TBase, TWinTraits > >
{
public:
	DECLARE_WND_CLASS_EX(NULL, CS_DBLCLKS, -1)
 
private:
	typedef CTabCtrl2Impl< T, TBase, TWinTraits >	thisClass;
 
public:
	// Constants
	enum _TabCtrl2DrawConstants {
		s_kcxTextMargin = 7,
		s_kcyTextMargin = 3,
		s_kcxGap		= 2,
		s_kcyGap		= 2,
		s_kcxSeparator	= 2,
 
		s_kcxUpDown 	= 28,
		s_kcyUpDown 	= 14
	};
 
private:
	enum {
		_nMaxMenuItemTextLength = 100,
	};
 
	// Data members
public:
	CImageList			m_imgs;
 
private:
	DWORD				m_dwTabCtrl2ExtendedStyle;	// TabCtrl2 specific extended styles
 
	bool				m_bLockRefreshBandInfo;		// trueで描写を抑制する
	int 				m_nDrawStyle;
	unique_ptr<CTabSkin> m_pTabSkin;
 
 
protected:
	// Constructor/destructor
	CTabCtrl2Impl();
 
 
	bool	_FindIndexFromCurMultiSelected(int nIndex);
	void	_ResetMultiSelectedItems();
 
	void	_DoPaint(CDCHandle dc, LPCRECT lpRect = NULL);
 
 
	void	_SetDrawStyle(int nStyle);
	void	_ReloadSkinData();
 
	void	_ReplaceFavicon(int nIndex, HICON hIcon);
 
private:
	// Overridables
	void	OnSetCurSel(int nIndex) { }
	CString OnGetToolTipText(int nIndex);
	void	OnDropDownButton() { }
 
 
public:
	// Attributes
	DWORD	GetTabCtrl2ExtendedStyle() const { return m_dwTabCtrl2ExtendedStyle; }
 
	void	SetItemSize(const CSize &size);
	CSize	GetItemSize() { return m_sizeItem; }
 
	void	ModifyTabCtrl2ExtendedStyle(DWORD dwRemove, DWORD dwAdd);
 
	void	ReloadSkin(int nStyle);
 
	bool	InsertItem(int nIndex, const CTabCtrlItem &item);
 
	void	DeleteItems(CSimpleArray<int> &arrSrcs);
 
	bool	MoveItems(int nDestIndex, CSimpleArray<int> &arrSrcs);
 
 
	bool	SetItemText(int nIndex, const CString &str);
	bool	SetItemImageIndex(int nIndex, int nImgIndex);
	bool	SetItemInactive(int nIndex);
	bool	SetItemActive(int nIndex);
	bool	SetItemDisabled(int nIndex);
	bool	SetItemEnabled(int nIndex);
 
	// CTabCtrlItem
	const CRect& GetItemRect(int nIndex) const { return m_items.at(nIndex).m_rcItem; }
 
 
protected:
	bool	SetItemUserData(int nIndex, DWORD_PTR dwUser);
 
	bool	GetItem(int nIndex, CTabCtrlItem &item);
 
	CTabCtrlItem& GetItem(int nIndex) { return m_items.at(nIndex); }
 
public:
	bool	GetItemText(int nIndex, CString &str);
	bool	GetItemImageIndex(int nIndex, int &nImgIndex);
	bool	GetItemUserData(int nIndex, DWORD_PTR &dwData);
	bool	GetItemState(int nIndex, BYTE &bytData);
	bool	GetItemRect(int nIndex, CRect &rc);
 
	int		GetFirstVisibleIndex();
	int		GetLastVisibleIndex();
 
	bool	AddItem(const CTabCtrlItem &item);
 
	bool	DeleteItem(int nIndex, bool bMoveNow = false);
 
 
public:
 
	bool	CanScrollItem(bool bRight = true) const;
	bool	ScrollItem(bool bRight = true);
 
 
	// Overrides
	void	OnTrackMouseMove(UINT nFlags, CPoint pt);
	void	OnTrackMouseLeave();
	void	DoPaint(CDCHandle dc);
 
public:
	// Message map and handlers
	BEGIN_MSG_MAP( CTabCtrl2Impl )
		COMMAND_ID_HANDLER( COMMAND_ID_DROPBUTTON,OnPushDropButton	)
		MESSAGE_HANDLER( WM_WINDOWPOSCHANGING,OnWindowPosChanging )
		MESSAGE_HANDLER( WM_LBUTTONDOWN 	, OnLButtonDown 	)
		MESSAGE_HANDLER( WM_LBUTTONUP		, OnLButtonUp		)
		NOTIFY_CODE_HANDLER( UDN_DELTAPOS	, OnDeltaPos		)
		REFLECT_NOTIFICATIONS( )
	END_MSG_MAP( )
 
 
	LRESULT OnPushDropButton(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL &bHandled);
	LRESULT OnDeltaPos(int /*idCtrl*/, LPNMHDR pnmh, BOOL &bHandled);
	LRESULT OnWindowPosChanging(UINT /*uMsg*/, WPARAM wParam, LPARAM lParam, BOOL &bHandled);
 
	bool _MustBeInvalidateOnMultiLine(CSize size);
 
	LRESULT OnLButtonDown(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled);
	LRESULT OnLButtonUp(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled);
 
private:
 
	void	_DrawSeparators(CDCHandle dc, LPCRECT lpRect = NULL);
 
};
 
 
 
 
//////////////////////////////////////////////////////////////////////
// CTabCtrl2Impl
 
template <class T, class TBase, class TWinTraits>
CTabCtrl2Impl<T, TBase, TWinTraits>::CTabCtrl2Impl()
	: m_dwTabCtrl2ExtendedStyle(TAB2_EX_TRANSPARENT | TAB2_EX_SUPPORTREBAR)
	, m_nFirstIndexOnSingleLine(0)
	, m_sizeItem(200, 50)
	, m_nHotIndex(-1)
	, m_nPressedIndex(-1)
	, m_bLockRefreshBandInfo(false)
	, m_nDrawStyle(SKN_TAB_STYLE_DEFAULT)
{
	SetThemeClassList(L"TAB");
}
 
 
 
template <class T, class TBase, class TWinTraits>
bool	CTabCtrl2Impl<T, TBase, TWinTraits>::_FindIndexFromCurMultiSelected(int nIndex)
{
	CSimpleArray<int> arrCurMultiSel;
	GetCurMultiSel(arrCurMultiSel, false);
 
	if (arrCurMultiSel.Find(nIndex) != -1)
		return true;
 
	return false;
}
 
 
// Attributes
 
 
template <class T, class TBase, class TWinTraits>
void	CTabCtrl2Impl<T, TBase, TWinTraits>::ModifyTabCtrl2ExtendedStyle(DWORD dwRemove, DWORD dwAdd)
{
	DWORD dwOldStyle = m_dwTabCtrl2ExtendedStyle;
 
	m_dwTabCtrl2ExtendedStyle = (m_dwTabCtrl2ExtendedStyle & ~dwRemove) | dwAdd;
 
	if (dwOldStyle != m_dwTabCtrl2ExtendedStyle) {
		m_nFirstIndexOnSingleLine = 0;
		_UpdateLayout();
	}
 
	if ( (dwOldStyle & TAB2_EX_ANCHORCOLOR) != (m_dwTabCtrl2ExtendedStyle & TAB2_EX_ANCHORCOLOR) )
		Invalidate();
}
 
 
template <class T, class TBase, class TWinTraits>
bool	CTabCtrl2Impl<T, TBase, TWinTraits>::SetItemText(int nIndex, const CString &str)
{
	if ( !_IsValidIndex(nIndex) )
		return false;
 
	if (m_items[nIndex].m_strItem == str)
		return true;
 
	m_items[nIndex].m_strItem = str;
 
	if (m_dwTabCtrl2ExtendedStyle & TAB2_EX_FIXEDSIZE) {
		InvalidateRect(m_items[nIndex].m_rcItem);
		UpdateWindow();
	} else {
		InvalidateRect(m_items[nIndex].m_rcItem);	// even if layout will not be changed
		_UpdateLayout();							//_UpdateItems(nIndex);
	}
 
	return true;
}
 
 
template <class T, class TBase, class TWinTraits>
bool	CTabCtrl2Impl<T, TBase, TWinTraits>::SetItemDisabled(int nIndex)
{
	if ( !_IsValidIndex(nIndex) )
		return false;
 
	if ( m_items[nIndex].ModifyState(TCISTATE_ENABLED, 0) ) {
		InvalidateRect(m_items[nIndex].m_rcItem);
		return true;
	}
 
	return false;
}
 
 
template <class T, class TBase, class TWinTraits>
bool	CTabCtrl2Impl<T, TBase, TWinTraits>::SetItemEnabled(int nIndex)
{
	if ( !_IsValidIndex(nIndex) )
		return false;
 
	if ( m_items[nIndex].ModifyState(0, TCISTATE_ENABLED) ) {
		InvalidateRect(m_items[nIndex].m_rcItem);
		return true;
	}
 
	return false;
}
 
template <class T, class TBase, class TWinTraits>
bool	CTabCtrl2Impl<T, TBase, TWinTraits>::SetItemUserData(int nIndex, DWORD_PTR dwUser)
{
	if ( !_IsValidIndex(nIndex) )
		return false;
 
	m_items[nIndex].m_dwUser = m_dwUser;
	return true;
}
 
 
template <class T, class TBase, class TWinTraits>
bool	CTabCtrl2Impl<T, TBase, TWinTraits>::GetItem(int nIndex, CTabCtrlItem &item)
{
	if ( !_IsValidIndex(nIndex) )
		return false;
 
	item = m_items[nIndex];
	return true;
}
 
template <class T, class TBase, class TWinTraits>
bool	CTabCtrl2Impl<T, TBase, TWinTraits>::GetItemText(int nIndex, CString &str)
{
	if ( !_IsValidIndex(nIndex) )
		return false;
 
	str = m_items[nIndex].m_strItem;
	return true;
}
 
 
template <class T, class TBase, class TWinTraits>
bool	CTabCtrl2Impl<T, TBase, TWinTraits>::GetItemImageIndex(int nIndex, int &nImgIndex)
{
	if ( !_IsValidIndex(nIndex) )
		return false;
 
	nImgIndex = m_items[nIndex].m_nImgIndex;
	return true;
}
 
 
template <class T, class TBase, class TWinTraits>
bool	CTabCtrl2Impl<T, TBase, TWinTraits>::GetItemUserData(int nIndex, DWORD_PTR &dwData)
{
	if ( !_IsValidIndex(nIndex) )
		return false;
 
	dwData = m_items[nIndex].m_dwUser;
	return true;
}
 
 
template <class T, class TBase, class TWinTraits>
bool	CTabCtrl2Impl<T, TBase, TWinTraits>::GetItemState(int nIndex, BYTE &bytData)
{
	if ( !_IsValidIndex(nIndex) )
		return false;
 
	bytData = m_items[nIndex].m_fsState;
	return true;
}
 
template <class T, class TBase, class TWinTraits>
bool	CTabCtrl2Impl<T, TBase, TWinTraits>::GetItemRect(int nIndex, CRect &rc)
{
	if ( !_IsValidIndex(nIndex) )
		return false;
 
	if (!(m_dwTabCtrl2ExtendedStyle & TAB2_EX_MULTILINE) && nIndex < m_nFirstIndexOnSingleLine)
		return false;
 
	rc = m_items[nIndex].m_rcItem;
	return true;
}
 
 
 
template <class T, class TBase, class TWinTraits>
bool	CTabCtrl2Impl<T, TBase, TWinTraits>::_MustBeInvalidateOnMultiLine(CSize size)
{
	CRect rc;  GetClientRect(rc);		//*+++
 
	if (rc.Width() < size.cx)	// expanding
		return true;
 
	int   cxLeft = 0;
 
	for (int i = 0; i < m_items.size(); ++i) {
		cxLeft = max(m_items[i].m_rcItem.right, cxLeft);
	}
 
	if (cxLeft != 0 && cxLeft < size.cx) {
		return false;
	} else {
		return true;
	}
}
 
 
 
template <class T, class TBase, class TWinTraits>
LRESULT	CTabCtrl2Impl<T, TBase, TWinTraits>::OnLButtonDown(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
{
	TCTRACE( _T("OnLButtonDown\n") );
	POINT pt	 = { GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam) };
 
	int   nIndex = HitTest(pt);
 
	if (nIndex != -1) {
		ATLASSERT( _IsValidIndex(nIndex) );
 
		if ( (wParam & MK_CONTROL) && GetCurSel() != nIndex ) {
			if ( !_FindIndexFromCurMultiSelected(nIndex) ) {
				if ( m_items[nIndex].ModifyState(TCISTATE_SELECTED, TCISTATE_MSELECTED) )
					InvalidateRect(m_items[nIndex].m_rcItem);
			} else {
				if ( m_items[nIndex].ModifyState(TCISTATE_MSELECTED, 0) )
					InvalidateRect(m_items[nIndex].m_rcItem);
			}
		} else {
			_PressItem(nIndex);
			SetCapture();
		}
	}
 
	return 0;
}
 
template <class T, class TBase, class TWinTraits>
LRESULT	CTabCtrl2Impl<T, TBase, TWinTraits>::OnLButtonUp(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
{
	TCTRACE( _T("OnLButtonUp\n") );
	POINT pt = { GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam) };
 
	if (GetCapture() == m_hWnd) {
		ReleaseCapture();
 
		int nIndex = HitTest(pt);
 
		if (nIndex != -1 && nIndex == m_nPressedIndex) {
			TCTRACE( _T(" change current selelected item\n") );
			ATLASSERT( _IsValidIndex(nIndex) );
			_PressItem();	// always clean up pressed flag
			SetCurSel(nIndex, true);
			NMHDR nmhdr = { m_hWnd, GetDlgCtrlID(), TCN_SELCHANGE };
			::SendMessage(GetParent(), WM_NOTIFY, (WPARAM) GetDlgCtrlID(), (LPARAM) &nmhdr);
		} else {
			_PressItem();	// always clean up pressed flag
		}
	}
 
	return 0;
}
 
 
// Implementation
 
 
template <class T, class TBase, class TWinTraits>
void	CTabCtrl2Impl<T, TBase, TWinTraits>::_DrawSeparators(CDCHandle dc, LPCRECT lpRect)
{
	int   cy = GetItemHeight();
	CRect rect(lpRect);
 
	for (int i = 0; i < m_arrSeparators.GetSize(); ++i) {
		CPoint &pt = m_arrSeparators[i];
		CRect	rc(pt.x, pt.y + 2, pt.x + 2, pt.y + cy - 2);
 
		if ( lpRect == NULL || MtlIsCrossRect(rc, lpRect) ) {
			dc.DrawEdge(rc, EDGE_ETCHED, BF_LEFT);	// draw separator line
		}
	}
}
 
 
 


/**
 *	@file	stdafx.h
 *	@brief	include file for standard system include files,
 *			 or project specific include files that are used frequently, but
 *			are changed infrequently
 */
 
#if !defined (AFX_STDAFX_H__19D42987_EAF8_11D3_BD32_96A992FCCD39__INCLUDED_)
#define 	  AFX_STDAFX_H__19D42987_EAF8_11D3_BD32_96A992FCCD39__INCLUDED_

 
#if 1	//+++	デバッグ用
 #define USE_ZEROFILL_NEW				//+++ 手抜きで 0 クリアをする new を使う. まだはずさないほうがよさそう...
 //#define USE_DLMALLOC
 //#define USE_ORG_UNDONUT_INI			//+++ unDonut+ から変わってしまった .ini や拡張プロパティの値をなるべく、オリジナルのunDonutにあわせる場合に定義.
 //#define USE_MEMORYLOG 				//+++ donutでのnew,deleteログ生成.
 //#define USE_ATL3_BASE_HOSTEX			//+++ about:blankがらみのバグのデバッグで用意. 突き止めたのでatl3用以外で定義する必要なし.
 //x #define USE_UNDONUT_G_SRC 			//+++ gae氏のunDonut_g 2006-08-05 の公開ソースより移植した部分を有効にしてみる.(お試し) ...デフォルトで反映しとくのでラベルは破棄.
 #ifndef NDEBUG
  //#define _CRTDBG_MAP_ALLOC 			//+++ 定義するとVCライブラリによるmalloc系のチェック強化...
  //#define USE_ATLDBGMEM				//+++ atldbgmem.h を使う場合... ※include,マクロの依存関係の都合、現状、regexは使用できない状態.
 #endif
#endif

// Change these values to use different versions
#ifdef WIN64	//+++ 64ビット版win は winXp64以降のみに対応.
#define WINVER					0x0502
#define _WIN32_WINNT			0x0502
#define _WIN32_IE				0x0603					//+++ _WIN32_IE_IE60SP2
#define _RICHEDIT_VER			0x0100					//+++ 0x200以上(3?)で十分だが、なんとなく
#define DONUT_NAME				_T("64unDonut")
#define DONUT_WND_CLASS_NAME	_T("WTL:") DONUT_NAME	//+++ 名前かえるとプラグインとかスクリプトでマズイ?
#else		   //+++ 一応、win9xの範囲 //\\2000以降に変更
#define WINVER					0x0502
#define _WIN32_WINNT			0x0502	// XP
#define _WIN32_IE				0x0603
#define _RICHEDIT_VER			0x0100
#define DONUT_NAME				_T("unDonut")
#ifdef NDEBUG
 #define DONUT_WND_CLASS_NAME	_T("WTL:Donut") 		//+++ 名前かえるとプラグインとかスクリプトでマズイ?
#else
 #define DONUT_WND_CLASS_NAME	_T("WTL::Donut_DEBUG")
#endif
#endif

#define ATL_TRACE_CATEGORY		0x00000001
#define ATL_TRACE_LEVEL 		4
#define _WTL_USE_CSTRING
#define _WTL_FORWARD_DECLARE_CSTRING
#define _ATL_USE_CSTRING_FLOAT
#define _CRT_NON_CONFORMING_SWPRINTFS
//#define _ATL_FREE_THREADED
//#define _ATL_SINGLE_THREADED
#define _ATL_APARTMENT_THREADED

#if _ATL_VER < 0x800
#define ATLASSUME(e)			ATLASSERT(e)
#endif

 
// unDonut と unDonut+(mod) との非互換部分の切り替え
#ifdef USE_ORG_UNDONUT_INI								//+++ unDonut r13testの記述.
#define STR_ADDRESS_BAR 		_T("AddresBar")
#define STR_ENABLE				_T("Enabel")
#else													//+++ unDonut+ より変更(typo修正された)
#define STR_ADDRESS_BAR 		_T("AddressBar")
#define STR_ENABLE				_T("Enable")
#endif

 
#if 0
#define _CRTDBG_MAP_ALLOC
#include <stdlib.h>
#include <crtdbg.h>
#endif

// Win32API
#include <windows.h>

#ifdef USE_DLMALLOC	//+++ new,deleteにdlmallocを用いてみる. 
 #undef 	_CRTDBG_MAP_ALLOC	// cランタイムなデバッグ関係は使えない
 #undef 	USE_ATLDBGMEM		// atlのメモリデバッグ関係は使えない...
 #define 	USE_DL_PREFIX		// 本物のmalloc,freeの置換は大変なので、dlmalloc名のまま使う.
 #include 	"dlmalloc.h"
  #if 0 //def USE_DLMALLOC
   #define 	malloc 		dlmalloc
   #define 	calloc 		dlcalloc
   #define 	realloc 	dlrealloc
   #define 	free 		dlfree
 #endif
#endif

#if 1	//+++ メモリー+デバッグの辻褄あわせ等
 #include <new>
 #if defined NDEBUG == 0 && defined USE_ATL3_BASE_HOSTEX == 0
  #if defined USE_ATLDBGMEM
   //#define _ATL_NO_TRACK_HEAP
   #include <atldbgmem.h>
  #endif
  #ifdef _CRTDBG_MAP_ALLOC
   #include <malloc.h>
   #include <crtdbg.h>
  #endif
 #pragma push_macro("new")
 #undef  new
 #include <xdebug>
 #include <xmemory>
 #include <xlocale>
 #pragma pop_macro("new")
 #endif
#endif

 
//C Standard Library
#include <math.h>
#include <stdio.h>
#include <stdlib.h>

//#include <string.h>
#include <locale.h>
#include <process.h>
#include <ctype.h>
#include <stdarg.h>
#include <tchar.h>
#include <time.h>
//#include <io.h>
 
//STL(C++ Standard Library)
#include <vector>
#include <list>
#include <queue>
#include <deque>
#include <stack>
#include <algorithm>
//#include <functional>
#include <boost/function.hpp>
#include <utility>
#include <iterator>
#include <map>
#include <memory>

using std::vector;
using std::deque;
using std::pair;
using std::make_pair;
using boost::function;
//using namespace std::placeholders;
using std::unique_ptr;
 
#define DBG_M() 		ErrorLogPrintf(_T("%s (%d)\n"), __FILE__, __LINE__)

#ifdef USE_DLMALLOC
#define _recalloc		recalloc
inline void* recalloc(void* p, size_t a, size_t b) { void* q = realloc(p,a*b); if (q) memset(q, 0, a*b); return q; }
#endif

//ATL/WTL
#include <atlbase.h>
#include <atlapp.h>

extern CServerAppModule _Module;						//アプリケーションインスタンス
extern TCHAR			g_szIniFileName[MAX_PATH];		//設定ファイル
 
#include <atlcom.h>

 
#if _ATL_VER < 0x700 && defined(USE_ATL3_BASE_HOSTEX) == 0
#define USE_ATL3_BASE_HOSTEX
#endif

#if defined USE_ATL3_BASE_HOSTEX == 0	/*_ATL_VER >= 0x700*/	//+++
//#include "AtlifaceEx.h"	//+++ すでに不要のよう?.
//#include "AtlifaceEx_i.c" //+++ すでに不要のよう?.
//#include <AtlHost.h>
//#include "AtlHostEx.h"
#else
#endif

#include <atlwin.h>
#include <atlctl.h>
#include <atlmisc.h>
#include <atlframe.h>

//\\#include "WtlFixed/atlsplit.h"
#include <atlsplit.h>
#include <atlctrls.h>
#include <atlctrlw.h>
#include <atlctrlx.h>

#include <atldlgs.h>
#include <atlctrlx.h>
#include <atlcrack.h>
#include <atlddx.h>
#include <atldef.h>
//#include <atlsync.h>
 
// etc
#include <winerror.h>
#include <winnls32.h>
#include <comdef.h>
//#include <exdisp.h>
//#include <guiddef.h>
//#include <olectl.h>
//#include <rpc.h>
//#include <rpcndr.h>
//#include <rpcproxy.h>
//#include <urlmon.h>
 
#ifndef  WM_THEMECHANGED
 #define WM_THEMECHANGED	0x031A
#endif

//非XPでも動作するように動的リンクするようにした改造版ヘッダ
#if _MSC_VER >= 1500	//+++ メモ:undonutで使うWTL80側を改造したのでこちらを使ってもok.
						//+++ だが、ヘッダがそろってないとダメなようなんで、手抜きでコンパイラバージョンで切り替え
#define _WTL_USE_VSSYM32
#include <atltheme.h>
#else					//+++ 古いコンパイラ用...だが、こっちのほうがサイズ小さくなるかも...
#include "WtlFixed/atltheme_d.h"
#endif

//+++ Aero を使ってみるテスト.
#ifdef USE_AERO
#include <atldwm.h>
#endif

//IEコンポーネントで使う定義
#include <shlobj.h>
#include <wininet.h>
#include <shlwapi.h>
//#include <shlguid.h>
#include <intshcut.h>
#include <MsHTML.h>
#include <mshtmdid.h>
#include <mshtmcid.h>
#include <MsHtmHst.h>
#include <mshtml.h>
#include <tlogstg.h>
#include <urlhist.h>

 
#ifndef USE_DIET	//XML用
//+++ 使うのはMSXML2の範囲?のようだし、xp64,vista64 には msxml3.dllがでデフォで入っているようなので、3にしてみる.
//#import "msxml4.dll" named_guids	//raw_interfaces_only
#import "msxml3.dll" named_guids	//raw_interfaces_only
using namespace MSXML2;
#endif

//+++ 手抜きで 0 クリアをする new を用意.
//メモリリーク確認用のnew/deleteオーバーロード
#if defined USE_ATLDBGMEM
#define DEBUG_NEW	new(__FILE__, __LINE__)
#elif (defined USE_ZEROFILL_NEW) || (defined USE_MEMORYLOG && defined _DEBUG)
void *operator	new(size_t t);
void *operator	new[] (size_t t);
void operator	delete(void *p);
void operator	delete[] (void *p);
//#undef USE_MEMORYLOG
#endif

#if 0 //defined _DEBUG && defined _CRTDBG_MAP_ALLOC
void* operator	new(size_t sz, const char* fname, unsigned line);
void* operator	new[](size_t sz, const char* fname, unsigned line);
void  operator	delete(void* p, const char* fname, unsigned line);
void  operator	delete[](void* p, const char* fname, unsigned line);
#endif

#include "dbg_wm.h"

#include "DonutPFunc.h"
#include "DonutDefine.h"
#include "Misc.h"
#include "dialog/DebugWindow.h"

#ifdef USE_ATL3_BASE_HOSTEX/*_ATL_VER < 0x700*/ //+++
#include "for_atl3/AtlifaceEx.h"
#include "for_atl3/AtlHostEx_for_atl3.h"
#endif

 
#undef min
#undef max
using std::min;
using std::max;
 
#if _ATL_VER < 0x700
namespace std {
template<typename T> inline const T min(const T& a, const T& b) { return a < b; }
template<typename T> inline const T max(const T& a, const T& b) { return b < a; }
}
#endif

 
 
 
 
#if defined _M_IX86
  #pragma comment(linker, "/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"")
#elif defined _M_IA64
  #pragma comment(linker, "/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='ia64' publicKeyToken='6595b64144ccf1df' language='*'\"")
#elif defined _M_X64
  #pragma comment(linker, "/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df' language='*'\"")
#else
  #pragma comment(linker, "/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")
#endif

 
 
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ は前行の直前に追加の宣言を挿入します。
#endif	// !defined(AFX_STDAFX_H__19D42987_EAF8_11D3_BD32_96A992FCCD39__INCLUDED_)

 
何かあれば【 こちら 】まで問い合わせください

更新履歴

取得中です。