Archive: Information!


Help Needed!
Hello,

Anyone could help me!

I'm making/writing a background program(bitmap) that runs under installation with the help av win32(c++).
I would like anyone could help me, how can I make a window that has caption/title bar and icon at upper left corner but doesn't show at taskbar!

I tried most of the window styles including WS_EX_TOOLWINDOW but it doesn't show icon at upper left corner!

Could anyone guide me!

Help me as soon as possible.

Best regards
Shanker


MSDN October 2001
The October 2001 MSDN Library contains the following text in a document called "The Taskbar" :-

Managing Taskbar Buttons
The Shell creates a button on the taskbar whenever an application creates a window that isn't owned. To ensure that the window button is placed on the taskbar, create an unowned window with the WS_EX_APPWINDOW extended style. To prevent the window button from being placed on the taskbar, create the unowned window with the WS_EX_TOOLWINDOW extended style. As an alternative, you can create a hidden window and make this hidden window the owner of your visible window.

The Shell will remove a window's button from the taskbar only if the window's style supports visible taskbar buttons. If you want to dynamically change a window's style to one that doesn't support visible taskbar buttons, you must hide the window first (by calling ShowWindow with SW_HIDE), change the window style, and then show the window.
I'll see if I can find some example code for you.

---

Ximon Eighteen
Programmer @ Advent Publishing Systems
email: ximon_eighteen@3b2.com
& msn: ximon_eighteen@hotmail.com

Hidden Windows Unleashed
It seems that the secret is to use a WM_POPUP window that has a hidden parent window. The following code works :- (it's not quoted from anywhere, just looks neater in the quote box ;))

I doubt you need the #defines for Win2k (the 0x0500 stuff).

[edit by Smile2Me]
Message was much too long. Code has been attached to the next post. Read this.

For text, please try and keep it to 3 lines max.
I understand that messages sometimes need to be longer to explain clearly the problem or the solution, but if you can reduce the length by attaching code instead of posting it, please do so.
[/edit]

The code.

-Hendri.


3 lines!!! What's the point in that?

Well I'm not attaching/zipping stuff in future, I'll just not post it at all.... I can't believe that rule.


Please cool down Ximon,

the rule is, as mentioned in the Forum rules, to keep the Forum neat. As I already explained, I'm NOT very strict at this point (otherwise I need to edit almost all posts), but If you can minimize please help us to avoid annoying long posts. See the rules for more information.

I don't think it's that much trouble. I'm not asking that much. Please keep sharing your knowledge with us.

-Hendri.


Please see this thread:

http://forums.winamp.com/showthread....threadid=88802

I have started this program, you can see all you need in there. If you can help me fix that annoying hooking bug it will be finally ready. I don't think I will be able to finish this alone this month so I will appreciate it if you can help me out.

KiCHiK


Confused
I have to say I'm a little confused. I downloaded your code and built and ran it and yes sometimes it leaves the .exe behind in the $TEMP directory, I assume this is your problem.

However, I am assuming that this is because you are immediately calling Delete on the file after sending the close message to the background picture application. Sometimes therefore the message might not have been received and fully acted upon by the time the Delete action is attempted.

I changed your delete code to the following and have not been able to reproduce the problem anymore. Am I missing something? (note this example is not very safe, you might only want to retry about 5 times max, possibly with a tiny delay between delete attempts).

  retry:
Delete "$TEMP\_bg.exe"
IfFileExists "$TEMP\_bg.exe" retry 0
And do the same for the bmp file too.

I really think I must be missing the point of your thread about a problem with the code. I downloaded code from Hendri's website, that was right yes?

Ximon,

I'm getting confused now too.

First of all, KiCHiK has a problem with the dll not getting deleted. His code is on his website. Second, Shanker has the problem described in the post by him. His code is on my website.

Furthermore, two versions are available on my website. The one by Shanker (in C) and the one by me (in Delphi). Both codes already contain "Sleep 500" before deleting the files. I saw Shanker disabled that command in his code. Maybe it was not necessary anymore.

Please clarify what code you downloaded.

-Hendri.


I think I understand now - I knew I must have something wrong.

From various comments (such as "Balashanker has put the program to C." and "Thanks to Balashanker NSISBGImage will have resizing support tomorrow") I got the idea that Balashankar had been working on the same code as Kichik and that therefore the Balashankar code on your site was what was being talked about.

What made me confused was the mention of a DLL when all I could see was an EXE ;)

When I saw that the Sleep 500 had been commented out, and that running the BG stuff on my machine sometimes left the .EXE file behind, I figured that the Sleep 500 either hadn't solved the problem or was an unsatisfactory solution... anyway I'll look at the Kichik site when I get home from work and see what I can make of that instead of the other one :p

X


The DLL function Destroy waits for the EXE's process to end there for it can be deleted. The problem is with the DLL and something with those damn hooks. When I run the compiled installer with NSISBGImage a couple of times my Windows starts acting crazy. Menus no longer work and it just won't react to some of my actions. Hooks can not be set anymore either... Very weird stuff.

The resizing has been partly implented. I just need to put the proper functions in the DLL.

My program is supposed to solve the problem that makes the background disappear after you Alt+Tab out of NSIS and back. For this I encapsulated NSIS window inside my window using a hook. And that is where all the problems began. I triple checked I am freeing all the things needed to be freed yet the DLL does not get deleted and this weird stuff I was talking about before happens.