Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - Context menu in property grid
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Context menu in property grid

 Post Reply Post Reply
Author
Message
dennisV View Drop Down
Senior Member
Senior Member
Avatar

Joined: 07 October 2004
Location: Australia
Status: Offline
Points: 242
Post Options Post Options   Thanks (0) Thanks(0)   Quote dennisV Quote  Post ReplyReply Direct Link To This Post Topic: Context menu in property grid
    Posted: 22 July 2008 at 6:55am
Hi!

Is it possible to have a context (RMB) menu in a property grid item?

Thanks!

   Dennis
// W7 64 Ultimate SP1
// VS 2008
// CodeJock 16.2.3 (MFC)
Back to Top
mgampi View Drop Down
Senior Member
Senior Member
Avatar

Joined: 14 July 2003
Status: Offline
Points: 1201
Post Options Post Options   Thanks (0) Thanks(0)   Quote mgampi Quote  Post ReplyReply Direct Link To This Post Posted: 22 July 2008 at 7:39am
Hi;

Just overwrite the CXTPPropertyGridItem::OnRButtonDown(UINT nFlags, CPoint point);
It's a virtual function and can be used to show a popup menu.
Martin

Product: Xtreme Toolkit v 22.1.0, new Projects v 24.0.0
Platform: Windows 10 v 22H2 (64bit)
Language: VC++ 2022
Back to Top
dennisV View Drop Down
Senior Member
Senior Member
Avatar

Joined: 07 October 2004
Location: Australia
Status: Offline
Points: 242
Post Options Post Options   Thanks (0) Thanks(0)   Quote dennisV Quote  Post ReplyReply Direct Link To This Post Posted: 22 July 2008 at 8:40am
Originally posted by mgampi mgampi wrote:

Hi;

Just overwrite the CXTPPropertyGridItem::OnRButtonDown(UINT nFlags, CPoint point);
It's a virtual function and can be used to show a popup menu.

Thank you! Will do that.
// W7 64 Ultimate SP1
// VS 2008
// CodeJock 16.2.3 (MFC)
Back to Top
zanget View Drop Down
Newbie
Newbie


Joined: 21 April 2009
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote zanget Quote  Post ReplyReply Direct Link To This Post Posted: 21 April 2009 at 8:33am
hi, dennisV  and  mgampi
im a new for codejock,i had a problem on overwrite  this functions:
this is my code:
 
class CCustomItemzPWDChilds : public CXTPPropertyGridItem
{
  public:
 CCustomItemzPWDChilds(CString strCaption,CString * editText,int Maxlen) : CXTPPropertyGridItem(strCaption), m_wndEdit(editText,Maxlen)
 {
  if(editText)
  {
   CString tmp = *editText;
   BindToString(editText);
   *editText = tmp;
  }
 }

  protected:
 virtual CXTPPropertyGridInplaceEdit & GetInplaceEdit()
 {
  return m_wndEdit;
 }
 virtual void OnRButtonDown(UINT, CPoint) {}  /*NO right mouse key menu*/
  private:
 CInplacePwd m_wndEdit;
};

but the edit box also had a menu,i just need to disable the menu....
i dont know why and how to do so.
wait for you replay...
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.031 seconds.