Like Tree3Likes
  • 1 Post By Salem
  • 2 Post By jimblumberg

ContextMenu SubMenu not displaying on Hover

This is a discussion on ContextMenu SubMenu not displaying on Hover within the C++ Programming forums, part of the General Programming Boards category; WM_CONTEXTMENU with TrackPopupMenu displays the menu, but when I move my mouse over the popup items (the ones with the ...

  1. #1
    Registered User
    Join Date
    Feb 2010
    Posts
    93

    ContextMenu SubMenu not displaying on Hover

    WM_CONTEXTMENU with TrackPopupMenu displays the menu, but when I move my mouse over the popup items (the ones with the little black triangle to the right), their submenus do not auto-display. I have to click the item to get the submenu to display. Funny thing is that it use to work and now it doesn't, so I must have added some code somewhere that has affected things. I'm just not sure what. Any ideas?

    James

  2. #2
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,452
    > Funny thing is that it use to work and now it doesn't
    Yeah, that happens a lot.

    Which is why these are a really good idea.
    List of revision control software - Wikipedia, the free encyclopedia
    Depending on what kind of IDE you're using, you can get the basic checkin/checkout functions available directly in your IDE.

    One superb thing they can do is a "diff" between "this works" and "this doesn't".

    When you get into writing s/w which takes more than a day to finish, you should really start learning about source control as well.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  3. #3
    Registered User
    Join Date
    Feb 2010
    Posts
    93
    In other words... you have no idea either?

    As for your professional advice, keeping a list of revisions is non-applicable in my situation since I am creating the entire thing all at once.
    But let's pretend you are right. When something works, at what point in the list of revisions/additions do you look for help when you happen to notice something no longer works?
    Once again bear in mind this is a huge project, 1000's of lines of code with a 100 more added every day.

    Hmmm... I thought so.

    By the way, I'm not blind to see you have 24,814 posts, which means you should be a C++ guru.
    So, I why not be more helpful next time?

  4. #4
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,452
    Well you basically asked us to guess the colour of your carpet, identify some mysterious substance you spilled on it and then proceeded to ask us what would be the best method of removing the stain.

    Of course we have no bloody idea what possible screw up you've made in several thousand lines of code.

    Without seeing the code, expect general answers, or being ignored.

    Mind you, if you posted the whole thing, you'd probably be ignored as well. A lot of code could take a lot of time, and that's a lot to ask of people who are here for a limited amount of their own free time. Sure, we might scan the code looking for some of the more obvious mistakes, but that doesn't always reveal what might be wrong. You're basically taking a pot-shot at finding someone "with your OS, and your compiler, and some experience of what you're trying to do, and several hours to kill on a single forum issue".

    FWIW, I suggested something you REALLY need to look into in order to avoid falling down the same pit next time. Make of that what you will, but I'll just refer you to this thread if you post another "Well I did something, but I'll let you guess what the code looks like" posts.

    > Once again bear in mind this is a huge project, 1000's of lines of code with a 100 more added every day.
    See, when you're in a hole, the first lesson is to STOP DIGGING.

    > keeping a list of revisions is non-applicable in my situation since I am creating the entire thing all at once.
    By "at once", I mean in a single 2 or 3 hour session for a few hundred lines of code at most. The fact that yours is 1000's of lines and taking many days (regardless of whether you're doing this on your own) doesn't invalidate that you NEED source control.
    Let me be clear on this point - If you walk away from your keyboard when writing code, you NEED source control.

    You made a change (don't know what), and it broke.
    Now you're screwed, asking people to make random guesses with even less code than you're looking at.

    It might come as a shock to you, but not every symptom you describe can be assigned to a unique cause where we could instantly say "you need to finangle the flange on the dooberry-whatsit".


    > When something works, at what point in the list of revisions/additions do you look for help when you happen to notice something no longer works?
    Generally speaking, you have a work process which consists of
    - add a feature
    - test a feature
    - check in feature

    Every few iterations (as you feel comfortable with), you also do
    - test a sample of other features to make sure they still work. That is, you didn't break anything.

    Every fewer steps, you also do
    - test EVERYTHING to make sure it still works.

    Even while you're adding a feature, you'll be doing lots of compiling and incremental testing.

    If you're doing lots of regular testing, you should be never too far from a "last known good" version.
    Say you made 5 committed changes since your last test. You might go back 3 revisions, and test that to see if it is broken as well. Either way, you have 2 commits over which you can do a difference to see if you can figure it out from looking at the changes you made.

    Worst case scenario, you revert back to the last known good, then try and implement the change again. But this time make a much better effort at testing as you go, to see where it all went wrong.
    jimblumberg likes this.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  5. #5
    Registered User
    Join Date
    Feb 2010
    Posts
    93
    I called you a "C++ guru", but you think you're a C++ God.
    There may be others with this problem in the future who have done like me, Googled and Googled.
    They will find this topic and be very disappointed that it has turned into God's wrath.

    Do me, and future others, a favor, Salem, DO NOT reply to this topic anymore.
    I need those willing to say, hey, I've had that problem, here, try this...

    To everyone else, I would really be grateful for some help. "Any" ideas, because frankly, Salem is 100% correct when he says:
    "Well you basically asked us to guess the colour of your carpet, identify some mysterious substance you spilled on it and then proceeded to ask us what would be the best method of removing the stain."

    I just hope those with the urge to become Salem's crusader will refrain from it.
    I need this to keep on point.
    Thanks,
    James

  6. #6
    Registered User
    Join Date
    May 2010
    Posts
    2,698
    In other words... you have no idea either?
    How can anyone have any idea? For us to have any idea you must provide some code that illustrates the problem. After all you said it was once working with your code, but you changed something and now it doesn't work any more. So what did you change?

    Show us a small complete program that illustrates your problem.


    Jim

  7. #7
    Registered User
    Join Date
    Feb 2010
    Posts
    93
    Code, yes, I know, and that's a problem too.
    When I create a new project to cut-n-paste relevant code to "illustrate" the problem...poof...there is no problem.
    The code itself works fine. If I post it, everyone will say, well, it works for me.
    Maybe it is a VC++ Express 2008 project settings quirk. Maybe it is a window top level parent-child, blah, blah, I have no idea.
    That's why my post is as generic as it is. I usually always manage to figure things out, but this has me baffled.

  8. #8
    Registered User
    Join Date
    May 2010
    Posts
    2,698
    Maybe your "Relevant code" is not the problem? Sounds like you are missing the problem code.

    Jim

  9. #9
    Registered User
    Join Date
    Feb 2010
    Posts
    93
    Okay, let me backtrack.
    I have a ContextMenu SubMenu not displaying on Hover (for whatever reason).
    I know that it will be impossible for anyone to advise me who has never had this problem.
    Is there anyone here who has seen, or read about, this problem before?

    Thanks again,
    James

  10. #10
    Registered User
    Join Date
    Aug 2010
    Location
    Poland
    Posts
    681
    Quote Originally Posted by motocross1 View Post
    I have a ContextMenu SubMenu not displaying on Hover (for whatever reason).
    Salem was not clear enough I see. I will attempt to be - we have ABSOLUTELY NO F*#@ING IDEA what can be wrong.. And I highly doubt there will be anyone out there who ran into the same problem with the same IDE in the same time.
    Last edited by kmdv; 04-08-2011 at 12:21 PM.
    I never put signature, but I decided to make an exception.

  11. #11
    Registered User
    Join Date
    May 2010
    Posts
    2,698
    When I create a new project to cut-n-paste relevant code to "illustrate" the problem...poof...there is no problem.
    So add a little more code at a time until the problem re-appears. Once it re-appears you may figure where you went wrong.

    Without any code that illustrates your problem NO ONE will know how to fix your problem.

    Jim

  12. #12
    Registered User
    Join Date
    Feb 2010
    Posts
    93
    For the last 2 days I've been deconstructing my code.
    And while I was being belittled here, I finally found the problem.

    I have one parent window that starts as a mini-login.
    After logging-in, I SW_HIDE the login controls, SW_SHOWMAXIMIZED the parent, and CreateWindowEx the WS_POPUP children, which have the menu problem.
    Furthermore, after the launch, the parent is blank (no controls) just a titlebar with minimize and exit.

    The Solution:
    Make sure the parent is not blank. If I TextOut "Logged-In" onto the parent, my problem goes away.
    I hope if others Google the same problem that this will help them in some way.

    Now then, one last question for you computer programming geniuses.
    Since it is common knowledge that most programs are not user-friendly, then wouldn't you all be an example of G.I.G.O. ??
    Garbage(personality) In = Garbage(software experience) Out.
    I mean seriously, is it any wonder why normal people complain about computers.
    They are indirectly interacting with you, the programmers.
    And, you are not very user-friendly.

    Oh here it comes now,
    James

  13. #13
    Registered User
    Join Date
    May 2010
    Posts
    2,698
    Since it is common knowledge that most programs are not user-friendly, then wouldn't you all be an example of G.I.G.O. ??
    Well since you provided the garbage???????

    Jim
    Raigne and Salem like this.

  14. #14
    Registered User
    Join Date
    Feb 2010
    Posts
    93
    Okay, so I come back to re-read this mess.
    And, now, I realize my eyes were playing tricks with me.

    Salem, I apologize for my reaction to your original post.
    That day I saw "s/w" as an encrypted curse word.

    It is no excuse for me pouring-out my frustrations.
    But too many people nowadays (jerks like kmdv) are prone to this sort of thing.
    It had me thinking, how dare you talk to me like that.
    And, of course, you were not.

    "s/w"... software... my point exactly.
    So, jimblumberg is right.
    I'm the one who started the garbage.
    The rest was self-fulfilling.

    I'm sorry for my bad behavior (personality).
    James

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 12
    Last Post: 04-12-2009, 05:49 PM
  2. Problem Displaying a Struct
    By rockstarpirate in forum C++ Programming
    Replies: 16
    Last Post: 05-05-2008, 09:05 AM
  3. Hover text in MFC?
    By Jamsan in forum Windows Programming
    Replies: 2
    Last Post: 05-12-2003, 05:00 PM
  4. Displaying Arrays
    By mr_spanky202 in forum C Programming
    Replies: 3
    Last Post: 04-07-2003, 02:22 PM
  5. Need codes for displaying figures in descending mode.
    By rbaba in forum C++ Programming
    Replies: 0
    Last Post: 12-14-2001, 07:47 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21