Skip to content

Commit d1148fb

Browse files
committed
Fix designer and demos
1 parent bd8fe4e commit d1148fb

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+100
-97
lines changed

3rdParty/lua/wrapper/DMLua.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,11 @@ namespace DMLUA
7272
void enum_stack(lua_State *L);
7373
void print_error(lua_State *L, const char* fmt, ...);
7474

75+
// class helper
76+
int meta_get(lua_State* L);
77+
int meta_set(lua_State* L);
78+
void push_meta(lua_State* L, const char* name);
79+
7580
/// <summary>
7681
/// 动态类型扩展
7782
/// </summary>
@@ -807,11 +812,6 @@ namespace DMLUA
807812
return pop<RVal>(L);
808813
}
809814

810-
// class helper
811-
int meta_get(lua_State *L);
812-
int meta_set(lua_State *L);
813-
void push_meta(lua_State *L, const char* name);
814-
815815
// class init
816816
template<typename T>
817817
void class_add(lua_State* L, const char* name)

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ ADD_DEFINITIONS(-DDLL_DMMAIN)
4646
endif()
4747

4848
# 开启MT模式
49-
OPTION(USE_ALLMT_ "Compile all projects as mt" ON)
49+
OPTION(USE_ALLMT_ "Compile all projects as mt" OFF)
5050

5151

5252
# 是否开启LOG功能

DmMain/inc/Common/ActiveX/DMActiveXBase.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ namespace DM
361361
break;
362362
}
363363

364-
DMComQIPtr<IPersistStreamInit> spPSI = spControl;
364+
DMComQIPtr<IPersistStreamInit> spPSI = (DMComQIPtr<IPersistStreamInit>&)spControl;
365365
if (spPSI != NULL)
366366
{
367367
if (pStream != NULL)
@@ -390,7 +390,7 @@ namespace DM
390390
break;
391391
}
392392

393-
DMComQIPtr<IPersistStreamInit> spPSI = m_spControl;
393+
DMComQIPtr<IPersistStreamInit> spPSI = (DMComQIPtr<IPersistStreamInit>&)m_spControl;
394394
if (spPSI != NULL)
395395
{
396396
if (pStream != NULL)
@@ -435,7 +435,7 @@ namespace DM
435435
if (m_dwMiscStatus & OLEMISC_SETCLIENTSITEFIRST)
436436
{
437437
hr = spOleObject->SetClientSite(static_cast<IOleClientSite*>(this));
438-
DMComQIPtr<IOleWindow> ole_window = m_spGitControl;
438+
DMComQIPtr<IOleWindow> ole_window = (DMComQIPtr<IOleWindow>&)m_spGitControl;
439439
HWND hWnd = NULL;
440440
ole_window->GetWindow(&hWnd);
441441

@@ -477,7 +477,7 @@ namespace DM
477477
if (m_dwMiscStatus & OLEMISC_SETCLIENTSITEFIRST)
478478
{
479479
hr = m_spOleObject->SetClientSite(static_cast<IOleClientSite*>(this));
480-
DMComQIPtr<IOleWindow> ole_window = m_spControl;
480+
DMComQIPtr<IOleWindow> ole_window = (DMComQIPtr<IOleWindow>&)m_spControl;
481481
HWND hWnd = NULL;
482482
ole_window->GetWindow(&hWnd);
483483

@@ -1223,7 +1223,7 @@ namespace DM
12231223
{
12241224
// todo.
12251225
}
1226-
DMComQIPtr<IAdviseSink> advise_sink = m_spGitControl;
1226+
DMComQIPtr<IAdviseSink> advise_sink = (DMComQIPtr<IAdviseSink>&)m_spGitControl;
12271227
m_spGitOleObject->Advise(advise_sink, &m_dwOleObjSink);
12281228

12291229
if (m_spGitViewObject)
@@ -1257,7 +1257,7 @@ namespace DM
12571257
m_dwViewObjectType = 1;
12581258
}
12591259
}
1260-
DMComQIPtr<IAdviseSink> advise_sink = m_spControl;
1260+
DMComQIPtr<IAdviseSink> advise_sink = (DMComQIPtr<IAdviseSink>&)m_spControl;
12611261
m_spOleObject->Advise(advise_sink, &m_dwOleObjSink);
12621262

12631263
if (m_spViewObject)

DmMain/inc/Core/DMApp.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ namespace DM
7575
/// @param[in] bReplace true:如内部已注册,强制替换,false:如内部已注册,返回<see cref="DMREGMGR_REGISTERBYTYPE_REG_EXIST"/>
7676
/// @remark 注册函数为关键函数,为外部扩展类、插件的调用入口
7777
/// @return DMCode
78-
DMCode Register(IDMReg &&RegObj, bool bReplace=false);
78+
DMCode Register(const IDMReg &RegObj, bool bReplace=false);
7979

8080
/// -------------------------------------------------
8181
/// @brief 从注册类中获得类对象指针(内部new)

DmMain/inc/Core/DMAppData.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ namespace DM
7575
//---------------------------------------------------
7676
// Function Des: 注册类
7777
//---------------------------------------------------
78-
DMCode Register(IDMReg &RegObj, bool bReplace=false);
78+
DMCode Register(const IDMReg &RegObj, bool bReplace=false);
7979
DMCode CreateRegObj(void** ppObj, LPCSTR lpszClassName,int RegType);
8080
DMCode UnRegister(LPCSTR lpszClassName,int RegType);
8181
DMCode SetDefRegObj(LPCSTR lpszClassName,int RegType);

DmMain/inc/Core/DMRegMgr.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,14 @@ namespace DM
4444
DMRegMgr();
4545
~DMRegMgr();
4646
public:
47-
DMCode Register(IDMReg &RegObj, bool bReplace=false);
47+
DMCode Register(const IDMReg &RegObj, bool bReplace=false);
4848
DMCode CreateRegObj(void** ppObj, LPCSTR lpszClassName,int RegType);
4949
DMCode UnRegister(LPCSTR lpszClassName,int RegType);
5050
DMCode SetDefRegObj(LPCSTR lpszClassName,int RegType);
5151
DMCode GetDefRegObj(CStringA &szName,int RegType);
5252

5353
public:// 辅助
54-
DMCode RegisterByType(DMRegTypeItem &RtItem, IDMReg &RegObj, bool bReplace);
54+
DMCode RegisterByType(DMRegTypeItem &RtItem, const IDMReg &RegObj, bool bReplace);
5555
DMCode CreateRegObjByType(DMRegTypeItem &RtItem, void** ppObj, LPCSTR lpszClassName);
5656
DMCode UnRegisterByType(DMRegTypeItem &RtItem, LPCSTR lpszClassName);
5757
DMCode SetDefRegObjByType(DMRegTypeItem &RtItem, LPCSTR lpszClassName);

DmMain/inc/DmMainOutput.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@ __pragma(warning(disable: 4275))
4848
#pragma comment(lib,"msimg32.lib")
4949

5050
//#define DM_EXCLUDE_SPY 1
51-
#define DM_EXCLUDE_MUI 1
52-
#define DM_EXCLUDE_ACTIVEX 1
53-
#define DM_EXCLUDE_IE 1
51+
//#define DM_EXCLUDE_MUI 1
52+
//#define DM_EXCLUDE_ACTIVEX 1
53+
//#define DM_EXCLUDE_IE 1
5454

5555
#define dm_stricmp _stricmp
5656
#define dm_strnicmp _strnicmp

DmMain/inc/IDmMain/IDMRegT.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@ namespace DM
2727
public:
2828
virtual ~IDMReg(){}
2929
virtual PVOID NewObj() = 0; ///< 创建自身对象(NewObj)
30-
virtual IDMRegPtr Clone() = 0; ///< 复制自身
30+
virtual IDMRegPtr Clone() const = 0; ///< 复制自身
3131

3232
// 取得基于DMBase注册类的标识、父类的标识、注册类型,建议使用DMDECLARE_CLASS_NAME宏
3333
virtual LPCSTR GetClassName() = 0; ///< 取得注册类名
3434
virtual LPCSTR GetBaseClassName() = 0; ///< 取得注册类父类名
35-
virtual int GetClassType() = 0; ///< 取得注册类型
35+
virtual int GetClassType() const = 0; ///< 取得注册类型
3636
};
3737

3838
/// <summary>
@@ -50,7 +50,7 @@ namespace DM
5050
return new T;
5151
}
5252

53-
virtual IDMRegPtr Clone()
53+
virtual IDMRegPtr Clone() const
5454
{
5555
return new DMRegHelperT<T>;
5656
}
@@ -65,7 +65,7 @@ namespace DM
6565
return T::GetBaseClassName();
6666
}
6767

68-
virtual int GetClassType()
68+
virtual int GetClassType() const
6969
{
7070
return T::GetClassType(); ///注意,此处使用的是静态GetClassType,另外还有个虚GetClassType
7171
}

DmMain/inc/IDmMain/IDMRender.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ namespace DM
227227
virtual DMCode ClearRect(LPCRECT lpRect,DMColor clr) = 0;
228228

229229
virtual DMCode DrawRoundRect(LPCRECT lpRect,const POINT &pt) = 0;
230-
virtual DMCode FillRoundRect(LPCRECT lpRect,POINT &pt) = 0;
230+
virtual DMCode FillRoundRect(LPCRECT lpRect,const POINT &pt) = 0;
231231

232232
virtual DMCode DrawEllipse(LPCRECT lpRect) = 0;
233233
virtual DMCode FillEllipse(LPCRECT lpRect) = 0;

DmMain/inc/Modules/Render/DMCanvasImpl.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ namespace DM
6767
DMCode ClearRect(LPCRECT lpRect,DMColor clr);
6868

6969
DMCode DrawRoundRect(LPCRECT lpRect,const POINT &pt);
70-
DMCode FillRoundRect(LPCRECT lpRect,POINT &pt);
70+
DMCode FillRoundRect(LPCRECT lpRect,const POINT &pt);
7171

7272
DMCode DrawEllipse(LPCRECT lpRect);
7373
DMCode FillEllipse(LPCRECT lpRect);

0 commit comments

Comments
 (0)