Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search

[REBOL] Re: Cool API Function

From: jurgens:akcorp at: 31-Jan-2003 18:32

Well, I am not sure if everything else is correct about your code sample but it appears you are missing a necessary step: To have a dialog box come up as a translucent window, first create the dialog as usual. Then, on WM_INITDIALOG <>, set the layered bit of the window's extended style and call SetLayeredWindowAttributes <> with the desired alpha value. The code might look like this: // Set WS_EX_LAYERED on this window SetWindowLong(hwnd, GWL_EXSTYLE, GetWindowLong(hwnd, GWL_EXSTYLE) | WS_EX_LAYERED); // Make this window 70% alpha SetLayeredWindowAttributes(hwnd, 0, (255 * 70) / 100, LWA_ALPHA); (you can get to this doc by clicking the using layered windows link on the API page you provided a link to (and then click the same link on that page again to get to the above doc) HTH, Burt Terry Brownell wrote: