mirror of https://github.com/tongzx/nt5src
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
1.1 KiB
39 lines
1.1 KiB
#ifndef SCREENRESFIXER_H
|
|
#define SCREENRESFIXER_H
|
|
|
|
HRESULT CScreenResFixer_CreateInstance(IN IUnknown * punkOuter, IN REFIID riid, OUT LPVOID * ppvObj);
|
|
|
|
typedef struct
|
|
{
|
|
DWORD dwWidth;
|
|
DWORD dwHeight;
|
|
DWORD dwColor;
|
|
BOOL fAvailable;
|
|
} SCREENMODE;
|
|
|
|
class CScreenResFixer : public IContextMenu
|
|
{
|
|
public:
|
|
CScreenResFixer() {}
|
|
virtual ~CScreenResFixer() {}
|
|
|
|
// *** IUnknown methods
|
|
STDMETHODIMP QueryInterface(REFIID riid, PVOID *ppvObj);
|
|
STDMETHODIMP_(ULONG) AddRef(void);
|
|
STDMETHODIMP_(ULONG) Release(void);
|
|
|
|
// *** IContextMenu methods ***
|
|
STDMETHODIMP QueryContextMenu(HMENU hmenu, UINT iIndexMenu, UINT idCmdFirst, UINT idCmdLast, UINT uFlags) { return E_NOTIMPL; }
|
|
STDMETHODIMP InvokeCommand(LPCMINVOKECOMMANDINFO lpici);
|
|
STDMETHODIMP GetCommandString(UINT_PTR idCmd, UINT uType, UINT *pRes, LPSTR pszName, UINT cchMax) { return E_NOTIMPL; }
|
|
|
|
private:
|
|
LONG _cRef;
|
|
|
|
int _PickScreenResolution(SCREENMODE* modes, int cModes);
|
|
void _FixScreenResolution(BOOL fShowDisplayCPL);
|
|
};
|
|
|
|
#endif // SCREENRESFIXER_H
|
|
|
|
|