C
C
CodeInside2017-05-20 16:33:31
C++ / C#
CodeInside, 2017-05-20 16:33:31

How to set window transparency (or why it doesn't work)?

I'm trying to initially set the transparency of the window, but it doesn't work (both transparency and color change):

BOOL MainDlg::Cls_OnInitDialog(HWND hwnd, HWND hwndFocus, LPARAM lParam)
{
  SetLayeredWindowAttributes(hwnd, RGB(43, 45, 66), 128, LWA_ALPHA);

  return TRUE;
}

I tried to do something according to this article https://msdn.microsoft.com/en-us/magazine/ee819134.aspx , but for example I don’t know what the Verify function is and what library to take it from. Can you tell me how to make the window transparent?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question