Skip to content

Instantly share code, notes, and snippets.

@JoeGlines
Created October 22, 2021 17:24
Show Gist options
  • Save JoeGlines/84ab6f8766da1ae908088e24415a9e30 to your computer and use it in GitHub Desktop.
Save JoeGlines/84ab6f8766da1ae908088e24415a9e30 to your computer and use it in GitHub Desktop.
from our live call on 10/22/2021- Hellbent's demo
#Include <My Altered GDIP lib> ;update this path to your GDI library
#SingleInstance, Force
Gdip_StartUp()
image1 := Gdip_CreateBitmapFromFile("C:\Users\Hellbent\Desktop\AHK Tools\Color Picker Mini\Screen Shots\20211021210744.png")
image2 := Gdip_CreateBitmapFromFile("C:\Users\Hellbent\Desktop\AHK Tools\Color Picker Mini\Screen Shots\20211022094124.png")
pBitmap := Gdip_CreateBitmap( 400 , 400 ) , G := Gdip_GraphicsFromImage( pBitmap ) , Gdip_SetSmoothingMode( G , 2 )
Gui Color, 1a1a1a
Gui Font, S13, Segoe Script
Gui +LastFound +AlwaysOnTop +ToolWindow
x := 50
Gdip_DrawImage( g , image1 , x, 0, 111, 194 )
Gdip_DrawImage( g , image2 , 110, 110, 111, 194 )
hBitmap := Gdip_CreateHBITMAPFromBitmap(pBitmap)
Gui Add, Picture, BackgroundTrans x30 y80 w400 h400 0xE hwndPicHwnd,% "HBitmap:"
SetImage( PicHwnd , hBitmap )
Gui Show,
return
GuiClose:
GuiContextMenu:
*ESC::ExitApp
Numpad1::
x+=50
Gdip_GraphicsClear( G )
Brush := Gdip_BrushCreateSolid( "0xFF004444" ) , Gdip_FillRectangle( G , Brush , -1 , -1 , 202 , 202 ) , Gdip_DeleteBrush( Brush )
Gdip_DrawImage( g , image1 , x, 0, 111, 194 )
Gdip_DrawImage( g , image2 , 110, 110, 111, 194 )
hBitmap := Gdip_CreateHBITMAPFromBitmap(pBitmap)
SetImage( PicHwnd , hBitmap )
return
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment