Skip to content

Commit

Permalink
Fixed #110 can not compile under /permissive mode
Browse files Browse the repository at this point in the history
  • Loading branch information
nmgwddj committed Aug 26, 2019
1 parent 0ccc90a commit 45c5104
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tool_kits/duilib/Control/Button.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class UILIB_API ButtonTemplate : public LabelTemplate<InheritType>
template<typename InheritType>
UINT ui::ButtonTemplate<InheritType>::GetControlFlags() const
{
return IsKeyboardEnabled() && IsEnabled() ? UIFLAG_TABSTOP : UIFLAG_DEFAULT;
return this->IsKeyboardEnabled() && this->IsEnabled() ? UIFLAG_TABSTOP : UIFLAG_DEFAULT;
}

template<typename InheritType>
Expand Down
5 changes: 3 additions & 2 deletions tool_kits/duilib/Control/RichEdit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,9 @@ CTxtWinHost::~CTxtWinHost()

BOOL CTxtWinHost::Init(RichEdit *re, const CREATESTRUCT *pcs)
{
PCreateTextServices TextServicesProc = nullptr;
IUnknown *pUnk = nullptr;
HMODULE hmod = NULL;
HRESULT hr;
std::wstring edit_dll(L"msftedit.dll");
m_re = re;
Expand Down Expand Up @@ -349,7 +351,6 @@ BOOL CTxtWinHost::Init(RichEdit *re, const CREATESTRUCT *pcs)
//if(FAILED(CreateTextServices(NULL, this, &pUnk)))
// goto err;

PCreateTextServices TextServicesProc = nullptr;
//解决32位系统下跨窗口间拖拽文字在win7及win7以下系统上会出现重复的问题(64位暂不修复) lty 20170714
#if defined(_M_X64) || defined(__x86_64__)
edit_dll = L"msftedit.dll";
Expand All @@ -358,7 +359,7 @@ BOOL CTxtWinHost::Init(RichEdit *re, const CREATESTRUCT *pcs)
if (!(::GetFileAttributesW(edit_dll.c_str()) != INVALID_FILE_ATTRIBUTES))
edit_dll = L"msftedit.dll";
#endif
HMODULE hmod = LoadLibraryW(edit_dll.c_str()); //msftedit.dll
hmod = LoadLibraryW(edit_dll.c_str()); //msftedit.dll
if (hmod)
{
TextServicesProc = (PCreateTextServices)GetProcAddress(hmod,"CreateTextServices");
Expand Down

0 comments on commit 45c5104

Please sign in to comment.