derceg / explorerplusplus

Explorer++ is a lightweight and fast file manager for Windows
https://explorerplusplus.com
GNU General Public License v3.0
2.44k stars 360 forks source link

I have corrected a problem that occurred when displaying images in the preview window in the original code. #419

Open xj123home opened 10 months ago

xj123home commented 10 months ago

When previewing an image at the bottom of the main window, the size of the thumbnail does not change with the height of the preview window. The aspect ratio of the thumbnail will only be adjusted after clicking on other images. When previewing an image on the right side of the main window, the thumbnail is displayed on the right side of the text block at its original size instead of the thumbnail, which makes it difficult to preview the complete image. When the preview window transitions from the right to the bottom, the aspect ratio of the thumbnail will not be adjusted accordingly with the window. It is still necessary to click on other images before the aspect ratio of the thumbnail can be adjusted. 222 777 屏幕截图 2023-12-26 192350

xj123home commented 10 months ago

I really enjoyed this project,I made some modifications to display the image using the StretchBlt function in the code. This way, whether the preview window is at the bottom or on the right, the size of the preview image can change with the height and width of the window when previewing the image. Additionally, when the window is on the right, the preview image can be displayed below the text block instead of to the right. However, there is another issue. When the preview window is at the bottom, the original functions of changing the mouse to a hand shape and clicking on the preview image to open the image are still available. However, when the preview window is on the right, these functions are no longer available. I spent three days modifying it and it didn't meet my expectations,,As a beginner in C++, I do not know how to modify the code for these functions. I hope the author or other experts can improve it.

Attached below is the code I modified: DisplayWindow.zip

666

xj123home commented 10 months ago

I am very happy because today I solved the problem I mentioned earlier with just one variable. Now when the preview window displays the image on the right, a hand shaped pointer can also appear and click to open the image. Thank you to the author for developing this Explorer++project, which allowed me to appreciate the charm of C++. At this stage, I would like to further explore how to preview text files. 111

xj123home commented 9 months ago

I am very happy to have achieved the goal of previewing TXT files! And the function of turning the mouse over the preview image into a hand shaped pointer and clicking to open it is still available. Currently, it only previews the encoding formats of ANSI and UTF8, but finally it has this feature. Let's celebrate. 111