![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Programmer
Join Date: Dec 2007
Posts: 93
Rep Power: 1
![]() |
Sup guys,
As some of you guys may know I recently had little trouble with EnumWindows, well that problem is gone now The new problem is that I have a menu that needs to be updated somehow. I'm just going to give you a task because it is easier this way(then to explain it). First create a dropdown menu called "Windows", now every seconds or two this menu should have a string that is updated with the total number of windows and that's it. I know this sounds possibly simple and/or stupid but its part of a bigger picture.Thanks. |
|
|
|
|
|
#2 |
|
PFO God In Training
![]() Join Date: Jun 2005
Location: near St Louis, MO. (USA)
Posts: 532
Rep Power: 4
![]() |
Re: Menu updating -
Search MSDN for GetMenu function. Now look on the left panel and you will see a list of menu functions that can manipulate the menu. Search those functions to see if you can find one that will solve your problem.
Near the bottom of the window you will also find some See Also links that give more information about menus |
|
|
|
|
|
#3 |
|
Programmer
Join Date: Dec 2007
Posts: 93
Rep Power: 1
![]() |
Re: Menu updating -
Well, Ancient Dragon, I've already tried that but I kept getting unexpected results which is why I asked for help here
![]() Sorry for keep on asking you guys for so much help but could you please try and do the task listed above? As this will answer(most likely) my question.Thank you . |
|
|
|
|
|
#4 |
|
Programming Guru
![]() |
Re: Menu updating -
People aren't here to "do tasks for you". Post your code, and maybe someone can point out what you've done wrong. If you don't have any code to show for, then don't expect anyone to help someone who's shown no effort. If you expect that from us, then post this in the job offers where your "tasks" might be more welcome. The reason I say this, is because your request is not so simple. It takes time to do, and that's time you're most likely not going to get out of anyone here for free.
|
|
|
|
|
|
#5 |
|
Programmer
Join Date: Dec 2007
Posts: 93
Rep Power: 1
![]() |
Re: Menu updating -
That's alfirmative sarge!
![]() c Syntax (Toggle Plain Text)
Please help .Thanks again! Last edited by Ancient Dragon; Jan 21st, 2008 at 5:15 AM. Reason: add line numbers for easier referencing |
|
|
|
|
|
#6 |
|
PFO God In Training
![]() Join Date: Jun 2005
Location: near St Louis, MO. (USA)
Posts: 532
Rep Power: 4
![]() |
Re: Menu updating -
I compiled and ran your program. Works (sortof) on my computer
Every second or so it adds a new menu item with a number on it. Isn't that what you want ? If you want to just update an existing menu item instead of adding a new one (which makes more sense to me) than call SetMenuItemInfo() instead of AppendMenu() inside that timer event handler function. |
|
|
|
|
|
#7 |
|
Programmer
Join Date: Dec 2007
Posts: 93
Rep Power: 1
![]() |
Re: Menu updating -
Quote by Ancient Dragon: "
"Finally, a post with a smile(just kidding ) .Well getting back to topic, the menu is updated every second which is great and all, but as you may have noticed the menu gows bigger and bigger which is not needed, so is there a way to get rid of the old value and get in the new one? Thanks. |
|
|
|
|
|
#8 |
|
PFO God In Training
![]() Join Date: Jun 2005
Location: near St Louis, MO. (USA)
Posts: 532
Rep Power: 4
![]() |
Re: Menu updating -
re-read my post because I already told you how to do it -- see the last sentence. I'll leave it up to you to figure out how to use that function.
"It works on my computer" got the smily because that is a famous comment by programmers whose program doesn't work when tested by someone else. |
|
|
|
|
|
#9 |
|
Programmer
Join Date: Dec 2007
Posts: 93
Rep Power: 1
![]() |
Re: Menu updating -
Oh sorry for that, my eye didn't seem to catch that
Anyway, I don't really have experience with the function SetMenuItemInfo(...), actually I tried once and failed... Although I WILL try, could you(if you want), just edit the code above to show me how to do it?Thank you. |
|
|
|
|
|
#10 |
|
Programmer
Join Date: Dec 2007
Posts: 93
Rep Power: 1
![]() |
Re: Menu updating -
RESOLVED - I found another method which works just fine.
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Help with .css file and suckerfish menu | csrocker101 | HTML / XHTML / CSS | 0 | Aug 30th, 2007 5:59 PM |
| Java Popup Menu | titaniumdecoy | Java | 7 | Mar 12th, 2006 11:17 AM |
| dropdown menu with persistence? | kerriganm | HTML / XHTML / CSS | 11 | Dec 17th, 2005 2:33 PM |
| Need help with a realtime branching menu | Zeteg | JavaScript and Client-Side Browser Scripting | 11 | Aug 27th, 2005 11:36 AM |
| HELP!!! Perl script to display drop down menu on webpage | domquem | Perl | 8 | Jun 2nd, 2005 9:48 AM |