Jump to content
View in the app

A better way to browse. Learn more.

Tuts 4 You

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[solved] using transparent png as window like uPPP (c++)

Featured Replies

Posted

I created a simple oval png and used it as the frame window of my application.

I noticed that some patch used pnglib and UpdateLayeredWindow to realize regioned

and transparent window.

Any buddy could fix my code? Thanks a lot.

Here's the main code:


//UpdateLayeredWindow using Visual Studio 2003 above
//or VC6 with upgraded SDK, tools->options->directories
//set include path of newer SDK
case WM_CREATE:
PNG_Init(&g_pnginfo);
PNG_LoadResource(&g_pnginfo, g_hInst, MAKEINTRESOURCE(IDR_PNG_FRAME));
PNG_Decode(&g_pnginfo);
g_bmpHandle = PNG_CreateBitmap(&g_pnginfo, hwnd, PNG_OUTF_AUTO, false);
PremultipliedAlpha(g_bmpHandle);
return 0;
case WM_PAINT:
hdc = BeginPaint(hwnd, &ps);hdcMem = CreateCompatibleDC(hdc);
SelectObject(hdcMem, g_bmpHandle);
BitBlt(hdc, 0, 0, g_pngWidth, g_pngHeight, hdcMem, 0, 0, SRCCOPY);
SetWindowLong(hwnd, GWL_EXSTYLE, GetWindowLong(hwnd, GWL_EXSTYLE) | WS_EX_LAYERED);
UpdateLayeredWindow(hwnd, hdc, 0, 0, hdcMem, 0, 0, &bf, ULW_ALPHA);
DeleteDC(hdcMem);EndPaint(hwnd, &ps);
return 0;
case WM_RBUTTONDOWN:
case WM_DESTROY:
PNG_Cleanup(&g_pnginfo);
PostQuitMessage(0);
return 0;

Attachment is the full source cpp and exe file.

pngAsWindow.zip

Edited by alaphate

  • Author

Ufo-Pu55y, thank you so much!

Create an account or sign in to comment

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.