Fixed #110 can not compile under /permissive mode

This commit is contained in:
jiajia_deng 2019-08-26 09:52:10 +08:00
parent 0ccc90ac94
commit 45c5104ce0
2 changed files with 4 additions and 3 deletions

View File

@ -27,7 +27,7 @@ public:
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>

View File

@ -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;
@ -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";
@ -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");