17#define TB_IMAGE_WIDTH 16
18#define TB_IMAGE_HEIGHT 16
21#define SLIDESHOW_TIMER_ID 0xFACE
22#define SLIDESHOW_TIMER_INTERVAL 5000
33 5, 10, 25, 50, 100, 200, 300, 500, 1000, 2000, 4000
36#define MIN_ZOOM s_ZoomSteps[0]
37#define MAX_ZOOM s_ZoomSteps[_countof(s_ZoomSteps) - 1]
40#define DEFINE_BTN_INFO(_name) \
41 { TBICON_##_name, IDC_##_name, TBSTATE_ENABLED, BTNS_BUTTON, {0}, 0, 0 }
43#define DEFINE_BTN_SEPARATOR \
44 { -1, 0, TBSTATE_ENABLED, BTNS_SEP, {0}, 0, 0 }
80#define DEFINE_BTN_CONFIG(_name) { IDB_##_name, IDS_TOOLTIP_##_name }
143 UINT ImageWidth, ImageHeight, ZoomedWidth, ZoomedHeight;
145 BOOL bShowHorz, bShowVert;
148 pData->m_xScrollOffset =
pData->m_yScrollOffset = 0;
160 ZoomedWidth = (ImageWidth *
pData->m_nZoomPercents) / 100;
161 ZoomedHeight = (ImageHeight *
pData->m_nZoomPercents) / 100;
165 bShowHorz = (rcClient.
right < ZoomedWidth);
166 bShowVert = (rcClient.
bottom < ZoomedHeight);
181 si.
nMax = ZoomedWidth;
182 si.
nPos = (ZoomedWidth - rcClient.
right) / 2 +
pData->m_xScrollOffset;
185 pData->m_xScrollOffset = si.
nPos - (ZoomedWidth - rcClient.
right) / 2;
189 pData->m_xScrollOffset = 0;
197 si.
nMax = ZoomedHeight;
198 si.
nPos = (ZoomedHeight - rcClient.
bottom) / 2 +
pData->m_yScrollOffset;
201 pData->m_yScrollOffset = si.
nPos - (ZoomedHeight - rcClient.
bottom) / 2;
205 pData->m_yScrollOffset = 0;
214 BOOL bEnableZoomIn, bEnableZoomOut;
217 pData->m_nZoomPercents = NewZoom;
220 bEnableZoomIn = (NewZoom <
MAX_ZOOM);
221 bEnableZoomOut = (NewZoom >
MIN_ZOOM);
277 UINT ImageWidth, ImageHeight, NewZoom;
289 if (ImageHeight *
Rect.right <
Rect.bottom * ImageWidth)
291 if (
Rect.right < ImageWidth)
294 NewZoom = (
Rect.right * 100) / ImageWidth;
304 if (
Rect.bottom < ImageHeight)
307 NewZoom = (
Rect.bottom * 100) / ImageHeight;
328 if (pchFileTitle && *pchFileTitle)
348 if (
pData->m_pMemStream)
350 pData->m_pMemStream->lpVtbl->Release(
pData->m_pMemStream);
396 if (!
pData->m_pMemStream)
398 DPRINT1(
"MemStreamFromFile() failed\n");
408 DPRINT1(
"GdipLoadImageFromStream() failed\n");
446 DPRINT1(
"QuickAlloc() failed in pSaveImage()\n");
452 if (
IsEqualGUID(&rawFormat, &ImageFormatMemoryBMP))
453 rawFormat = ImageFormatBMP;
460 nFilterIndex =
j + 1;
467 ret = (nFilterIndex > 0) &&
470 DPRINT1(
"GdipSaveImageToFile() failed\n");
498 DPRINT1(
"QuickAlloc() failed in pSaveImageAs()\n");
505 if (
IsEqualGUID(&rawFormat, &ImageFormatMemoryBMP))
506 rawFormat = ImageFormatBMP;
512 sizeRemain = sizeRemain + (((
wcslen(codecInfo[
j].FormatDescription) + (
wcslen(codecInfo[
j].FilenameExtension) * 2) + 5) *
sizeof(
WCHAR)));
516 sizeRemain += (
sizeof(
WCHAR) * 2);
521 DPRINT1(
"cannot allocate memory for filter mask in pSaveImageAs()");
526 ZeroMemory(szSaveFileName,
sizeof(szSaveFileName));
541 StringCbPrintfExW(
c, sizeRemain, &
c, &sizeRemain, 0,
L"%ls (%ls)", codecInfo[
j].FormatDescription, codecInfo[
j].FilenameExtension);
545 sizeRemain -=
sizeof(*c);
551 sizeRemain -=
sizeof(*c);
565 DPRINT1(
"GdipSaveImageToFile() failed\n");
615 StringCbCopyW(szSearchPath,
sizeof(szSearchPath), szFirstFile);
622 DPRINT1(
"QuickAlloc() failed in pLoadFileList()\n");
631 DPRINT1(
"QuickAlloc() failed in pLoadFileList()\n");
640 StringCbCopyW(szFileTypes,
sizeof(szFileTypes), codecInfo[
j].FilenameExtension);
642 extension =
wcstok(szFileTypes,
L";");
643 while (extension !=
NULL)
658 currentNode = conductor;
664 if (!conductor->
Next)
666 DPRINT1(
"QuickAlloc() failed in pLoadFileList()\n");
669 root->Prev = conductor;
676 conductor->
Next->Prev = conductor;
677 conductor = conductor->
Next;
690 if (currentNode ==
NULL)
693 currentNode = conductor;
697 conductor = conductor->
Prev;
703 root->Prev = conductor;
704 conductor = currentNode;
733 "\x28\x00\x00\x00\x10\x00\x00\x00\x10\x00\x00\x00\x01\x00\x04\x00\x00\x00"
734 "\x00\x00\x80\x00\x00\x00\x23\x2E\x00\x00\x23\x2E\x00\x00\x10\x00\x00\x00"
735 "\x00\x00\x00\x00\x99\x99\x99\x00\xCC\xCC\xCC\x00\x00\x00\x00\x00\x00\x00"
736 "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
737 "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
738 "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x11\x11\x11"
739 "\x00\x00\x00\x00\x11\x11\x11\x11\x00\x00\x00\x00\x11\x11\x11\x11\x00\x00"
740 "\x00\x00\x11\x11\x11\x11\x00\x00\x00\x00\x11\x11\x11\x11\x00\x00\x00\x00"
741 "\x11\x11\x11\x11\x00\x00\x00\x00\x11\x11\x11\x11\x00\x00\x00\x00\x11\x11"
742 "\x11\x11\x00\x00\x00\x00\x00\x00\x00\x00\x11\x11\x11\x11\x00\x00\x00\x00"
743 "\x11\x11\x11\x11\x00\x00\x00\x00\x11\x11\x11\x11\x00\x00\x00\x00\x11\x11"
744 "\x11\x11\x00\x00\x00\x00\x11\x11\x11\x11\x00\x00\x00\x00\x11\x11\x11\x11"
745 "\x00\x00\x00\x00\x11\x11\x11\x11\x00\x00\x00\x00\x11\x11\x11\x11";
758 INT ZoomedWidth, ZoomedHeight;
763 HGDIOBJ hbrOld, hbmOld, hPenOld;
783 color0 =
RGB(0, 0, 0);
784 color1 =
RGB(255, 255, 255);
811 UINT ImageWidth, ImageHeight;
816 ZoomedWidth = (ImageWidth *
pData->m_nZoomPercents) / 100;
817 ZoomedHeight = (ImageHeight *
pData->m_nZoomPercents) / 100;
822 DPRINT1(
"error: GdipCreateFromHDC\n");
828 if (
pData->m_nZoomPercents % 100 == 0)
839 rect.left = (rcClient.
right - ZoomedWidth ) / 2;
840 rect.top = (rcClient.
bottom - ZoomedHeight) / 2;
841 rect.right =
rect.left + ZoomedWidth;
842 rect.bottom =
rect.top + ZoomedHeight;
844 -prcPaint->
left -
pData->m_xScrollOffset,
845 -prcPaint->
top -
pData->m_yScrollOffset);
870 -0.5f, -0.5f, ImageWidth, ImageHeight,
957 pData->m_hwndToolBar = hwndToolBar;
963 if (hImageList ==
NULL)
1005 pData->m_nMouseDownMsg = uMsg;
1044 pData->m_nMouseDownMsg = 0;
1051 UINT ImageWidth, ImageHeight, ZoomedWidth, ZoomedHeight;
1100 ZoomedHeight = (ImageHeight *
pData->m_nZoomPercents) / 100;
1101 pData->m_yScrollOffset = si.
nPos - (ZoomedHeight - rcClient.
bottom) / 2;
1106 ZoomedWidth = (ImageWidth *
pData->m_nZoomPercents) / 100;
1107 pData->m_xScrollOffset = si.
nPos - (ZoomedWidth - rcClient.
right) / 2;
1232 pData->m_hwndZoom = hwndZoom;
1319 if (!
pData->m_szFile[0])
1335 FileOp.
pFrom = szCurFile;
1339 DPRINT(
"Preview_Delete: SHFileOperationW() failed or canceled\n");
1355 if (!
pData->m_szFile[0])
1359 sei.
cbSize =
sizeof(sei);
1525 switch (pnmhdr->
code)
1668 DPRINT1(
"Warning, CoInitializeEx failed with code=%08X\n", (
int)hrCoInit);
1674 ZeroMemory(&gdiplusStartupInput,
sizeof(gdiplusStartupInput));
1766 DPRINT(
"ImageView_PrintTo() not implemented\n");
1772 DPRINT(
"ImageView_PrintToA() not implemented\n");
1778 DPRINT(
"ImageView_PrintToW() not implemented\n");
BOOL Anime_LoadInfo(PANIME pAnime)
void Anime_Start(PANIME pAnime, DWORD dwDelay)
BOOL Anime_OnTimer(PANIME pAnime, WPARAM wParam)
void Anime_SetTimerWnd(PANIME pAnime, HWND hwndTimer)
void Anime_FreeInfo(PANIME pAnime)
void Anime_Pause(PANIME pAnime)
#define UlongToHandle(ul)
#define RegCloseKey(hKey)
BOOL WINAPI InitCommonControlsEx(const INITCOMMONCONTROLSEX *lpInitCtrls)
#define OFN_OVERWRITEPROMPT
static LSTATUS(WINAPI *pRegDeleteTreeW)(HKEY
LONG WINAPI RegCreateKeyExW(_In_ HKEY hKey, _In_ LPCWSTR lpSubKey, _In_ DWORD Reserved, _In_opt_ LPWSTR lpClass, _In_ DWORD dwOptions, _In_ REGSAM samDesired, _In_opt_ LPSECURITY_ATTRIBUTES lpSecurityAttributes, _Out_ PHKEY phkResult, _Out_opt_ LPDWORD lpdwDisposition)
LONG WINAPI RegOpenKeyExW(HKEY hKey, LPCWSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, PHKEY phkResult)
LONG WINAPI RegSetValueExW(_In_ HKEY hKey, _In_ LPCWSTR lpValueName, _In_ DWORD Reserved, _In_ DWORD dwType, _In_ CONST BYTE *lpData, _In_ DWORD cbData)
LONG WINAPI RegQueryValueExW(_In_ HKEY hkeyorg, _In_ LPCWSTR name, _In_ LPDWORD reserved, _In_ LPDWORD type, _In_ LPBYTE data, _In_ LPDWORD count)
BOOL WINAPI ImageList_Destroy(HIMAGELIST himl)
INT WINAPI ImageList_AddMasked(HIMAGELIST himl, HBITMAP hBitmap, COLORREF clrMask)
HIMAGELIST WINAPI ImageList_Create(INT cx, INT cy, UINT flags, INT cInitial, INT cGrow)
BOOL WINAPI GetSaveFileNameW(LPOPENFILENAMEW ofn)
#define DLL_PROCESS_ATTACH
#define ReadFile(a, b, c, d, e)
#define INVALID_HANDLE_VALUE
#define MultiByteToWideChar
GpStatus WINGDIPAPI GdipDrawImageRectRect(GpGraphics *graphics, GpImage *image, REAL dstx, REAL dsty, REAL dstwidth, REAL dstheight, REAL srcx, REAL srcy, REAL srcwidth, REAL srcheight, GpUnit srcUnit, GDIPCONST GpImageAttributes *imageattr, DrawImageAbort callback, VOID *callbackData)
GpStatus WINGDIPAPI GdipCreateFromHDC(HDC hdc, GpGraphics **graphics)
GpStatus WINGDIPAPI GdipDeleteGraphics(GpGraphics *graphics)
GpStatus WINGDIPAPI GdipSetInterpolationMode(GpGraphics *graphics, InterpolationMode mode)
GpStatus WINGDIPAPI GdipSetSmoothingMode(GpGraphics *graphics, SmoothingMode mode)
GpStatus WINGDIPAPI GdipGetImageRawFormat(GpImage *image, GUID *format)
GpStatus WINGDIPAPI GdipGetImageEncodersSize(UINT *numEncoders, UINT *size)
GpStatus WINGDIPAPI GdipGetImageFlags(GpImage *image, UINT *flags)
GpStatus WINGDIPAPI GdipGetImageWidth(GpImage *image, UINT *width)
GpStatus WINGDIPAPI GdipGetImageHeight(GpImage *image, UINT *height)
GpStatus WINGDIPAPI GdipGetImageDecodersSize(UINT *numDecoders, UINT *size)
GpStatus WINGDIPAPI GdipSaveImageToFile(GpImage *image, GDIPCONST WCHAR *filename, GDIPCONST CLSID *clsidEncoder, GDIPCONST EncoderParameters *encoderParams)
GpStatus WINGDIPAPI GdipDisposeImage(GpImage *image)
GpStatus WINGDIPAPI GdipLoadImageFromStream(IStream *stream, GpImage **image)
GpStatus WINGDIPAPI GdipImageRotateFlip(GpImage *image, RotateFlipType type)
GpStatus WINGDIPAPI GdipGetImageEncoders(UINT numEncoders, UINT size, ImageCodecInfo *encoders)
GpStatus WINGDIPAPI GdipGetImageDecoders(UINT numDecoders, UINT size, ImageCodecInfo *decoders)
DWORD WINAPI GetFileSize(HANDLE hFile, LPDWORD lpFileSizeHigh)
HANDLE WINAPI FindFirstFileW(IN LPCWSTR lpFileName, OUT LPWIN32_FIND_DATAW lpFindFileData)
BOOL WINAPI FindClose(HANDLE hFindFile)
BOOL WINAPI FindNextFileW(IN HANDLE hFindFile, OUT LPWIN32_FIND_DATAW lpFindFileData)
DWORD WINAPI GetFullPathNameW(IN LPCWSTR lpFileName, IN DWORD nBufferLength, OUT LPWSTR lpBuffer, OUT LPWSTR *lpFilePart)
HRESULT WINAPI DECLSPEC_HOTPATCH CoInitializeEx(LPVOID lpReserved, DWORD dwCoInit)
void WINAPI DECLSPEC_HOTPATCH CoUninitialize(void)
void WINAPI DragFinish(HDROP h)
UINT WINAPI DragQueryFileW(HDROP hDrop, UINT lFile, LPWSTR lpszwFile, UINT lLength)
void WINAPI DragAcceptFiles(HWND hWnd, BOOL b)
BOOL WINAPI PathRemoveFileSpecW(LPWSTR lpszPath)
LPWSTR WINAPI PathFindFileNameW(LPCWSTR lpszPath)
VOID WINAPI PathUnquoteSpacesW(LPWSTR 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)
Status WINAPI GdiplusStartup(ULONG_PTR *token, const struct GdiplusStartupInput *input, struct GdiplusStartupOutput *output)
@ SmoothingModeHighQuality
@ ImageFlagsHasTranslucent
@ InterpolationModeHighQualityBilinear
@ InterpolationModeNearestNeighbor
void WINAPI GdiplusShutdown(ULONG_PTR)
GLint GLint GLint GLint GLint x
GLint GLint GLint GLint GLint GLint y
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
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 GLint GLint j
GpStatus WINGDIPAPI GdipCreateImageAttributes(GpImageAttributes **imageattr)
GpStatus WINGDIPAPI GdipDisposeImageAttributes(GpImageAttributes *imageattr)
GpStatus WINGDIPAPI GdipSetImageAttributesWrapMode(GpImageAttributes *imageAttr, WrapMode wrap, ARGB argb, BOOL clamp)
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
static IN DWORD IN LPVOID lpvReserved
TCHAR szTitle[MAX_LOADSTRING]
PSDBQUERYRESULT_VISTA PVOID DWORD * dwSize
INT WINAPI DrawTextW(HDC hdc, LPCWSTR str, INT count, LPRECT rect, UINT flags)
@ COINIT_APARTMENTTHREADED
#define WS_OVERLAPPEDWINDOW
_Out_opt_ int _Out_opt_ int * cy
#define TB_SETEXTENDEDSTYLE
struct _IMAGELIST * HIMAGELIST
#define TB_BUTTONSTRUCTSIZE
#define TBSTYLE_EX_HIDECLIPPEDBUTTONS
#define TOOLBARCLASSNAMEW
#define ICC_WIN95_CLASSES
#define IsEqualGUID(rguid1, rguid2)
IStream *WINAPI SHCreateMemStream(const BYTE *lpbData, UINT dwDataLen)
_Check_return_ _CRTIMP int __cdecl _wcsicmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)
_CRT_RESTORE_GCC_WARNINGS _Check_return_ _CRTIMP wchar_t *__cdecl wcstok(_Inout_opt_z_ wchar_t *_Str, _In_z_ const wchar_t *_Delim)
void WINAPI SHAddToRecentDocs(UINT uFlags, LPCVOID pv)
static VOID ZoomWnd_UpdateScroll(PPREVIEW_DATA pData, HWND hwnd, BOOL bResetPos)
static BOOL Preview_OnCreate(HWND hwnd, LPCREATESTRUCT pCS)
static VOID Preview_ResetZoom(PPREVIEW_DATA pData)
static VOID Preview_Delete(PPREVIEW_DATA pData)
static BOOL Preview_IsMainWnd(HWND hwnd)
VOID WINAPI ImageView_PrintToW(HWND hwnd, HINSTANCE hInst, LPCWSTR path, int nShow)
static VOID Preview_ToggleSlideShow(PPREVIEW_DATA pData)
static VOID ZoomWnd_OnMouseWheel(HWND hwnd, INT x, INT y, INT zDelta, UINT fwKeys)
static BOOL ZoomWnd_OnSetCursor(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
static VOID Preview_pFreeImage(PPREVIEW_DATA pData)
static VOID ZoomWnd_OnDraw(PPREVIEW_DATA pData, HDC hdc, LPRECT prcPaint, LPRECT prcClient)
#define SLIDESHOW_TIMER_INTERVAL
static VOID Preview_UpdateImage(PPREVIEW_DATA pData)
static VOID Preview_UpdateZoom(PPREVIEW_DATA pData, UINT NewZoom, BOOL bEnableBestFit, BOOL bEnableRealSize)
LRESULT CALLBACK ZoomWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
LONG ImageView_Main(HWND hwnd, LPCWSTR szFileName)
static VOID Preview_RestartTimer(HWND hwnd)
static VOID Preview_GoNextPic(PPREVIEW_DATA pData, BOOL bNext)
static VOID Preview_pPrintImage(PPREVIEW_DATA pData)
static const TBBUTTON s_Buttons[]
struct tagPREVIEW_DATA * PPREVIEW_DATA
static VOID Preview_OnSize(HWND hwnd)
static PPREVIEW_DATA Preview_GetData(HWND hwnd)
struct tagPREVIEW_DATA PREVIEW_DATA
BOOL WINAPI DllMain(IN HINSTANCE hinstDLL, IN DWORD dwReason, IN LPVOID lpvReserved)
#define SLIDESHOW_TIMER_ID
SHIMGVW_FILENODE * g_pCurrentFile
static VOID ZoomWnd_OnMouseMove(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
static BOOL Preview_CreateToolBar(PPREVIEW_DATA pData)
static VOID ZoomWnd_OnHVScroll(PPREVIEW_DATA pData, HWND hwnd, WPARAM wParam, BOOL bVertical)
static VOID Preview_pLoadImageFromNode(PPREVIEW_DATA pData, SHIMGVW_FILENODE *pNode)
static VOID Preview_EndSlideShow(HWND hwnd)
#define DEFINE_BTN_SEPARATOR
SHIMGVW_SETTINGS g_Settings
static VOID Preview_pLoadImage(PPREVIEW_DATA pData, LPCWSTR szOpenFileName)
static VOID Preview_OnMoveSize(HWND hwnd)
LRESULT CALLBACK PreviewWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
static SHIMGVW_FILENODE * pBuildFileList(LPCWSTR szFirstFile)
static VOID Preview_OnDropFiles(HWND hwnd, HDROP hDrop)
static const TB_BUTTON_CONFIG s_ButtonConfig[]
static LRESULT Preview_OnNotify(HWND hwnd, LPNMHDR pnmhdr)
static BOOL ImageView_LoadSettings(VOID)
static VOID ImageView_SaveSettings(VOID)
static VOID ImageView_ResetSettings(VOID)
#define DEFINE_BTN_CONFIG(_name)
static VOID ZoomWnd_OnPaint(PPREVIEW_DATA pData, HWND hwnd)
static VOID Preview_ZoomInOrOut(PPREVIEW_DATA pData, BOOL bZoomIn)
static VOID Preview_UpdateUI(PPREVIEW_DATA pData)
static VOID Preview_pSaveImageAs(PPREVIEW_DATA pData)
static const UINT s_ZoomSteps[]
VOID WINAPI ImageView_Fullscreen(HWND hwnd, HINSTANCE hInst, LPCWSTR path, int nShow)
VOID WINAPI ImageView_FullscreenA(HWND hwnd, HINSTANCE hInst, LPCSTR path, int nShow)
static VOID Preview_OnCommand(HWND hwnd, UINT nCommandID)
static VOID Preview_OnDestroy(HWND hwnd)
static BOOL Preview_pSaveImage(PPREVIEW_DATA pData, LPCWSTR pszFile)
VOID WINAPI ImageView_PrintToA(HWND hwnd, HINSTANCE hInst, LPCSTR path, int nShow)
VOID WINAPI ImageView_FullscreenW(HWND hwnd, HINSTANCE hInst, LPCWSTR path, int nShow)
static HBRUSH CreateCheckerBoardBrush(VOID)
static VOID ZoomWnd_OnButtonUp(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
static VOID Preview_UpdateTitle(PPREVIEW_DATA pData, LPCWSTR FileName)
#define DEFINE_BTN_INFO(_name)
static VOID ZoomWnd_OnButtonDown(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
IStream * MemStreamFromFile(LPCWSTR pszFileName)
VOID WINAPI ImageView_PrintTo(HWND hwnd, HINSTANCE hInst, LPCWSTR path, int nShow)
static VOID pFreeFileList(SHIMGVW_FILENODE *root)
static VOID Preview_Edit(HWND hwnd)
static LPVOID QuickAlloc(SIZE_T cbSize, BOOL bZero)
static VOID QuickFree(LPVOID ptr)
BOOL WINAPI DECLSPEC_HOTPATCH ShellExecuteExW(LPSHELLEXECUTEINFOW sei)
int WINAPI SHFileOperationW(LPSHFILEOPSTRUCTW lpFileOp)
STRSAFEAPI StringCchCatW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszSrc)
STRSAFEAPI StringCbCopyW(STRSAFE_LPWSTR pszDest, size_t cbDest, STRSAFE_LPCWSTR pszSrc)
STRSAFEAPI StringCbPrintfExW(STRSAFE_LPWSTR pszDest, size_t cbDest, STRSAFE_LPWSTR *ppszDestEnd, size_t *pcbRemaining, STRSAFE_DWORD dwFlags, STRSAFE_LPCWSTR pszFormat,...)
STRSAFEAPI StringCchCopyW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszSrc)
TW_UINT32 TW_UINT16 TW_UINT16 TW_MEMREF pData
TW_UINT32 TW_UINT16 TW_UINT16 MSG
WORD WORD PSZ PSZ pszFileName
DWORD WINAPI GetLastError(void)
#define INVALID_FILE_SIZE
COLORREF WINAPI SetBkColor(_In_ HDC, _In_ COLORREF)
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
HDC WINAPI CreateCompatibleDC(_In_opt_ HDC hdc)
COLORREF WINAPI GetBkColor(_In_ HDC)
HBITMAP WINAPI CreateCompatibleBitmap(_In_ HDC hdc, _In_ INT cx, _In_ INT cy)
int WINAPI FillRect(HDC, LPCRECT, HBRUSH)
BOOL WINAPI Rectangle(_In_ HDC, _In_ int, _In_ int, _In_ int, _In_ int)
COLORREF WINAPI SetTextColor(_In_ HDC, _In_ COLORREF)
HBRUSH WINAPI CreateDIBPatternBrushPt(_In_ const VOID *pvPackedDIB, _In_ UINT uUsage)
HBRUSH WINAPI CreateSolidBrush(_In_ COLORREF)
BOOL WINAPI DeleteDC(_In_ HDC)
HPEN WINAPI CreatePen(_In_ int, _In_ int, _In_ COLORREF)
#define HKEY_CURRENT_USER
HWND WINAPI SetCapture(_In_ HWND hWnd)
DWORD WINAPI GetSysColor(_In_ int)
BOOL WINAPI IsWindow(_In_opt_ HWND)
#define GetWindowLongPtrW
BOOL WINAPI TranslateMessage(_In_ const MSG *)
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
BOOL WINAPI ReleaseCapture(void)
LRESULT WINAPI DefWindowProcW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
BOOL WINAPI GetMessageW(_Out_ LPMSG, _In_opt_ HWND, _In_ UINT, _In_ UINT)
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)
ATOM WINAPI RegisterClassW(_In_ CONST WNDCLASSW *)
HCURSOR WINAPI SetCursor(_In_opt_ HCURSOR)
#define WM_SYSCOLORCHANGE
HCURSOR WINAPI LoadCursorW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
BOOL WINAPI IsIconic(_In_ HWND)
UINT_PTR WINAPI SetTimer(_In_opt_ HWND, _In_ UINT_PTR, _In_ UINT, _In_opt_ TIMERPROC)
BOOL WINAPI SetWindowTextW(_In_ HWND, _In_opt_ LPCWSTR)
BOOL WINAPI IsZoomed(_In_ HWND)
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
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 EndPaint(_In_ HWND, _In_ const PAINTSTRUCT *)
BOOL WINAPI UpdateWindow(_In_ HWND)
HWND WINAPI GetParent(_In_ HWND)
HACCEL WINAPI LoadAcceleratorsW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
LRESULT WINAPI DispatchMessageW(_In_ const MSG *)
int WINAPI TranslateAcceleratorW(_In_ HWND, _In_ HACCEL, _In_ LPMSG)
BOOL WINAPI OffsetRect(_Inout_ LPRECT, _In_ int, _In_ int)
int WINAPI SetScrollInfo(_In_ HWND, _In_ int, _In_ LPCSCROLLINFO, _In_ BOOL)
BOOL WINAPI ShowScrollBar(_In_ HWND, _In_ int, _In_ BOOL)
int WINAPI GetScrollPos(_In_ HWND, _In_ int)
BOOL WINAPI InvalidateRect(_In_opt_ HWND, _In_opt_ LPCRECT, _In_ BOOL)
#define MAKEINTRESOURCEW(i)
HBITMAP WINAPI LoadBitmapW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
BOOL WINAPI DestroyAcceleratorTable(_In_ HACCEL)
HDC WINAPI BeginPaint(_In_ HWND, _Out_ LPPAINTSTRUCT)
BOOL WINAPI KillTimer(_In_opt_ HWND, _In_ UINT_PTR)
#define SetWindowLongPtrW
BOOL WINAPI InflateRect(_Inout_ LPRECT, _In_ int, _In_ int)
struct _WINDOWPLACEMENT WINDOWPLACEMENT
BOOL WINAPI GetScrollInfo(_In_ HWND, _In_ int, _Inout_ LPSCROLLINFO)
BOOL WINAPI IsWindowVisible(_In_ HWND)
BOOL WINAPI DestroyWindow(_In_ HWND)
HICON WINAPI LoadIconW(_In_opt_ HINSTANCE hInstance, _In_ LPCWSTR lpIconName)
BOOL WINAPI MoveWindow(_In_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ BOOL)
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
SHORT WINAPI GetKeyState(_In_ int)
BOOL WINAPI SetRect(_Out_ LPRECT, _In_ int, _In_ int, _In_ int, _In_ int)