|
Hey thanks for the app...
I was trying to compile your code to make some changes, but it gives missing semicolon error in TrayIcon.cpp
// Global Variables:
HINSTANCE hInst; // current instance
NOTIFYICONDATA niData; // notify icon data
HMODULE hInjectDLL = NULL;
BOOL bEnabled = FALSE;
right after HINSTANCE hinst
Basically I was trying to get rid of the tray icon by commenting out the line:
Shell_NotifyIcon(NIM_ADD, &niData);
Let me know if you know what's going on.
Thanks!
Shom
sombando at hotmail dot com
|
|
|
|
|
Tray icon works fine in XP, but in Win98 (tried on several computers) once a program is minimized to the system tray it can't be restored, even with tray icon still running.
Have to use ctrl-alt-del to kill the minimized program.
Suggestions?
|
|
|
|
|
Hi,
I have the Icon displayed on the Task Bar, but How do I associate my Outlook window(or any other window) to be minimized to the Task Bar.
|
|
|
|
|
First, ensure his program is enabled.
Then, right click on the program in the task bar and select "Tray Me" to put it in the system tray.
|
|
|
|
|
Its really handy, I've thought several times to write something similar.
Only one thing to concider : when you have some windows 'trayed' and exit from the the app those windows remain in tray forever. I think on app exite the best thing to is to untray all ...
|
|
|
|
|
Thanks for good suggestion, Vasko. Try to improve it if you have time, and please remember to announce to me if you finish. I'll try and let you know too.
Chau Nguyen
|
|
|
|
|
I try to learn to write this program, but i did not know how to start it... Please help me...
TL A new member of The code Project
write a program that maintains a list of books for a library. The program must accept commands to make insertions and deletions in this list, while simultaneously maintaining the list in alphabetical order for three keys: Subject, Author, and Title.
Input
1. The book information created in previous executions of this program, if any, is stored in text file "books.txt". Each book's information is on three consecutive lines. The format of each line is described in the table below:
Line Information
1 Book Title
2 Author (last name, first name)
3 Subject
2. The program inputs commands from the user (keyboard) to insert, delete, list by key, and quit. You are free to implement the "user interface" part of the program as you wish, as long as it is easy to use.
Output
1. The results of each operation should be written to the screen. In addition, transaction information describing the processing of each command should be written to an output file. (For instance, for an Insert command, the output file should contain the title, author, and subject information, as well as the location where the record was inserted and the location of its entry in each ordering array.) The information in the output file should be neatly formatted and clearly labeled.
2. The "books.txt" text file should be rewritten to contain the updated book information.
Data Structures
The records containing information about each book (subject, author, and title strings) must be stored in an unsorted list. These records may be stored in consecutive array slots in the order in which they are inserted. For example, if the book information is stored in an list called bookData, bookData.info[0] contains information about the first book inserted, bookData.info[1] contains information about the second book inserted and so on.
The list must be maintained in order by title, in order by author, and in order by subject by using arrays of pointers (indexes), one for each key. For instance, suppose the key order information is stored in sorted lists: titleOrder, authorOrder and subjectOrder.
The zero'th array slot contains the index of the first book record with the appropriate key. For example, titleOrder.info[0] indicates the index of the book that comes first alphabetically by title. If titleOrder.info[0] = 5, then bookData.info[5] contains the first alphabetical title. The next book, in alphabetical order by title, would be found in the bookData array at the index indicated by titleOrder.info[1]. For index >= 0, titleOrder.info[index]contains the index in bookData of the next title in the alphabetic ordering. The authorOrder and subjectOrder lists work similarly.
Commands
The program must be able to process the following commands:
Insert a Book
Prompt the user for the author, title, and subject. Add entry for this book in the next available location in the bookData list, then update the titleOrder, authorOrder, and subjectOrder lists. Print a message to the screen and write transaction information to the output file. If the bookData list is full, print an error message and abort the insertion, leaving all of the lists unchanged.
Delete a Book
Prompt the user for the name of the book to delete. (You can assume that this is a unique key.) Search for the title to be deleted. If it is found, all the ordering lists must be updated. Print a message to the screen and write transaction information to the output file. If the book is not found, leave the lists unchanged, and print an error message.
List by Key
Prompt the user to specify which key to use for ordering the output. Print out the information about each book, in the indicated order, to the screen and to the transaction file. Format this information clearly. If the list is empty, print an appropriate message.
Quit
Prompt the user to verify that he or she wants to quit; if so, save the book information to file "books.txt" and terminate the program.
thank....;P
write a program that maintains a list of books for a library. The program must accept commands to make insertions and deletions in this list, while simultaneously maintaining the list in alphabetical order for three keys: Subject, Author, and Title.
Input
1. The book information created in previous executions of this program, if any, is stored in text file "books.txt". Each book's information is on three consecutive lines. The format of each line is described in the table below:
Line In
|
|
|
|
|
Sounds like what you need is to create database. Then that database will look after all those things you want it to. Then all you need is to write a front end to control the database, in say MFC, PHP or XML maybe?
mySQL is a great place to start, it's free and it has examples and code of how to achive all those things.
Good luck...
|
|
|
|
|
Hi thienle,
it looks like you have rescently started programming.
Well, if you really need the source for the libprogram you stated, i am willing to help you. I think i m responding to your message very late. But if you still need the program and its source, just drop me a mail at avenger_sb25@yahoo.com with "Subject:Library Mgmt Program help". I will send you the complete source code within 1-2 days.
Hope you will appreciate my offer.;)
Take care
...avenger
Remember... testing & debugging are always part of programming ...so exterminate those stinking bugs
|
|
|
|
|
I'm confused. If your desktop and task bar are cluttered, you propose to cram the excess into the sys tray and that's a solution? How about something more creative like filling up the task bars on multiple monitors?
|
|
|
|
|
Thanks for your good question. This is only my own situation. I have many applications run from startup to shutdown, but I rarely interact with them, and I always want my desktop look clean, so I decide to minimized it to sys tray (just a small icon). Yes, that's my solution for my situation, but your suggestion is great, could you tell me more about your idea, about "multiple monitors", "filling up the task bar", I really want to know it. Thanks.
Chau Nguyen
|
|
|
|
|
You can use the tray icons group/ungroup feature, much like Norton SystemWorks does. In this way, one can have a single icon "Tray Application" and access a context menu to group/ungroup the icons, or - even better - build at runtime into the existing context menu a popup menu with all "trayed" (sic!) applications and displaying their names + icons as submenu items. How about that?
|
|
|
|
|
Thanks Cristian, your second idea is really good. I'll try to implement this idea if I have enough time. Thanks and see you soon in another article.
Chau Nguyen
|
|
|
|
|
Everything seems to work well until I attempt the opperation on Internet explorer.
I can see and click on the menu item just nothing happens.
IE version is 6.0 with Windows XP Pro service pack 1.
Thanks for the code example, It helps me as I am interested in windows/system hooks at the moment.
Regards
Darren
|
|
|
|
|
Thanks for your using, Darren_vms. I didn't test it on an enviroment like yours. But if you are interested in Windows/System hook, you can review my code to find out the defect. If you find it out, please let me know. I'll let you know if I detect what is the cause too.Thanks.
Chau Nguyen
|
|
|
|
|
You can always do it by pressing "Winodws Key + D" comination
m aamir maniar
|
|
|
|
|
No, that minimizes to the task bar.
|
|
|
|
|