mirror of
https://github.com/microsoft/PowerToys.git
synced 2024-12-13 11:09:28 +08:00
reverting formatting of files
This commit is contained in:
parent
8132bbac2e
commit
653a84d3a9
@ -14,8 +14,7 @@ std::optional<POINT> get_mouse_pos();
|
||||
// Gets active window, filtering out all "non standard" windows like the taskbar, etc.
|
||||
HWND get_filtered_active_window();
|
||||
// Gets window ancestor (usualy the window we want to do stuff with), filtering out all "non standard" windows like the taskbar, etc. and provide the app process path
|
||||
struct WindowAndProcPath
|
||||
{
|
||||
struct WindowAndProcPath {
|
||||
HWND hwnd = nullptr;
|
||||
std::wstring process_path;
|
||||
};
|
||||
@ -33,8 +32,7 @@ int run_message_loop();
|
||||
|
||||
void show_last_error_message(LPCWSTR lpszFunction, DWORD dw);
|
||||
|
||||
enum WindowState
|
||||
{
|
||||
enum WindowState {
|
||||
UNKNONW,
|
||||
MINIMIZED,
|
||||
MAXIMIZED,
|
||||
|
@ -1,10 +1,8 @@
|
||||
|
||||
#include "stdafx.h"
|
||||
#include <commctrl.h>
|
||||
#include "Settings.h"
|
||||
#include "PowerRenameInterfaces.h"
|
||||
|
||||
// Note: Not moving these strings to the resource file as these are internal and used as IDs
|
||||
const wchar_t c_rootRegPath[] = L"Software\\Microsoft\\PowerRename";
|
||||
const wchar_t c_mruSearchRegPath[] = L"SearchMRU";
|
||||
const wchar_t c_mruReplaceRegPath[] = L"ReplaceMRU";
|
||||
@ -167,10 +165,10 @@ bool CSettings::GetRegStringValue(_In_ PCWSTR valueName, __out_ecount(cchBuf) PW
|
||||
return (SUCCEEDED(HRESULT_FROM_WIN32(SHGetValue(HKEY_CURRENT_USER, c_rootRegPath, valueName, &type, value, &cb) == ERROR_SUCCESS)));
|
||||
}
|
||||
|
||||
|
||||
typedef int (CALLBACK* MRUCMPPROC)(LPCWSTR, LPCWSTR);
|
||||
|
||||
typedef struct
|
||||
{
|
||||
typedef struct {
|
||||
DWORD cbSize;
|
||||
UINT uMax;
|
||||
UINT fFlags;
|
||||
@ -190,21 +188,15 @@ class CRenameMRU :
|
||||
{
|
||||
public:
|
||||
// IUnknown
|
||||
IFACEMETHODIMP_(ULONG)
|
||||
AddRef();
|
||||
IFACEMETHODIMP_(ULONG)
|
||||
Release();
|
||||
IFACEMETHODIMP_(ULONG) AddRef();
|
||||
IFACEMETHODIMP_(ULONG) Release();
|
||||
IFACEMETHODIMP QueryInterface(_In_ REFIID riid, _Outptr_ void** ppv);
|
||||
|
||||
// IEnumString
|
||||
IFACEMETHODIMP Next(__in ULONG celt, __out_ecount_part(celt, *pceltFetched) LPOLESTR* rgelt, __out_opt ULONG* pceltFetched);
|
||||
IFACEMETHODIMP Skip(__in ULONG) { return E_NOTIMPL; }
|
||||
IFACEMETHODIMP Reset();
|
||||
IFACEMETHODIMP Clone(__deref_out IEnumString** ppenum)
|
||||
{
|
||||
*ppenum = nullptr;
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
IFACEMETHODIMP Clone(__deref_out IEnumString** ppenum) { *ppenum = nullptr; return E_NOTIMPL; }
|
||||
|
||||
// IPowerRenameMRU
|
||||
IFACEMETHODIMP AddMRUString(_In_ PCWSTR entry);
|
||||
@ -233,8 +225,7 @@ private:
|
||||
|
||||
CRenameMRU::CRenameMRU() :
|
||||
m_refCount(1)
|
||||
{
|
||||
}
|
||||
{}
|
||||
|
||||
CRenameMRU::~CRenameMRU()
|
||||
{
|
||||
@ -277,14 +268,12 @@ HRESULT CRenameMRU::CreateInstance(_In_ PCWSTR regPathMRU, _In_ ULONG maxMRUSize
|
||||
}
|
||||
|
||||
// IUnknown
|
||||
IFACEMETHODIMP_(ULONG)
|
||||
CRenameMRU::AddRef()
|
||||
IFACEMETHODIMP_(ULONG) CRenameMRU::AddRef()
|
||||
{
|
||||
return InterlockedIncrement(&m_refCount);
|
||||
}
|
||||
|
||||
IFACEMETHODIMP_(ULONG)
|
||||
CRenameMRU::Release()
|
||||
IFACEMETHODIMP_(ULONG) CRenameMRU::Release()
|
||||
{
|
||||
long refCount = InterlockedDecrement(&m_refCount);
|
||||
|
||||
@ -475,6 +464,7 @@ void CRenameMRU::_FreeMRUList()
|
||||
{
|
||||
pfnFreeMRUList(m_mruHandle);
|
||||
}
|
||||
|
||||
}
|
||||
m_mruHandle = NULL;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user