Skip to content

Instantly share code, notes, and snippets.

View nperovic's full-sized avatar

Nikola nperovic

View GitHub Profile
@nperovic
nperovic / GroupBoxEx.ahk
Created June 8, 2024 19:39
Customise a GroupBox's border size and text/ background colour
/************************************************************************
* @description Customise a GroupBox's border size and text/ background colour
* @file GroupBoxEx.ahk
* @author Nikola Perovic
* @link https://github.com/nperovic
* @date 2024/06/09
* @version 1.0.0
***********************************************************************/
#Requires AutoHotkey v2.1-alpha.13
@nperovic
nperovic / DwmSetWindowAttribute.ahk
Created May 6, 2024 02:42
Sets the value of Desktop Window Manager (DWM) non-client rendering attributes for a window. For programming guidance, and code examples, see Controlling non-client region rendering.
#Requires AutoHotkey v2
/**
* Sets the value of Desktop Window Manager (DWM) non-client rendering attributes for a window. For programming guidance, and code examples, see Controlling non-client region rendering.
* @param hwnd The handle to the window for which the attribute value is to be set.
* @param dwAttribute A flag describing which value to set, specified as a value of the [DWMWINDOWATTRIBUTE](https://learn.microsoft.com/en-us/windows/desktop/api/dwmapi/ne-dwmapi-dwmwindowattribute) enumeration. This parameter specifies which attribute to set, and the pvAttribute parameter points to an object containing the attribute value.
*
* > ___| prop
* > :-:|:-----------------------------------------
* > 1 | ~DWMWA_NCRENDERING_ENABLED~
@nperovic
nperovic / SetHotkeyGui.ahk
Created May 2, 2024 02:21
Create an interface that allows users to customize hotkeys.
/************************************************************************
* @description Create an interface that allows users to customize hotkeys.
* @file SetHotkeyGui.ahk
* @link https://github.com/nperovic
* @author Nikola Perovic
* @date 2024/04/22
* @version 1.0.0
***********************************************************************/
#Requires AutoHotkey v2
@nperovic
nperovic / Dark_MsgBox.ahk
Last active July 18, 2024 13:48
Apply dark theme to your built-in MsgBox and InputBox.
/************************************************************************
* @description Apply dark theme to the built-in MsgBox.
* @file Dark_MsgBox.ahk
* @link https://gist.github.com/nperovic/0b9a511eda773f9304813a6ad9eec137
* @author Nikola Perovic
* @date 2024/06/09
* @version 1.1.0
***********************************************************************/
#Requires AutoHotkey v2.1-alpha.13
#Module Dark_MsgBox
@nperovic
nperovic / SetWindowColor.ahk
Last active July 18, 2024 13:42
Set the color of a window's caption, text, or border. This is supported starting with Windows 11 Build 22000.
#requires AutoHotkey v2
/**
* Sets the attributes of a window. Specifically, it can set the color of the window's caption, text, and border.
* @param {integer} hwnd Window handle.
* @param {integer} [titleText] Specifies the color(BGR) of the caption text. Specifying `0xFFFFFFFF` will reset to the system's default caption text color.
* @param {integer} [titleBackground] Specifies the color(BGR) of the caption. Specifying `0xFFFFFFFF` will reset to the system's default caption color.
* @param {integer} [border] Specifies the color(BGR) of the window border.
* - Specifying `0xFFFFFFFE` will suppress the drawing of the window border.
* - Specifying `0xFFFFFFFF` will reset to the system's default border color.
@nperovic
nperovic / windows_API_Constants.code-snippets
Created March 6, 2024 06:14
Windows API Constants Snippet for VS Code
This file has been truncated, but you can view the full file.
{
"BCM_FIRST": {
"prefix" : "BCM",
"body" : "BCM_FIRST := 0x1600",
"description": "Windows - GUI - Controls - Button - Messages (Button Messages)"
},
"BCM_GETIDEALSIZE": {
"prefix" : "BCM",
"body" : "BCM_GETIDEALSIZE := 0x1601",
"description": "Windows - GUI - Controls - Button - Messages (Button Messages)"