popup Menu에 OnUpdateUI Event 매크로 시행하기(OnUpdateUI for popup menu)

팜업메뉴(popup Menu)는 윈도우에서 마우스 오른쪽 버튼이 눌러지면 활성화 되는 메뉴로 주로 사용된다.
메뉴 생성성시 메뉴가 생성되는 윈도우를 설정해 주게 되어 있다.CWnd* pWnd에 부모 윈도우를 지정하게 된다.
BOOL TrackPopupMenu( UINT nFlags, int x, int y, CWnd* pWnd, LPCRECT lpRect = NULL );
단순하게 생각해서 메뉴가 보여지는 윈도우에서  메뉴를 생성하고
CMenu menu;
CMenu * menu1 = menu.GetSubMenu(1);  //WM_SET_ENABLE
menu1->TrackPopupMenu(TPM_LEFTALIGN |TPM_RIGHTBUTTON, point.x, point.y,this);
이벤트 핸들러를 다음과 같이
OnUpdateSEtEnableUI(CCmdUI* pCmdUI)
코딩하였다 하다라도
이벤트는 처리되지 않는다???
문법적으로 개념적으로 이사이 없어 보이는데 ????
이럴때는 아래 코드와 같이 처리하자

CMenu menu;
  CMenu * menu1 = menu.GetSubMenu(1);
  menu1->TrackPopupMenu(TPM_LEFTALIGN |TPM_RIGHTBUTTON, point.x, point.y, AfxGetMainWnd());

CMenu가 FrameWnd에 속하므로 View에서 처리를 하지 않도록 구성된듯 한데.
이렿게 되어야 하는 이유는 다음에 생각 하기로 하고 우선은 그냥 사용하자.

“popup Menu에 OnUpdateUI Event 매크로 시행하기(OnUpdateUI for popup menu)”의 37개의 댓글

  1. Simply want to say your article is as surprising. The clarity in your post is just excellent and i can assume you’re
    an expert on this subject. Fine with your permission allow me
    to grab your RSS feed to keep up to date with forthcoming post.
    Thanks a million and please carry on the enjoyable work.

  2. I just want to say I am all new to weblog and really savored this page. More than likely I’m likely to bookmark your site . You surely have really good article content. Appreciate it for sharing your website page.

  3. I feel like I’m constantly looking for interesting things to read about a variety of subjects, but I manage to include your blog among my reads every day because you have compelling entries that I look forward to. Here’s hoping there’s a lot more amazing material coming!

  4. This is the ideal blog for anyone who wants to learn about this subject. You understand so much its almost hard to say with you (not that I in fact would want?HaHa). You absolutely put a new spin on a topic thats been blogged about for years. Excellent stuff, simply excellent!

  5. This is the appropriate blog for any individual who wants to find out about this subject. You realize so much its nearly tough to suggest with you (not that I really would want?HaHa). You certainly put a brand-new spin on a topic thats been covered for many years. Fantastic things, just great!

  6. Hi! I simply would like to give a substantial thumbs up for the fantastic information you have right here on this article. I will certainly be coming back to your blog for even more soon.

  7. An intriguing discussion deserves remark. I believe that you should compose more on this topic, it could not be a forbidden topic however typically people are not enough to speak on such topics. To the following. Thanks

  8. When I originally commented I clicked the -Inform me when brand-new comments are included- checkbox and currently each time a comment is added I get 4 emails with the same comment. Is there any way you can eliminate me from that service? Many thanks!

  9. I?m amazed, I should state. Really seldom do I run into a blog site that?s both educative as well as entertaining, as well as let me inform you, you have actually struck the nail on the head. Your suggestion is outstanding; the problem is something that not nearly enough people are speaking wisely around. I am very delighted that I came across this in my search for something relating to this.

  10. After research study a few of the blog posts on your website currently, and also I genuinely like your way of blog writing. I bookmarked it to my book mark site listing and also will be examining back quickly. Pls look into my website too and also let me recognize what you believe.

  11. Can I just state what an alleviation to discover somebody who in fact recognizes what theyre discussing online. You absolutely know just how to bring a concern to light and also make it vital. More individuals need to read this as well as recognize this side of the tale. I angle think youre not much more popular because you absolutely have the present.

  12. An impressive share, I just offered this onto a coworker that was doing a little evaluation on this. And he actually purchased me breakfast since I found it for him. smile. So let me rephrase that: Thnx for the treat! But yeah Thnkx for investing the time to review this, I feel strongly regarding it and also enjoy learning more on this topic. If possible, as you end up being knowledge, would you mind upgrading your blog site with even more details? It is highly handy for me. Big thumb up for this article!

  13. This is the best blog for any individual that wants to find out about this topic. You realize a lot its virtually hard to argue with you (not that I really would want?HaHa). You certainly put a new spin on a subject thats been covered for several years. Terrific things, just terrific!

  14. I was really pleased to find this web-site. I wanted to many thanks for your time for this terrific read!! I absolutely enjoying every bit of it and I have you bookmarked to take a look at brand-new things you post.

  15. I?m amazed, I need to say. Truly seldom do I run into a blog that?s both informative and amusing, and let me inform you, you have actually hit the nail on the head. Your suggestion is exceptional; the issue is something that insufficient people are speaking wisely around. I am extremely happy that I stumbled across this in my search for something associating with this.

댓글 남기기