upsie daisy :D wrong question. hope someone with enough power will delete these 2 comments.
.sorry
Main Topics
Browse All TopicsHello!
If i set the style of a foreign window (e.g. Notepad) to WS_EX_LAYERED then the window flickers.
Example:
var
h: Hwnd;
style: integer;
begin
h:=FindWindow(nil,'Untitle
if h<>0 then
begin
style:=GetWindowLong(h,GWL
SetWindowLong(h,GWL_EXSTYL
SetLayeredWindowAttributes
//Restore
SetWindowLong(h, GWL_EXSTYLE, style);
SendMessage(h, WM_SETREDRAW, 1, 0);
RedrawWindow(h, nil, 0, RDW_ERASE or RDW_FRAME or RDW_INVALIDATE or RDW_ALLCHILDREN);
end;
end;
I tried to hook some functions and my experiences are following: After the calling of SetWindowLong (after WM_STYLECHANGING and before WM_STYLECHANGED) the system hides the window for a moment and when it comes back the background is black. I don't know how can i prevent this hiding/redrawing method.
Is there any way to prevent this flickering effect after the SetWindowLong function?
Thanks in advance!
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
when youre adding the alpha-layer functionality to the window, its canvas has another structure. hence, the entire window has to be completely re-drawn. this cant be prevented. even a 100% visible window consumes a lot more cpu-cycles when parts of it must be redrawn (try to drag such a window around, it shouldnt be as smooth as normal windows).
No comment has been added to this question in more than 21 days, so it is now classified as abandoned.
I will leave the following recommendation for this question in the Cleanup Zone:
Accept AmigoJack's comment as answer {http:#17454156}
Any objections should be posted here in the next 4 days. After that time, the question will be closed.
ziolko
Experts Exchange Cleanup Volunteer
Business Accounts
Answer for Membership
by: ciulyPosted on 2006-09-04 at 14:04:47ID: 17451869
quote from MSDN: http://msdn.microsoft.com/ library/de fault.asp? url=/libra ry/ en-us/w 2kmsgs/378 4.asp
"Request ownership of the mutex semaphore; then retry the command. You may have to contact the supplier of the running application."
I don't think there is any way you can get a hold of a mutex to release it as this would be a major security risk (there are system resources that rely on mutexes ;) )