NO

Author Topic: WS_EX_LAYERED  (Read 11649 times)

czerny

  • Guest
WS_EX_LAYERED
« on: December 19, 2014, 10:50:47 AM »
WS_EX_LAYERED is not recognized as extended window style in the dialog editor.

Offline frankie

  • Global Moderator
  • Member
  • *****
  • Posts: 2113
Re: WS_EX_LAYERED
« Reply #1 on: December 19, 2014, 01:27:11 PM »
WS_EX_LAYERED is not recognized as extended window style in the dialog editor.
WS_EX_LAYERED is defined for WINVER>=0x500.
To use it you have to define the window version you are working on if you development HW is from a previous version (EDIT) working from WIN2K on.
Code: [Select]
#define WIN32_LEAN_AND_MEAN
#define WINVER 0x0500                //define version
#define _WIN32_WINNT 0x0500

#include <windows.h>
#include <windowsx.h>
#include <commctrl.h>
    ...
NB This has been verified on PellesC V8RC6, don't know if it worked on previous versions of the compiler.
« Last Edit: December 19, 2014, 01:42:27 PM by frankie »
"It is better to be hated for what you are than to be loved for what you are not." - Andre Gide

Offline frankie

  • Global Moderator
  • Member
  • *****
  • Posts: 2113
Re: WS_EX_LAYERED
« Reply #2 on: December 19, 2014, 02:04:31 PM »
WS_EX_LAYERED is not recognized as extended window style in the dialog editor.
I have not well understood what's wrong for you.
If you mean that the WS_EX_LAYERED is not in the dialog properties this could be a feature request, if you handwrited it in the text version of an RC and discovered errors opening it again with dialog editor is a different thing.
Anyway this flag up to Win8 could be used only on top level windows.
Could you be more specific please?
"It is better to be hated for what you are than to be loved for what you are not." - Andre Gide

czerny

  • Guest
Re: WS_EX_LAYERED
« Reply #3 on: December 19, 2014, 04:02:47 PM »
WS_EX_LAYERED is not recognized as extended window style in the dialog editor.
if you handwrited it in the text version of an RC and discovered errors opening it again with dialog editor is a different thing.
That is the point.

Offline frankie

  • Global Moderator
  • Member
  • *****
  • Posts: 2113
Re: WS_EX_LAYERED
« Reply #4 on: December 19, 2014, 04:26:39 PM »
WS_EX_LAYERED is not recognized as extended window style in the dialog editor.
if you handwrited it in the text version of an RC and discovered errors opening it again with dialog editor is a different thing.
That is the point.
Yes, but the compiler (porc) seems to work anyway, while the IDE is unable to handle the extended style.
So is it a bug or a missing feature?
« Last Edit: December 19, 2014, 04:47:27 PM by frankie »
"It is better to be hated for what you are than to be loved for what you are not." - Andre Gide

czerny

  • Guest
Re: WS_EX_LAYERED
« Reply #5 on: December 19, 2014, 05:10:27 PM »
Yes, but the compiler (porc) seems to work anyway, while the IDE is unable to handle the extended style.
So is it a bug or a missing feature?
This style is known since win2k. So I would say it is a bug!

Offline frankie

  • Global Moderator
  • Member
  • *****
  • Posts: 2113
Re: WS_EX_LAYERED
« Reply #6 on: December 19, 2014, 08:05:48 PM »
This style is known since win2k. So I would say it is a bug!
Yes, but was limited to top level windows up to WIN8 that extend it to all class of windows (including child windows). In that perspective it was not functional for dialog windows, and maybe working only on WIN8.
"It is better to be hated for what you are than to be loved for what you are not." - Andre Gide

czerny

  • Guest
Re: WS_EX_LAYERED
« Reply #7 on: December 19, 2014, 10:34:10 PM »
Here is an example (not C) for a dialog with this style:

Offline TimoVJL

  • Global Moderator
  • Member
  • *****
  • Posts: 2115
Re: WS_EX_LAYERED
« Reply #8 on: December 19, 2014, 11:23:45 PM »
Maybe usage should be done at runtime, look here
May the source be with you

czerny

  • Guest
Re: WS_EX_LAYERED
« Reply #9 on: December 20, 2014, 11:31:07 AM »
Maybe usage should be done at runtime, look here
That is another possibility.

Offline frankie

  • Global Moderator
  • Member
  • *****
  • Posts: 2113
Re: WS_EX_LAYERED
« Reply #10 on: December 20, 2014, 05:20:18 PM »
Hmmm
I still think that this is not a bug, but a feature request...
Timo you know if this flag is handled in the commercial version of VC++ ?
Czerny I'm looking at your sample, it doesn't seem to be a compiled resource, but something created on the fly... (as Timo said)
"It is better to be hated for what you are than to be loved for what you are not." - Andre Gide

Offline TimoVJL

  • Global Moderator
  • Member
  • *****
  • Posts: 2115
Re: WS_EX_LAYERED
« Reply #11 on: December 20, 2014, 06:02:34 PM »
Timo you know if this flag is handled in the commercial version of VC++ ?
I have only Express versions of Visual C++.
May the source be with you

Offline frankie

  • Global Moderator
  • Member
  • *****
  • Posts: 2113
Re: WS_EX_LAYERED
« Reply #12 on: December 20, 2014, 07:31:14 PM »
I have only Express versions of Visual C++.
Me too  ;D
If this flag is of no standard use I see no bug here, may I move this topic to feature requests?
"It is better to be hated for what you are than to be loved for what you are not." - Andre Gide

czerny

  • Guest
Re: WS_EX_LAYERED
« Reply #13 on: December 20, 2014, 10:23:27 PM »
I have only Express versions of Visual C++.
Me too  ;D
If this flag is of no standard use I see no bug here, may I move this topic to feature requests?
Do that!