137 strFileTitle +=
L".png";
181 CStringA szPathNameA(pszPathName), szFileTitleA(strFileTitle);
235 return ::GetOpenFileNameW(&
ofn);
268 if (aguidFileTypesE[
i] == Gdiplus::ImageFormatPNG)
279 return ::GetSaveFileNameW(&
sfn);
287 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff,
288 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff
294 ZeroMemory(&choosecolor,
sizeof(choosecolor));
345 RECT rcSpace = clientRect;
444 WCHAR programname[20];
445 WCHAR shouldEnlargePromptText[100];
455 shouldEnlarge =
FALSE;
464 if (
width > curWidth)
503#ifndef SPI_GETWHEELSCROLLCHARS
504 #define SPI_GETWHEELSCROLLCHARS 0x006C
507 for (
UINT i = 0;
i < nCount; ++
i)
518 for (
UINT i = 0;
i < nCount; ++
i)
535 HDROP hDrop = (HDROP)
wParam;
560 RECT rcEmpty = { 0, 0, 0, 0 };
662#define MAX_RECENT_PATHNAME_DISPLAY 30
663 CPath pathFile(strFile);
671 INT iMenuItem = (cMenuItems - 2) + iItem;
707 DWORD dwStart = 0, dwEnd = 0;
710 BOOL hasTextSel = (dwStart < dwEnd);
728 ENABLED_IF(textShown ? hasTextSel : trueSelection));
833 WCHAR infotitle[100], infotext[200];
1339 iccx.
dwSize =
sizeof(iccx);
PRTL_UNICODE_STRING_BUFFER Path
#define ATLTRACE(format,...)
VOID ShowError(DWORD dwLastError)
CAttributesDialog attributesDialog
CStretchSkewDialog stretchSkewDialog
CMirrorRotateDialog mirrorRotateDialog
ULONG(WINAPI * FN_MAPISendMail)(LHANDLE, ULONG_PTR, lpMapiMessage, FLAGS, ULONG)
WCHAR g_szMailTempFile[MAX_LONG_PATH]
BOOL g_askBeforeEnlarging
WCHAR g_szFileName[MAX_LONG_PATH]
HWND(WINAPI * FN_HtmlHelpW)(HWND, LPCWSTR, UINT, DWORD_PTR)
#define MAX_RECENT_PATHNAME_DISPLAY
static UINT_PTR APIENTRY OFNHookProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
BOOL OpenMailer(HWND hWnd, LPCWSTR pszPathName)
static HINSTANCE s_hHHCTRL_OCX
ULONG(WINAPI * FN_MAPISendMailW)(LHANDLE, ULONG_PTR, lpMapiMessageW, FLAGS, ULONG)
void ShowOutOfMemory(void)
static FN_HtmlHelpW s_pHtmlHelpW
static HWND DoHtmlHelpW(HWND hwndCaller, LPCWSTR pszFile, UINT uCommand, DWORD_PTR dwData)
INT WINAPI wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmdLine, INT nCmdShow)
#define SPI_GETWHEELSCROLLCHARS
static BOOL FileExtFromFilter(LPWSTR pExt, OPENFILENAME *pOFN)
RegistrySettings registrySettings
SelectionModel selectionModel
CToolBox toolBoxContainer
#define CHECKED_IF(bChecked)
CTextEditWindow textEditWindow
#define ENABLED_IF(bEnabled)
#define IDS_SAVEPROMPTTEXT
#define IDM_EDITSELECTALL
#define IDM_VIEWSTATUSBAR
#define IDS_DEFAULTFILENAME
#define IDM_EDITDELETESELECTION
#define IDM_COLORSOLDPALETTE
#define IDM_FILEPAGESETUP
#define IDM_COLORSEDITPALETTE
#define IDM_COLORSMODERNPALETTE
#define IDM_EDITPASTEFROM
#define IDM_VIEWSHOWMINIATURE
#define IDM_FILEASWALLPAPERPLANE
#define IDM_FORMATICONBAR
#define IDM_EDITINVERTSELECTION
#define IDM_IMAGEINVERTCOLORS
#define IDM_IMAGEATTRIBUTES
#define IDM_FILEMOSTRECENTLYUSEDFILE
#define IDM_VIEWFULLSCREEN
#define IDM_IMAGESTRETCHSKEW
#define IDM_FILEASWALLPAPERCENTERED
#define IDM_HELPHELPTOPICS
#define IDM_IMAGEDRAWOPAQUE
#define IDM_VIEWCOLORPALETTE
#define IDM_IMAGEDELETEIMAGE
#define IDM_CROPSELECTION
#define IDS_ALLPICTUREFILES
#define IDS_ENLARGEPROMPTTEXT
#define IDM_IMAGEROTATEMIRROR
#define IDM_FILEASWALLPAPERSTRETCHED
CCanvasWindow canvasWindow
static HRESULT GetImporterFilterString(CSimpleString &strImporters, CSimpleArray< GUID > &aguidFileTypes, LPCTSTR pszAllFilesDescription=NULL, DWORD dwExclude=excludeDefaultLoad, TCHAR chSeparator=TEXT('|'))
static HRESULT GetExporterFilterString(CSimpleString &strExporters, CSimpleArray< GUID > &aguidFileTypes, LPCTSTR pszAllFilesDescription=NULL, DWORD dwExclude=excludeDefaultSave, TCHAR chSeparator=TEXT('|'))
BOOL CompactPathEx(UINT nMaxChars, DWORD dwFlags=0)
bool IsEmpty() const noexcept
int Replace(PCXSTR pszOld, PCXSTR pszNew)
BOOL LoadString(_In_ UINT nID)
void __cdecl Format(UINT nFormatID,...)
int MessageBox(LPCTSTR lpszText, LPCTSTR lpszCaption=NULL, UINT nType=MB_OK)
BOOL IsWindowVisible() const
BOOL ShowWindow(int nCmdShow)
VOID OnEndDraw(BOOL bCancel)
VOID updateScrollPos(INT x=0, INT y=0)
VOID zoomTo(INT newZoom, LONG left=0, LONG top=0)
static BOOL IsExtensionSupported(PWCHAR pchDotExt)
LRESULT OnSysColorChange(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
void InsertSelectionFromHBITMAP(HBITMAP bitmap, HWND window)
void alignChildrenToMainWindow()
LRESULT OnKeyDown(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
VOID TrackPopupMenu(POINT ptScreen, INT iSubMenu)
BOOL GetSaveFileName(IN OUT LPWSTR pszFile, INT cchMaxFile)
LRESULT OnDropFiles(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
void ProcessFileMenu(HMENU hPopupMenu)
LRESULT OnSize(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
LRESULT OnClose(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
BOOL GetOpenFileName(IN OUT LPWSTR pszFile, INT cchMaxFile)
LRESULT OnInitMenuPopup(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
LRESULT OnCommand(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
LRESULT OnGetMinMaxInfo(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
LRESULT OnMouseWheel(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
void saveImage(BOOL overwrite)
LRESULT OnCreate(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
LRESULT OnDestroy(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
BOOL ChooseColor(IN OUT COLORREF *prgbColor)
HWND DoCreate(HWND hwndParent)
BOOL IsImageSaved() const
void Undo(BOOL bClearRedo=FALSE)
void NotifyImageChanged()
void RotateNTimes90Degrees(int iN)
void Crop(int nWidth, int nHeight, int nOffsetX=0, int nOffsetY=0)
void UnlockBitmap(HBITMAP hbmLocked)
void SaveImage(LPCWSTR lpFileName)
void StretchSkew(int nStretchPercentX, int nStretchPercentY, int nSkewDegX=0, int nSkewDegY=0)
PAL_TYPE SelectedPalette()
COLORREF GetBgColor() const
void SetFgColor(COLORREF newColor)
void SelectPalette(PAL_TYPE nPalette)
COLORREF GetFgColor() const
CStringW strFiles[MAX_RECENT_FILES]
WINDOWPLACEMENT WindowPlacement
static void SetWallpaper(LPCWSTR szFileName, WallpaperStyle style)
void RotateNTimes90Degrees(int iN)
void StretchSkew(int nStretchPercentX, int nStretchPercentY, int nSkewDegX, int nSkewDegY)
HBITMAP GetSelectionContents()
void InsertFromHBITMAP(HBITMAP hbmColor, INT x=0, INT y=0, HBITMAP hbmMask=NULL)
void moveSelection(INT xDelta, INT yDelta)
BOOL WINAPI InitCommonControlsEx(const INITCOMMONCONTROLSEX *lpInitCtrls)
#define OFN_OVERWRITEPROMPT
#define CDM_SETCONTROLTEXT
#define PD_USEDEVMODECOPIESANDCOLLATE
HBITMAP InitializeImage(LPCWSTR name, LPWIN32_FIND_DATAW pFound, BOOL isFile)
BOOL SaveDIBToFile(HBITMAP hBitmap, LPCWSTR FileName, BOOL fIsMainFile, REFGUID guidFileType)
HGLOBAL BitmapToClipboardDIB(HBITMAP hBitmap)
HBITMAP BitmapFromHEMF(HENHMETAFILE hEMF)
HBITMAP BitmapFromClipboardDIB(HGLOBAL hGlobal)
HBITMAP DoLoadImageFile(HWND hwnd, LPCWSTR name, BOOL fIsMainFile)
int GetDIBHeight(HBITMAP hBitmap)
int GetDIBWidth(HBITMAP hBitmap)
#define GetProcAddress(x, y)
static const WCHAR messageW[]
BOOL WINAPI CopyFileW(IN LPCWSTR lpExistingFileName, IN LPCWSTR lpNewFileName, IN BOOL bFailIfExists)
BOOL WINAPI DeleteFileW(IN LPCWSTR lpFileName)
DWORD WINAPI GetTempPathW(IN DWORD count, OUT LPWSTR path)
UINT WINAPI GetSystemDirectoryW(OUT LPWSTR lpBuffer, IN UINT uSize)
void WINAPI DragFinish(HDROP h)
LPWSTR WINAPI PathFindFileNameW(LPCWSTR lpszPath)
LPWSTR WINAPI PathFindExtensionW(LPCWSTR lpszPath)
void WINAPI PathRemoveExtensionW(LPWSTR lpszPath)
BOOL WINAPI PathFileExistsW(LPCWSTR lpszPath)
static VOID BitBlt(_In_ ULONG Left, _In_ ULONG Top, _In_ ULONG Width, _In_ ULONG Height, _In_reads_bytes_(Delta *Height) PUCHAR Buffer, _In_ ULONG BitsPerPixel, _In_ ULONG Delta)
UINT WINAPI GetTempFileNameW(IN LPCWSTR lpPathName, IN LPCWSTR lpPrefixString, IN UINT uUnique, OUT LPWSTR lpTempFileName)
CFullscreenWindow fullscreenWindow
GLint GLint GLsizei GLsizei height
GLint GLint GLsizei width
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
HGLOBAL NTAPI GlobalFree(HGLOBAL hMem)
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
struct MapiMessageW * lpMapiMessageW
struct MapiMessage * lpMapiMessage
CMiniatureWindow miniature
static HANDLE ULONG_PTR dwData
static IHTMLWindow2 * window
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
unsigned __int3264 UINT_PTR
CPaletteWindow paletteWindow
PaletteModel paletteModel
#define WS_OVERLAPPEDWINDOW
#define WS_EX_ACCEPTFILES
#define ICC_USEREX_CLASSES
#define ICC_STANDARD_CLASSES
BOOL WINAPI ShellAboutW(HWND hWnd, LPCWSTR szApp, LPCWSTR szOtherStuff, HICON hIcon)
STRSAFEAPI StringCchPrintfW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszFormat,...)
STRSAFEAPI StringCchCatW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszSrc)
STRSAFEAPI StringCchCopyW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszSrc)
TW_UINT32 TW_UINT16 TW_UINT16 MSG
#define FORMAT_MESSAGE_IGNORE_INSERTS
#define FORMAT_MESSAGE_FROM_SYSTEM
BOOL WINAPI DeleteEnhMetaFile(_In_opt_ HENHMETAFILE)
BOOL WINAPI DeleteDC(_In_ HDC)
BOOL WINAPI SetMenu(_In_ HWND, _In_opt_ HMENU)
BOOL WINAPI TranslateMessage(_In_ const MSG *)
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
int WINAPI GetMenuItemCount(_In_opt_ HMENU)
BOOL WINAPI PostMessageW(_In_opt_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
BOOL WINAPI GetWindowPlacement(_In_ HWND, _Inout_ WINDOWPLACEMENT *)
BOOL WINAPI GetWindowRect(_In_ HWND, _Out_ LPRECT)
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)
__analysis_noreturn void WINAPI PostQuitMessage(_In_ int)
HANDLE WINAPI SetClipboardData(_In_ UINT, _In_opt_ HANDLE)
BOOL WINAPI SetForegroundWindow(_In_ HWND)
BOOL WINAPI CloseClipboard(void)
#define SW_SHOWNOACTIVATE
HWND WINAPI GetCapture(void)
BOOL WINAPI EndDeferWindowPos(_In_ HDWP)
#define WM_SYSCOLORCHANGE
HANDLE WINAPI GetClipboardData(_In_ UINT)
DWORD WINAPI CheckMenuItem(_In_ HMENU, _In_ UINT, _In_ UINT)
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
HMENU WINAPI GetSubMenu(_In_ HMENU, _In_ int)
HWND WINAPI CreateWindowExW(_In_ DWORD dwExStyle, _In_opt_ LPCWSTR lpClassName, _In_opt_ LPCWSTR lpWindowName, _In_ DWORD dwStyle, _In_ int X, _In_ int Y, _In_ int nWidth, _In_ int nHeight, _In_opt_ HWND hWndParent, _In_opt_ HMENU hMenu, _In_opt_ HINSTANCE hInstance, _In_opt_ LPVOID lpParam)
BOOL WINAPI RemoveMenu(_In_ HMENU, _In_ UINT, _In_ UINT)
BOOL WINAPI EmptyClipboard(void)
BOOL WINAPI SystemParametersInfoW(_In_ UINT uiAction, _In_ UINT uiParam, _Inout_opt_ PVOID pvParam, _In_ UINT fWinIni)
HWND WINAPI GetParent(_In_ HWND)
HACCEL WINAPI LoadAcceleratorsW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
BOOL WINAPI DestroyMenu(_In_ HMENU)
#define MB_ICONINFORMATION
int WINAPI TranslateAcceleratorW(_In_ HWND, _In_ HACCEL, _In_ LPMSG)
HDWP WINAPI DeferWindowPos(_In_ HDWP, _In_ HWND, _In_opt_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ UINT)
SHORT WINAPI GetAsyncKeyState(_In_ int)
#define MAKEINTRESOURCEW(i)
HMENU WINAPI LoadMenuW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
BOOL WINAPI DestroyAcceleratorTable(_In_ HACCEL)
struct _WINDOWPLACEMENT WINDOWPLACEMENT
BOOL WINAPI EnableMenuItem(_In_ HMENU, _In_ UINT, _In_ UINT)
HICON WINAPI LoadIconW(_In_opt_ HINSTANCE hInstance, _In_ LPCWSTR lpIconName)
BOOL WINAPI IsClipboardFormatAvailable(_In_ UINT)
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
SHORT WINAPI GetKeyState(_In_ int)
HDWP WINAPI BeginDeferWindowPos(_In_ int)