Re: SetWindowLong and WS_EX_LAYERED makes Windows invisible,...
- From: "Kerem Gümrükcü" <kareem114@xxxxxxxxxxx>
- Date: Sat, 31 Mar 2007 16:46:02 +0200
"Norbert Unterberg" <nunterberg@xxxxxxxxxxxxxxxxx> schrieb im Newsbeitrag
news:%23Whm%23g5cHHA.5044@xxxxxxxxxxxxxxxxxxxxxxx
Kerem Gümrükcü schrieb:
when i set inside the OnIninitDialog Member the
Windows WS_EX_LAYERED (with ::SetWindowLong)
Style the Window will not me shown, The App is a single
Modal Window. I can see the App in the Taskbar and use
its system menu but cant "restore" th window,..
Is it the wrong Place to set the WS_EX_LAYERED?
If yes, where to place the function call,...
The usual place to set window styles is before the window is created. In
MFC you would overload PreCreateWindow.
If you want to set the style after window creation, have a look at
ModifyStyle and ModifyStyleEx.
In both cases make sure you only add the new style flag. Just setting the
ExStyle to WS_EX_LAYERED cleares all the other flags that are present.
How did you use ::SetWindowLong? Don't forget that you need to set
GWL_EXSTYLE and not GWL_STYLE, and that you should not overwrite the
existing flags. And note that SetWindowLong is deprecated and you should
use SetWindowLongPtr instead. But in your case, you should use
ModifyStyleEx or PreCreateWindow.
Norbert
Hi,
i found out, that this is not a settting of "wrong styles" problem. Even
when i set
the styles by hand inside my .rc file, i get the same resut: The window is
not
visible, except the "tab" for the window in the taskbar and from there its
system menu is accessible, thats all! No Window visible. I must tell you
that
this dialog is a single Modal Dialog and these are its styles inside the .rc
file:
IDD_CHECKDISKSHELL_DIALOG DIALOGEX 0, 0, 327, 250
STYLE DS_SYSMODAL | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP |
WS_VISIBLE | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_CLIENTEDGE | WS_EX_APPWINDOW | WS_EX_LAYERED
I use Visual C++ 6 with all service packs. i dont have any other software on
my system, no other SDKs, no other DDKs, except the DotNET SDK 2.0.
Maybe this can lead to a solution fro my problem,...
Thanks in advance,...
Best regards
Kerem Gümrükcü
.
- References:
- SetWindowLong and WS_EX_LAYERED makes Windows invisible,...
- From: Kerem Gümrükcü
- Re: SetWindowLong and WS_EX_LAYERED makes Windows invisible,...
- From: Norbert Unterberg
- SetWindowLong and WS_EX_LAYERED makes Windows invisible,...
- Prev by Date: Re: Newbie question on embedding excel in a dialog based application
- Next by Date: Re: Project settings for final release
- Previous by thread: Re: SetWindowLong and WS_EX_LAYERED makes Windows invisible,...
- Next by thread: Timer and Event
- Index(es):
Relevant Pages
|