|
By some reason this control is transparent in Vista task bar.
Run the example, then hide all windows and you will see that control is transparent and it is not looking good at all. How to make it opaque? I tried different styles, set black background - nothing helps, control is still transparent!
Any ideas how to fix it?
|
|
|
|
|
Ok, I figured out that it could be because of themes.
I tried to disable theme on control - it does not work (control is still transparent), but I can disable theme on any other window in the task bar...
PutWindowIntoTaskbar(...)
{
...
HWND hwnd = this->m_hWnd;
HRESULT res = ::SetWindowTheme(hwnd, _T(""), _T(""));
}
But what I do not understand is how icons on the buttons that are in the task bar are opaque?
Dima
|
|
|
|
|
hello
i am able to display a progress bar on my application without using MFC
but i want to show progress according to percentage completion of the task
Suppose i'm protecting my file, when i click start button it should start showing that
out of total size how much %age of total size is being protected.
thanks
|
|
|
|
|
The new file TTaskbarContainerTemplate.zip (available as soon as codeproject uploads it) contains the new template class TTaskbarContainer which is able to add different kind of controls like CStatic or CButton, etc... to the taskbar.
Known problems:
- Because of the fact that controls like CEdit contains a different number of method parameters in the Create method, the template could fail if you try to compile it. CEdit for instance has exactly one more parameter than CEdit or CStatic. In this case, just delete the first parameter in the create method of the template if you need to. I hope I will find a better solution as soon as possible.
- Change the parameter CWnd in the messagemap of this template to the classname from which you inherit
- The compilation of this template could cause some errors on Visual Studio 2005. I wrote it on VC++ 6.0
Fact for now is: The work with templates in VC++ 6.0 is not as easy as i thought. VC++ 6.0 seems to have bugs in this section. Everybody who wrote any kind of templates etc knows what i am taking about *g*
Happy coding
-- modified at 18:10 Saturday 31st March, 2007
|
|
|
|
|
CNProgressBar::m_bCreated property is probably not initialized properly.
The following code sample in CNProgressBar::PutWindowIntoTaskbar() won't work if this
property is not initialized:
...
if (m_bCreated != true)
{
this->Create(PBS_SMOOTH | WS_CHILD | WS_VISIBLE , coRect, CWnd::FromHandle(m_pcoParent->GetHWnd()), NULL);
m_bCreated = true;
}
...
Could you give some hints on possible solutions of the problem?
Thanks for your attention.
|
|
|
|
|
Thanks for testing
You are right. I declared it in NProgressbar.h but forgot to initialize it in the constructor in NProgressBar.cpp.
Add the line line:
this->m_bCreated = false;
to the CNProgressBar::CNProgressBar(CWnd* pcoParent) constructor of NProgressbar.cpp (to the top!)
I won't upload it again just for this one bugfix. Maybe I should do a complete rework of the the code so that it would be completly dynamic. Lets see if i have enoth time for that *g*
|
|
|
|
|
I never learnd VC++,so i want a C# version,please.
|
|
|
|
|
A c# version is not planned at this time.
|
|
|
|
|
we very need a c# version ,please
|
|
|
|
|
Hello,
Can you separate this into 2 parts
1) the TaskBarHandler
2) the control you will add.
Also will be fine, if you can add more than one control.
Like this
class CTaskBarHandler
{
public:
CTaskBarHandler();
virtual ~CTaskBarHandler();
void Add(CWnd *pWnd);
void Remove(CWnd *pWnd);
CWnd *GetWnd() { return m_pWndShellTray; }
}
CTaskBarHandler& TheTaskBarHandler();
void MyApplic::OnInitDialog()
{
TheTaskBarHandler().Add(new CSearchEdit(CRect(0,0,50,20), TheTaskBar().GetWnd() );
TheTaskBarHandler().Add(new CStateStatic(CRect(0,0,70,20), TheTaskBar().GetWnd() );
}
Jimmy
|
|
|
|
|
Version 1.0.2 is well now uploaded. It depends on the codeproject team how fast it will be available
This update contains just the bugfix for zerolan22's problem
-- modified at 15:02 Monday 24th July, 2006
|
|
|
|
|
Thanks for the update.
Could you also update the articles images to use PNG format instead of JPEG, since some of the images are not very clear.
|
|
|
|
|
any one help i need sample in VB net 2003
Thx
|
|
|
|
|
In fact, this is the only one sample code of such a control.
I think only IBM published such a kind of control.
This code uses the WINAPI wich you can also use in VB. You
need to import the prototypes in your vb project and translate
some parts of this code to vb.
|
|
|
|
|
If you enlarge you TaskBar to it's double height (if its horizontal), while the control is displayed,
it begins to loose it's position in the taskbar. You are then able
to move other toolbars (like the language toolbar) over and across the control (sometimes
begind it).
However, this problem seem's to go away when you first enlarge the taskbar and then start
the control.
Does it need some additional resize message hooking ?
Markus
|
|
|
|
|
Well, this version does not include any kind of hooking. It uses just the polling mode. Every time the taskbar size gets changed, the progressbar should resize automaticly depending on the recangles of the specified taskbar classes. It seems to be an actualizing problem.
This problem has nothing to do with message hooking. I wasn't able to find a way for message hooking especially for the taskbar (not yet)
I'll take a look on it. Maybe I'll find a solution.
Thanks for testing!
-- modified at 12:54 Friday 21st July, 2006
|
|
|
|
|
Hi,
I know, it's not real hooking, I just tend to use that word
if something is done not quite the normal way...even if it's
technically not correct
Thanks for you reply anyway.
I really like the approach on how this is implemented and
hope it's possible to overcome this actualization problem as this
is - so far - the only issue I've seen.
Good work!
|
|
|
|
|
Well done. I updated it this evening. It depends on the codeproject team how fast it will be available.
|
|
|
|
|
Well done indeed.
That fixed the issue.
Good stuff!
|
|
|
|
|
I have downloaded the source codes and recomplied it via visual studio 2005. I run the application on the platform whose version is windows 2000 server. The window of progressbar will be shown at first, but then it will be covered by the icon of application on the task bar after some minutes.
I have test on the platform whose version is windows xp. The above issue is not existed.
|
|
|
|
|
Thanks for testing at first!
The Windows Taskbar is on each System w98 or above, including Windows Vista, the same as I described it. So, the main problem of the covered progressbar could be the timer. Due to the fact that this version does not use any kind of taskbar hook up system to receive the message that the iconbar on the right side has changed, implements that the only way to refresh the progressbar is, to use a timer. That's the refresh of the progressbar could take a time of max. 1 second.
It seems that the timer is the problem. Try to change the interval. I'll also do some more tests on a Windows 2003 Server System as soon as possible
|
|
|
|
|
|
Applications will freeze (plus everything else running) if you click on the righthand portion of the ProgressBar that overlaps the tab in the TaskBar. When this happens, CPU usage jumps to 50% or more and usage cannot be reduced.
The freeze affects everything in the TaskBar, SystemTray, LaunchPad area, and even the "Start" button in the bottom left corner of the screen. At this point, left click or right click of the mouse have no effect, and pressing the Escape button doesn't help either.
Because I was unable to regain control of any of the other applications running (including TaskManager), the only way I could kill the sample application was by pressing Ctrl-Alt-Delete (which then brought up the Windows Security dialog) that then allowed me to click on TaskManager to end the task.
Sample definitely needs major rework.
William
Fortes in fide et opere!
|
|
|
|
|
Hmm,
This problem should be already fixed by the messagemap of the control. That worked great so far on all my test systems. It's the version you've downloaded.
I did a test again right now and all seems to work great. I also have included it into BatteryX and did an about 3 Weeks test on it and all seems to work great.
Maybe that could be a message conflict between the main window and the taskbar.
I'll do further more tests on it and let you know.
Thanks for testing!
-- modified at 7:52 Sunday 30th October, 2005
|
|
|
|
|
- When you resize the taskbar, the control is always centered, not stretched.
- Fixed bug: If you run the classic skin in Windows, the Taskbar Shell_TrayWnd has a left of -2 in horizontal mode. In vertical mode it has a top-value of -2. In skinned modus all is placed correctly at 0. This problem is now fixed.
- If you have started more than one instance of this control before, the program caused an error, this bug is now fixed!
- ...
Enjoy it
|
|
|
|