Click here to Skip to main content
15,914,417 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Open .vcproj with msvs6 Pin
User 665822-Sep-02 10:08
User 665822-Sep-02 10:08 
GeneralRe: Open .vcproj with msvs6 Pin
Stephane Rodriguez.22-Sep-02 10:52
Stephane Rodriguez.22-Sep-02 10:52 
GeneralOverriding DC of WebBrowser Pin
Tili22-Sep-02 7:10
Tili22-Sep-02 7:10 
GeneralRe: Overriding DC of WebBrowser Pin
Stephane Rodriguez.22-Sep-02 7:31
Stephane Rodriguez.22-Sep-02 7:31 
GeneralRe: Overriding DC of WebBrowser Pin
Tili22-Sep-02 7:35
Tili22-Sep-02 7:35 
GeneralA Success Pin
Tili22-Sep-02 19:45
Tili22-Sep-02 19:45 
Generallose the right context menu sometimes. Pin
ns22-Sep-02 5:40
ns22-Sep-02 5:40 
GeneralRe: lose the right context menu sometimes. Pin
Ravi Bhavnani22-Sep-02 10:14
professionalRavi Bhavnani22-Sep-02 10:14 
Well, there are plenty of things that can cause the menu to not show up (the point is not in the rect, the menu couldn't be loaded, the submenu doesn't exist, etc).

When you encounter a situation like this where the expected doesn't happen, it's best to write the code snippet defensively (in fact it's a good idea to always write defensive code), using ASSERT and VERIFY to check that things are OK. Use TRACE to trace control flow. Here's what I mean:
if (rcTHBImage1.PtInRect(point)) {
   TRACE ("Point is in rect...\n");
   CMenu menuPopup;
   VERIFY (menuPopup.LoadMenu (IDR_MENU1));
   CMenu *pSubMenu = menuPopup.GetSubMenu(0);
   ASSERT (pSubMenu != NULL);

   CmdRouteMenu (pWnd,pSubMenu);
   TRACE ("About to display popup menu...\n");
   pSubMenu->TrackPopupMenu (TPM_RIGHTALIGN, point.x, point.y, this, NULL);
}


/ravi

Let's put "civil" back in "civilization"
http://www.ravib.com
ravib@ravib.com
Generalvery slow changes Pin
ns22-Sep-02 5:38
ns22-Sep-02 5:38 
GeneralMFC 7.0 and Office XP look Pin
Zinj22-Sep-02 4:42
sussZinj22-Sep-02 4:42 
Generalopen and print PDF Pin
pnpfriend22-Sep-02 4:15
pnpfriend22-Sep-02 4:15 
GeneralRe: open and print PDF Pin
alex.barylski22-Sep-02 13:15
alex.barylski22-Sep-02 13:15 
GeneralRe: open and print PDF :( Pin
pnpfriend25-Sep-02 3:46
pnpfriend25-Sep-02 3:46 
GeneralAppWizard error?(create a Custom AppWizard type project) Pin
Bing Ding22-Sep-02 4:07
Bing Ding22-Sep-02 4:07 
Generalload BITMAP in DirectX Pin
Ta_Tee47322-Sep-02 4:03
Ta_Tee47322-Sep-02 4:03 
GeneralRe: load BITMAP in DirectX Pin
FlyingWren22-Sep-02 4:22
FlyingWren22-Sep-02 4:22 
GeneralUse VC dll in Delphi Pin
Mazdak22-Sep-02 3:53
Mazdak22-Sep-02 3:53 
GeneralRe: Use VC dll in Delphi Pin
User 665822-Sep-02 3:56
User 665822-Sep-02 3:56 
GeneralRe: Use VC dll in Delphi Pin
Mazdak22-Sep-02 4:02
Mazdak22-Sep-02 4:02 
GeneralRe: Use VC dll in Delphi Pin
User 665822-Sep-02 4:04
User 665822-Sep-02 4:04 
GeneralRe: Use VC dll in Delphi Pin
Mazdak22-Sep-02 4:13
Mazdak22-Sep-02 4:13 
GeneralRe: Use VC dll in Delphi Pin
Mazdak22-Sep-02 4:23
Mazdak22-Sep-02 4:23 
GeneralSource code provided with Petzold's book Pin
axa22-Sep-02 3:19
axa22-Sep-02 3:19 
GeneralRe: Source code provided with Petzold's book Pin
Bing Ding22-Sep-02 4:16
Bing Ding22-Sep-02 4:16 
GeneralRe: Source code provided with Petzold's book Pin
axa22-Sep-02 4:58
axa22-Sep-02 4:58 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.