Nick86 Posted August 22, 2023 Posted August 22, 2023 Hi all. There is a third-party program, a development environment, it is not implemented very well, since it does not provide for zooming in the workspace, which makes it very difficult to work when the project is too large. Can anyone tell me if it is possible to somehow intercept the internal area of the program and change the scale of this area.
Nick86 Posted August 22, 2023 Author Posted August 22, 2023 (edited) The working field of the program has its own class CView. Those. can be intercepted. I don't know how to change the scale. Edited August 22, 2023 by Nick86
Andreik Posted August 22, 2023 Posted August 22, 2023 That's a strange request. If the zoom it's not implemented in the software how do you expect to make it work outside the application?
Nick86 Posted August 22, 2023 Author Posted August 22, 2023 (edited) #include <WinAPISysWin.au3> #include <WindowsConstants.au3> #include <WinAPI.au3> HotKeySet("{ESC}", "_exit") HotKeySet("t", "_resize") While 1 Sleep(100) WEnd Func _resize() Local $hWnd = WinWaitActive("[CLASS:CMainFrame]", "", 10) Local $hHandl = ControlGetHandle($hWnd,"","[Class:CView]") $pos = WinGetPos($hHandl) WinMove($hHandl, '', $pos[0], $pos[1], 800, 600) EndFunc Func _exit() Exit EndFunc I tried this and it turned out like this, and I can’t find something else for now. Edited August 22, 2023 by Nick86
Nick86 Posted August 22, 2023 Author Posted August 22, 2023 12 minutes ago, Andreik said: That's a strange request. If the zoom it's not implemented in the software how do you expect to make it work outside the application? Approximately as I gave an example above. Then I think how to scale this window.
Andreik Posted August 22, 2023 Posted August 22, 2023 But this is not zooming, it's just a window resize. What I am missing? Maybe I didn't understand what do you mean by scaling.
Nick86 Posted August 22, 2023 Author Posted August 22, 2023 Maybe through _WinAPI there are some possibilities of scaling.
Nick86 Posted August 22, 2023 Author Posted August 22, 2023 (edited) 7 minutes ago, Andreik said: But this is not zooming, it's just a window resize. What I am missing? Maybe I didn't understand what do you mean by scaling. I just need scaling, zooming. I'm thinking of intercepting the inner area and somehow changing the scaling through _WinAPI_, similar to how it is done in the display settings, where you can change the scale of the interface. Basically, I want to break this shit because the developers of this program don't want to do anything. Edited August 22, 2023 by Nick86
Nick86 Posted August 22, 2023 Author Posted August 22, 2023 Can somehow make this area think that the screen resolution has changed.
Nick86 Posted August 22, 2023 Author Posted August 22, 2023 I stumbled upon this topic, well, I haven’t figured out how to apply it yet.
Nine Posted August 22, 2023 Posted August 22, 2023 Or maybe this ? expandcollapse popup#include <GDIPlus.au3> #include <ScreenCapture.au3> #include <GUIConstants.au3> HotKeySet("{F1}", Zoom) HotKeySet("{ESC}", Terminate) _GDIPlus_Startup() While Sleep(500) WEnd Func Zoom() Local Static $bZooming = False Local $aPos, $hCapture, $hImage, $hZoom, $hGUI, $hGraphics, $iX = -1, $iY = -1 $bZooming = Not $bZooming While $bZooming $aPos = MouseGetPos() If $aPos[0] <> $iX Or $aPos[1] <> $iY Then If IsHWnd($hGUI) Then GUIDelete($hGUI) _GDIPlus_ImageDispose($hZoom) _GDIPlus_GraphicsDispose($hGraphics) EndIf $hCapture = _ScreenCapture_Capture("", $aPos[0] - 100, $aPos[1] - 100, $aPos[0] + 100, $aPos[1] + 100, False) $hImage = _GDIPlus_BitmapCreateFromHBITMAP($hCapture) _WinAPI_DeleteObject($hCapture) $hZoom = _GDIPlus_ImageResize($hImage, 400, 400) _GDIPlus_ImageDispose($hImage) $hGUI = GUICreate("", 400, 400, $aPos[0] - 200, $aPos[1] - 200, $WS_POPUP) GUISetState() $hGraphics = _GDIPlus_GraphicsCreateFromHWND($hGUI) _GDIPlus_GraphicsDrawImage($hGraphics, $hZoom, 0, 0) $iX = $aPos[0] $iY = $aPos[1] EndIf Sleep(100) WEnd GUIDelete($hGUI) _GDIPlus_ImageDispose($hZoom) _GDIPlus_GraphicsDispose($hGraphics) EndFunc Func Terminate() _GDIPlus_Shutdown() Exit EndFunc “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Debug Messages Monitor UDF Screen Scraping Round Corner GUI UDF Multi-Threading Made Easy Interface Object based on Tag
Nick86 Posted August 22, 2023 Author Posted August 22, 2023 Thank you. It works, but it's not what I need. It is necessary to change the area itself to the smaller side, so that more elements fit on the screen.
Nick86 Posted August 22, 2023 Author Posted August 22, 2023 6 minutes ago, Nine said: Or maybe this ? expandcollapse popup#include <GDIPlus.au3> #include <ScreenCapture.au3> #include <GUIConstants.au3> HotKeySet("{F1}", Zoom) HotKeySet("{ESC}", Terminate) _GDIPlus_Startup() While Sleep(500) WEnd Func Zoom() Local Static $bZooming = False Local $aPos, $hCapture, $hImage, $hZoom, $hGUI, $hGraphics, $iX = -1, $iY = -1 $bZooming = Not $bZooming While $bZooming $aPos = MouseGetPos() If $aPos[0] <> $iX Or $aPos[1] <> $iY Then If IsHWnd($hGUI) Then GUIDelete($hGUI) _GDIPlus_ImageDispose($hZoom) _GDIPlus_GraphicsDispose($hGraphics) EndIf $hCapture = _ScreenCapture_Capture("", $aPos[0] - 100, $aPos[1] - 100, $aPos[0] + 100, $aPos[1] + 100, False) $hImage = _GDIPlus_BitmapCreateFromHBITMAP($hCapture) _WinAPI_DeleteObject($hCapture) $hZoom = _GDIPlus_ImageResize($hImage, 400, 400) _GDIPlus_ImageDispose($hImage) $hGUI = GUICreate("", 400, 400, $aPos[0] - 200, $aPos[1] - 200, $WS_POPUP) GUISetState() $hGraphics = _GDIPlus_GraphicsCreateFromHWND($hGUI) _GDIPlus_GraphicsDrawImage($hGraphics, $hZoom, 0, 0) $iX = $aPos[0] $iY = $aPos[1] EndIf Sleep(100) WEnd GUIDelete($hGUI) _GDIPlus_ImageDispose($hZoom) _GDIPlus_GraphicsDispose($hGraphics) EndFunc Func Terminate() _GDIPlus_Shutdown() Exit EndFunc Thank you. It works, but it's not what I need. It is necessary to change the area itself to the smaller side, so that more elements fit on the screen.
Nine Posted August 22, 2023 Posted August 22, 2023 Ok, didn't catch that. IDK how to do it. “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Debug Messages Monitor UDF Screen Scraping Round Corner GUI UDF Multi-Threading Made Easy Interface Object based on Tag
Nick86 Posted August 22, 2023 Author Posted August 22, 2023 14 minutes ago, Nine said: Ok, didn't catch that. IDK how to do it. I'll try different options later, it may turn out that through user32.dll.
UEZ Posted August 22, 2023 Posted August 22, 2023 You can use a Magnifier for inspiration. Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ
Nick86 Posted August 22, 2023 Author Posted August 22, 2023 (edited) 1 hour ago, UEZ said: You can use a Magnifier for inspiration. This does not fit. I need to make the workspace itself smaller so that more elements fit on the screen. This is not a trivial task, if I could get by with a magnifying glass, I would just download a ready-made application. It seems to me that user32.dll should be involved here. Edited August 22, 2023 by Nick86
Andreik Posted August 22, 2023 Posted August 22, 2023 You keep talking about user32.dll but I doubt you understand what it is. I am curious how it should be involved?
Nick86 Posted August 22, 2023 Author Posted August 22, 2023 (edited) 14 minutes ago, Andreik said: You keep talking about user32.dll but I doubt you understand what it is. I am curious how it should be involved? Something like MoveWindow, but as I understand it, WinMove is MoveWindow. In general, I don’t know, I’m digging in the direction of the capabilities of Windows itself, its api. https://learn.microsoft.com/en-us/windows/win32/api/ Edited August 22, 2023 by Nick86
Andreik Posted August 22, 2023 Posted August 22, 2023 There is no such WinAPI. Since the application doesn't implement such functionality probably the best you can get outside the application it's what guys suggested above.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now