Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Right mouse click for CStatic ?

Right mouse click for CStatic ?

Scheduled Pinned Locked Moved C / C++ / MFC
question
5 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    madmax0001
    wrote on last edited by
    #1

    Hi, how can I enable an right mouse click eventhandler for a CStatic icon control? THX

    J 1 Reply Last reply
    0
    • M madmax0001

      Hi, how can I enable an right mouse click eventhandler for a CStatic icon control? THX

      J Offline
      J Offline
      J5121982
      wrote on last edited by
      #2

      MyDialog.h afx_msg void OnContextMenu(CWnd* pWnd, CPoint point); MyDialog.cpp BEGIN_MESSAGE_MAP(CMyDialog, CDialog) ON_WM_CONTEXTMENU() END_MESSAGE_MAP() void CMyDialog::OnContextMenu(CWnd* pWnd, CPoint point) { // TODO: Add your message handler code here CMenu menu; VERIFY(menu.LoadMenu(IDR_POPUP_MENU)); CMenu* pPopup = menu.GetSubMenu(0); ASSERT(pPopup != NULL); pPopup->TrackPopupMenu(TPM_LEFTALIGN | TPM_RIGHTBUTTON, point.x, point.y, AfxGetMainWnd()); } ---------------------------------------------------------------------------- I Belive that this would be helpfull to u JAYARAJ

      M T 2 Replies Last reply
      0
      • J J5121982

        MyDialog.h afx_msg void OnContextMenu(CWnd* pWnd, CPoint point); MyDialog.cpp BEGIN_MESSAGE_MAP(CMyDialog, CDialog) ON_WM_CONTEXTMENU() END_MESSAGE_MAP() void CMyDialog::OnContextMenu(CWnd* pWnd, CPoint point) { // TODO: Add your message handler code here CMenu menu; VERIFY(menu.LoadMenu(IDR_POPUP_MENU)); CMenu* pPopup = menu.GetSubMenu(0); ASSERT(pPopup != NULL); pPopup->TrackPopupMenu(TPM_LEFTALIGN | TPM_RIGHTBUTTON, point.x, point.y, AfxGetMainWnd()); } ---------------------------------------------------------------------------- I Belive that this would be helpfull to u JAYARAJ

        M Offline
        M Offline
        madmax0001
        wrote on last edited by
        #3

        Hi, thank you very much !!! Thats exactly what I searched !

        J 1 Reply Last reply
        0
        • M madmax0001

          Hi, thank you very much !!! Thats exactly what I searched !

          J Offline
          J Offline
          J5121982
          wrote on last edited by
          #4

          OK.. i need to acess mysql from remote system? do u know how to do it? myconnection string _T("Driver={MySQL ODBC 3.51 Driver};Server=61.247.251.95;Port=3306;Database=ist_encoder;User=root;Password=isakura;Option=4"); can u help me to solve this problem. JAYARAJ

          1 Reply Last reply
          0
          • J J5121982

            MyDialog.h afx_msg void OnContextMenu(CWnd* pWnd, CPoint point); MyDialog.cpp BEGIN_MESSAGE_MAP(CMyDialog, CDialog) ON_WM_CONTEXTMENU() END_MESSAGE_MAP() void CMyDialog::OnContextMenu(CWnd* pWnd, CPoint point) { // TODO: Add your message handler code here CMenu menu; VERIFY(menu.LoadMenu(IDR_POPUP_MENU)); CMenu* pPopup = menu.GetSubMenu(0); ASSERT(pPopup != NULL); pPopup->TrackPopupMenu(TPM_LEFTALIGN | TPM_RIGHTBUTTON, point.x, point.y, AfxGetMainWnd()); } ---------------------------------------------------------------------------- I Belive that this would be helpfull to u JAYARAJ

            T Offline
            T Offline
            toxcct
            wrote on last edited by
            #5

            when you have to post some code, use the <pre></pre> tags instead of bolding the text... :suss:

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups