Jump to content

Recommended Posts

Posted

I'm trying to overlay a company logo to external software. I can get the logo to appear and stay where I want it in fullscreen but when the program window is resized the logo disappears. I tried implementing a number of script examples by UEZ with no luck.

If I placed the logo on the left side of the program window it stays in place no matter what the window size. I need it to be on the right side of the window.

#include <GDIPlus.au3>
#include <GuiConstantsEx.au3>

Global $hGUI, $hImage, $hGraphic

WinWait("[CLASS:Waltec]", "", 10)
$hGUI = WinGetHandle("[CLASS:Waltec]")

_GDIPlus_StartUp()
$hImage   = _GDIPlus_ImageLoadFromFile("C:\Users\lowbred\Desktop\logo.png")
$hImage_new = _GDIPlus_ImageResize($hImage, 155, 26)

Do
$hGraphic = _GDIPlus_GraphicsCreateFromHWND($hGUI)

_GDIPlus_GraphicsDrawImage($hGraphic, $hImage_new, 1109, 39) ;8px offset with x, 9px offset with y and idk why?

If Not ProcessExists("Waltec.exe") Then
    Exit
EndIf
Until GUIGetMsg() = $GUI_EVENT_CLOSE

_GDIPlus_ImageDispose($hImage)
_GDIPlus_ImageDispose($hImage_new)
_GDIPlus_ShutDown()

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...