mirror of
https://github.com/chibicitiberiu/rainmeter-studio.git
synced 2024-02-24 04:33:31 +00:00
Change NULL to nullptr
This commit is contained in:
@ -27,7 +27,7 @@ void CreateControls(const Control* cts, UINT ctCount, HWND parent, HFONT font, G
|
||||
{
|
||||
const Control& ct = cts[i];
|
||||
|
||||
WCHAR* text = ct.textId ? getString(ct.textId) : NULL;
|
||||
WCHAR* text = ct.textId ? getString(ct.textId) : nullptr;
|
||||
|
||||
RECT r = { ct.x, ct.y, ct.w, ct.h };
|
||||
MapDialogRect(parent, &r);
|
||||
@ -40,8 +40,8 @@ void CreateControls(const Control* cts, UINT ctCount, HWND parent, HFONT font, G
|
||||
r.left, r.top, r.right, r.bottom,
|
||||
parent,
|
||||
(HMENU)ct.id,
|
||||
NULL,
|
||||
NULL);
|
||||
nullptr,
|
||||
nullptr);
|
||||
SendMessage(wnd, WM_SETFONT, (WPARAM)font, FALSE);
|
||||
}
|
||||
}
|
||||
|
@ -20,7 +20,7 @@
|
||||
#include <Commctrl.h>
|
||||
#include <Uxtheme.h>
|
||||
|
||||
HWND Dialog::c_ActiveDialogWindow = NULL;
|
||||
HWND Dialog::c_ActiveDialogWindow = nullptr;
|
||||
|
||||
//
|
||||
// BaseDialog
|
||||
@ -88,11 +88,11 @@ void BaseDialog::Show(const WCHAR* title, short x, short y, short w, short h, DW
|
||||
|
||||
if (modeless)
|
||||
{
|
||||
CreateDialogIndirectParam(NULL, dt, parent, InitialDlgProc, (LPARAM)this);
|
||||
CreateDialogIndirectParam(nullptr, dt, parent, InitialDlgProc, (LPARAM)this);
|
||||
}
|
||||
else
|
||||
{
|
||||
DialogBoxIndirectParam(NULL, dt, parent, InitialDlgProc, (LPARAM)this);
|
||||
DialogBoxIndirectParam(nullptr, dt, parent, InitialDlgProc, (LPARAM)this);
|
||||
}
|
||||
|
||||
delete [] dt;
|
||||
@ -154,7 +154,7 @@ void Dialog::ShowDialogWindow(const WCHAR* title, short x, short y, short w, sho
|
||||
|
||||
INT_PTR Dialog::OnActivate(WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
c_ActiveDialogWindow = wParam ? m_Window : NULL;
|
||||
c_ActiveDialogWindow = wParam ? m_Window : nullptr;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@ -177,7 +177,7 @@ bool Dialog::HandleMessage(MSG& msg)
|
||||
*/
|
||||
void Dialog::SetMenuButton(HWND button)
|
||||
{
|
||||
SetWindowSubclass(button, MenuButtonProc, NULL, NULL);
|
||||
SetWindowSubclass(button, MenuButtonProc, 0, 0);
|
||||
}
|
||||
|
||||
LRESULT CALLBACK Dialog::MenuButtonProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, UINT_PTR uIdSubclass, DWORD_PTR dwRefData)
|
||||
|
@ -50,7 +50,7 @@ HRESULT STDMETHODCALLTYPE DWriteFontCollectionLoader::QueryInterface(IID const&
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
*ppvObject = NULL;
|
||||
*ppvObject = nullptr;
|
||||
return E_NOINTERFACE;
|
||||
}
|
||||
|
||||
|
@ -55,7 +55,7 @@ HRESULT STDMETHODCALLTYPE DWriteFontFileEnumerator::QueryInterface(IID const& ri
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
*ppvObject = NULL;
|
||||
*ppvObject = nullptr;
|
||||
return E_NOINTERFACE;
|
||||
}
|
||||
|
||||
|
@ -35,7 +35,7 @@ HMENU MenuTemplate::CreateSubMenu(const MenuTemplate* items, UINT& itemIndex, UI
|
||||
|
||||
UINT itemFlags = MF_STRING;
|
||||
UINT_PTR itemId = item.id;
|
||||
const WCHAR* itemText = item.idText ? getString(item.idText) : NULL;
|
||||
const WCHAR* itemText = item.idText ? getString(item.idText) : nullptr;
|
||||
|
||||
if (item.type == MenuItem_ItemGrayed)
|
||||
{
|
||||
|
@ -31,11 +31,11 @@ std::string Narrow(const WCHAR* str, int strLen, int cp)
|
||||
strLen = (int)wcslen(str);
|
||||
}
|
||||
|
||||
int bufLen = WideCharToMultiByte(cp, 0, str, strLen, NULL, 0, NULL, NULL);
|
||||
int bufLen = WideCharToMultiByte(cp, 0, str, strLen, nullptr, 0, nullptr, nullptr);
|
||||
if (bufLen > 0)
|
||||
{
|
||||
narrowStr.resize(bufLen);
|
||||
WideCharToMultiByte(cp, 0, str, strLen, &narrowStr[0], bufLen, NULL, NULL);
|
||||
WideCharToMultiByte(cp, 0, str, strLen, &narrowStr[0], bufLen, nullptr, nullptr);
|
||||
}
|
||||
}
|
||||
return narrowStr;
|
||||
@ -52,7 +52,7 @@ std::wstring Widen(const char* str, int strLen, int cp)
|
||||
strLen = strlen(str);
|
||||
}
|
||||
|
||||
int bufLen = MultiByteToWideChar(cp, 0, str, strLen, NULL, 0);
|
||||
int bufLen = MultiByteToWideChar(cp, 0, str, strLen, nullptr, 0);
|
||||
if (bufLen > 0)
|
||||
{
|
||||
wideStr.resize(bufLen);
|
||||
|
Reference in New Issue
Block a user