Click here to Skip to main content
15,922,650 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: how text can display in spiral form Pin
Anthony_Yio15-Jul-03 1:23
Anthony_Yio15-Jul-03 1:23 
Questionwhat is the different between the DLL and application Pin
gdzfy11-Jul-03 14:33
gdzfy11-Jul-03 14:33 
AnswerRe: what is the different between the DLL and application Pin
gdzfy11-Jul-03 14:34
gdzfy11-Jul-03 14:34 
GeneralRe: what is the different between the DLL and application Pin
John M. Drescher11-Jul-03 17:49
John M. Drescher11-Jul-03 17:49 
GeneralRe: what is the different between the DLL and application Pin
Snyp12-Jul-03 6:37
Snyp12-Jul-03 6:37 
GeneralThreads and ~Component Pin
Paul Farry11-Jul-03 14:31
professionalPaul Farry11-Jul-03 14:31 
GeneralRe: Threads and ~Component Pin
Ryan Binns11-Jul-03 16:05
Ryan Binns11-Jul-03 16:05 
GeneralContext Menu Cursor Problem Pin
dWorkVan11-Jul-03 13:55
dWorkVan11-Jul-03 13:55 
Hi,

I was wondering if anyone else has seen this problem:

When I right click and open up a context menu in a CWnd sub-classed dialog, then go into a submenu my mouse cursor goes from the arrow to the hourglass and never reverts back to the arrow cursor until after I close the dialog box.

It doesn't seem to matter which way I create the menu (either through resources or purely by code) and I have tried overwritting the OnSetCursor function which always sets the mouse to the arrow.

I know that OnSetCursor is being called because outside of a menu the cursor is not an arrow.

Here is the sample of my code:

for cursor override:
BOOL CCMFrame::OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message) 
{

    if (message == 0) // owner is in menu mode
      {
        // only set the cursor if the object open is a menu.
        HCURSOR	 hCursor = LoadCursor(NULL, IDC_ARROW);
        SetCursor(hCursor);
        return TRUE;
      }

    return CWnd::OnSetCursor(pWnd, nHitTest, message);
}


for menu creation:

CMenu mnuTop;
     mnuTop.LoadMenu(IDR_POPUP_MENU);

     CMenu* pPopup = mnuTop.GetSubMenu(0);
     ASSERT_VALID(pPopup);

     pPopup->TrackPopupMenu(TPM_RIGHTBUTTON |
                          TPM_LEFTALIGN, Point.x, Point.y, this, NULL);



Thank you for any insight into what could be causing this!!



Crystal
GeneralRe: Context Menu Cursor Problem Pin
Mike Nordell12-Jul-03 4:21
Mike Nordell12-Jul-03 4:21 
GeneralRe: Context Menu Cursor Problem Pin
dWorkVan14-Jul-03 7:10
dWorkVan14-Jul-03 7:10 
Generalerror C1010 help... Pin
JoeSox11-Jul-03 11:45
JoeSox11-Jul-03 11:45 
GeneralRe: error C1010 help... Pin
Mike Dimmick11-Jul-03 12:04
Mike Dimmick11-Jul-03 12:04 
GeneralRe: error C1010 help... Pin
JoeSox11-Jul-03 12:14
JoeSox11-Jul-03 12:14 
GeneralRe: error C1010 help... Pin
Mike Dimmick11-Jul-03 12:28
Mike Dimmick11-Jul-03 12:28 
GeneralRe: error C1010 help... Pin
Michael Dunn11-Jul-03 12:09
sitebuilderMichael Dunn11-Jul-03 12:09 
GeneralRe: error C1010 help... Pin
JoeSox11-Jul-03 12:17
JoeSox11-Jul-03 12:17 
GeneralRe: error C1010 help... Pin
John R. Shaw11-Jul-03 12:11
John R. Shaw11-Jul-03 12:11 
GeneralRe: error C1010 help... Pin
JoeSox11-Jul-03 12:19
JoeSox11-Jul-03 12:19 
GeneralOrdianl error in MFC dll Pin
11-Jul-03 11:26
suss11-Jul-03 11:26 
GeneralRe: Ordianl error in MFC dll Pin
Toni7811-Jul-03 12:07
Toni7811-Jul-03 12:07 
GeneralRe: Ordianl error in MFC dll Pin
Mike Dimmick11-Jul-03 12:51
Mike Dimmick11-Jul-03 12:51 
GeneralRe: Ordianl error in MFC dll Pin
Toni7811-Jul-03 13:27
Toni7811-Jul-03 13:27 
GeneralRe: Ordianl error in MFC dll Pin
Apollo102411-Jul-03 14:19
Apollo102411-Jul-03 14:19 
GeneralRe: Ordianl error in MFC dll Pin
KaЯl11-Jul-03 12:17
KaЯl11-Jul-03 12:17 
GeneralRe: Ordianl error in MFC dll Pin
Toni7811-Jul-03 12:41
Toni7811-Jul-03 12:41 

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.