Windows 7 Exe Buttons Scratch «Complete»

Windows 7.EXE Buttons True Bonus : A collection specifically hosting button assets and "EXE" style modifications.

For simplicity (and "scratch" purity), we will use the parent window to track cursor position relative to the button.

case WM_CREATE: g_button.rect.left = 50; g_button.rect.top = 50; g_button.rect.right = 150; g_button.rect.bottom = 90; g_button.state = BUTTON_NORMAL; g_button.text = L"Click Me"; // Create a child window that will own the button's drawing g_button.hwnd = CreateWindow(L"STATIC", L"", WS_CHILD | WS_VISIBLE | SS_OWNERDRAW, 50, 50, 100, 40, hwnd, (HMENU)1, GetModuleHandle(NULL), NULL); break; windows 7 exe buttons scratch

ShowWindow(hwnd, nCmdShow); UpdateWindow(hwnd);

MARGINS margins = 10,10,10,10; DwmExtendFrameIntoClientArea(hwnd, &margins); Windows 7

Add this to your WindowProc :

We will create a custom button as a child window. Our WindowProc will handle: Our WindowProc will handle: You can find pre-made

You can find pre-made "pieces" and sprite sheets in these community-made studios:

To capture the iconic "Aero" look of Windows 7, you need to use gradients and transparency. MicroNugget: How to Design Multi-State Buttons in Scratch