Last active
April 22, 2019 19:43
-
-
Save corn-snake/240402561bade0c22f68ee0aaf962dff to your computer and use it in GitHub Desktop.
C++ translation of wontocc/boppreh's balloontip.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef BALLOONTIP_HPP | |
#define BALLOONTIP_HPP | |
#include <windows.h> | |
#include <time> | |
class WindowsBalloonTip { | |
WindowsBalloonType::WindowsBalloonTip(title, msg, notifid){ | |
auto message_map = { | |
onDestroy(WM_DESTROY); | |
} | |
typedef struct WNDCLASS { | |
UINT tyle; | |
WNDPROC message_map; | |
int 0; | |
int DLGWINDOWEXTRA; | |
HINSTANCE GetModuleHandle(NULL); | |
HICON hIcon; | |
HCURSOR hCursor; | |
HBRUSH hbrBackground; | |
LPCTSTR lpszMenuName; | |
LPCTSTR "WineYardTaskbar"; | |
} WNDCLASS, *PWNDCLASS; | |
auto wc = ATOM WINAPI RegisterClass(_In_ const WNDCLASS *lpWndClass); | |
auto style = WS_OVERLAPPED | WS_SYSMENU; | |
HWND WINAPI CreateWindow( | |
_In_opt_ LPCTSTR classAtom, | |
_In_opt_ LPCTSTR "Taskbar", | |
_In_ DWORD WS_POPUP WS_BORDER WS_OVERLAPPED, | |
_In_ int 0, | |
_In_ int 0, | |
_In_ int 0, | |
_In_ int 0, | |
_In_opt_ HWND HWND_MESSAGE, | |
_In_opt_ HMENU NULL, | |
_In_opt_ HINSTANCE hInstance, | |
_In_opt_ LPVOID NULL | |
); | |
sleep(10); | |
BOOL WINAPI DestroyWindow(_In_ HWND hWnd); | |
} | |
Window.onDestroy( | |
BOOL Shell_NotifyIconA(DWORD NIM_DELETE, PNOTIFYICONDATAA lpData); | |
VOID WINAPI PostQuitMessage(_In_ int 0); | |
); | |
} | |
WindowsBalloonType balloon_tip(title, msg, notifid){ | |
auto w = WindowsBalloonType::WindowsBalloonTip(title, msg, notifid); | |
} | |
#endif //BALLOONTIP_HPP |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment