Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I create a taskbar like application

Status
Not open for further replies.

deyzel

Programmer
Apr 4, 2001
15
CA
All,

I need to create an application that must act very similar to a taskbar. The application must dock at the top of the screen (not a problem), application must always be on top (not a problem either) AND the application must change the usable screen space for the other applications. (Similar to the windows taskbar pushing applications up or down when you make it wider). This last bit is the one that I have problems with and cannot find an API to do it.

Any help on this.

Thanks
Werner Deyzel
 
Well, I don't know what your app should do, but you can make your own task-bar (or better say app-bar) without re-inventing or re-writing anything. That capabillity is built in Win32 Shell. I can not remember now the functions/interfaces (have to check, it's been a while), but look at the Win32 SDK help. There are also some nice articles in MSDN on this subject. Anyway, I'll try to dig 'em up if you are unable to find them...
 
I have to do a few more things than what the task-bar can do. I have to automatically switch between applications when certain conditions in one of the running apps occur, store the occurance in a database etc.

It will have to be a completely new app. Initially I thought of configuring the task-bar but then I was informed of these additional requirements.

Thx
deyzel
 
Couldn't you use an app bar as your base class and build a new class based on that? That would seem to be the most efficient way.

Chris
 
Its been 2 months since you posted this question and I dont
know if you still need help, but here it goes:
The API function you are searching for is SHAppBarMessage.
Here is the code to use in borland c++ builder:

APPBARDATA pabd;
pabd.hWnd = Frm->Handle;
pabd.uCallbackMessage=40032; //any thing
pabd.cbSize=sizeof(pabd);
if (SHAppBarMessage(ABM_NEW,&pabd)==FALSE) {
ShowMessage("Err abm_new");
}
pabd.uEdge = ABE_TOP;
pabd.rc.top=0;
pabd.rc.left=0;
pabd.rc.right=800;
pabd.rc.bottom=50;
pabd.hWnd=Frm->Handle;
pabd.cbSize=sizeof(pabd);
if (SHAppBarMessage(ABM_SETPOS,&pabd)==FALSE) {
ShowMessage("Err abm_setpos");
}
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top