LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Building a "user fashined" program manager using windows messaging between applications.

Hi dudes!
Well I need to make a "windows kind task bar" to handle 2 or more programs using windows messaging.
The idea is that one program launchs the programs and give to them some paramateres that serves to comunicate between programs, only it can be posible acces the aplications trought the "task bar".
I declared some windows messages with WindowsMessageRegister() SDK function and next declared a windows message callback function for every one of the messages registered,. i use this functions for switch from the program handler or "task bar" to the program selectionated.
The task bar has to be always active and only switches when the user selects one program to switch to.
I us
e the "lParam" to send the number of the program to switch to, send a message that indicates to the application to activate and, finally, Broadcast the message with SendMessage() SDK function, the other applications catchs the message and compares "lParam",just one of the applications has to bring active depending of the value of lParam, i made this using "MakeApplicationActive()" function of labwindows library.
I make the "task bar program" switch to the selected program but i can make the selected program switch back to the "task bar program" and make this the active application, i tried to send a message from the application to the "task bar" for tell this to bring active using "MakeApplicationActive()" function, but it doesn`t work, just happen that the "task bar" appears 1 second and backs to the applicaction selected.
?How i can perform this operation?
To everyOne guys, thanks!!!!
0 Kudos
Message 1 of 2
(2,975 Views)
To solve this problem use this attached funcion called ToTop

This function is using SetForegroundWindow SDK function
if the aplication always call to other windows (never call itself to the front) you can use SetActiveWindow SDK function also.

I hope it helps

Xavier Caparrós

xcaparros@capatest.com
Image Hosted by ImageShack.us
0 Kudos
Message 2 of 2
(2,975 Views)