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. The Lounge
  3. ObjectArx Experience

ObjectArx Experience

Scheduled Pinned Locked Moved The Lounge
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.
  • L Offline
    L Offline
    Le Ridder Noir
    wrote on last edited by
    #1

    Does anyone have ObjectArx(for Autocad2000) Experience. Considderd to be the worlds fastest knoppenbonker. 10 Months of working experience with the worlds fastest copie paster(about 2000 lines a minute). And experience with the one and only NewEra Guru.

    E 1 Reply Last reply
    0
    • L Le Ridder Noir

      Does anyone have ObjectArx(for Autocad2000) Experience. Considderd to be the worlds fastest knoppenbonker. 10 Months of working experience with the worlds fastest copie paster(about 2000 lines a minute). And experience with the one and only NewEra Guru.

      E Offline
      E Offline
      Etienne Fortin
      wrote on last edited by
      #2

      Yes, I have experience with ObjectARX for AutoCAD 2000. I made some applications with it, mixing ATL and ObjectARX code most of the time.

      L 1 Reply Last reply
      0
      • E Etienne Fortin

        Yes, I have experience with ObjectARX for AutoCAD 2000. I made some applications with it, mixing ATL and ObjectARX code most of the time.

        L Offline
        L Offline
        Le Ridder Noir
        wrote on last edited by
        #3

        Do you have any experience on how to add a toolbar to the autocad frame(with same look and feel as autocad have). I know there is a activeX object which you can use, but I can't add any Combobox to the toolbar with it(only normal buttons and seperators). Do you have any idea. Thanks in advance I'm happy, that I'm not the only OARX programmer around(where are you from) Considderd to be the worlds fastest knoppenbonker. 10 Months of working experience with the worlds fastest copie paster(about 2000 lines a minute). And experience with the one and only NewEra Guru.

        C 1 Reply Last reply
        0
        • L Le Ridder Noir

          Do you have any experience on how to add a toolbar to the autocad frame(with same look and feel as autocad have). I know there is a activeX object which you can use, but I can't add any Combobox to the toolbar with it(only normal buttons and seperators). Do you have any idea. Thanks in advance I'm happy, that I'm not the only OARX programmer around(where are you from) Considderd to be the worlds fastest knoppenbonker. 10 Months of working experience with the worlds fastest copie paster(about 2000 lines a minute). And experience with the one and only NewEra Guru.

          C Offline
          C Offline
          Chris Brown Phd
          wrote on last edited by
          #4

          Yup. Just use a normal CToolbar. Parent it to AutoCAD's main frame window. You may need to create an invisible CWnd to act as message target for button presses. The CToolbar will not dock alongside one of AutoCAD's toolbars. I spent a long time trying to get this to work, together with ADN support, and didn't get anywhere. If you are able to, please let me know! However, the toolbar will dock underneath the existing toolbars, or on either side or bottom of the frame. Looks OK in practice. Here's some code. It's copied and pasted, and as it's not in any context, it won't build, but it might give you an idea.

          CMDIFrameWnd\* const pAcadFrame = acedGetAcadFrame();
          
          //----- Add the ToolBar
          myToolBarP = new ZbUiToolBar(myPartManagerP);
          
          BOOL res = myToolBarP->CreateExAndLoad(
          	pAcadFrame,
          	TBSTYLE\_FLAT /\*| TBSTYLE\_TRANSPARENT\*/ | TBSTYLE\_TOOLTIPS,
          	WS\_CHILD | WS\_VISIBLE | CBRS\_SIZE\_DYNAMIC | 
          	CBRS\_TOP | CBRS\_GRIPPER | CBRS\_BORDER\_TOP | CBRS\_BORDER\_BOTTOM );
          
          myToolBarP->EnableDocking( CBRS\_ALIGN\_ANY );
          myToolBarP->SetBorders(3, 3, 3, 3);
          
          myToolBarP->RestorePosition(/\*NOXLATE\*/"DCUBED.OPSToolbar");
          

          and here's the code for CreateExAndLoad:

          BOOL ZbUiToolBar::CreateExAndLoad(CWnd* pParentWnd,
          DWORD dwCtrlStyle,
          DWORD dwStyle,
          CRect rcBorders,
          UINT nID)
          {
          BOOL status = true;
          if (status)
          {
          status = myToolBarWndP->Create(NULL, NULL, WS_CHILD | WS_MINIMIZE, CRect (0,0,1,1), pParentWnd, 10) ;
          }

          if (status)
          	{
          	status = CreateEx(pParentWnd,dwCtrlStyle,dwStyle,rcBorders,nID);
          	}
          
          if (status)
          	{
          	status = LoadToolBar( GetResourceId() );
          	//status = LoadBitmap( GetResourceId() );
          	OPS\_ASSERTMSG(status,"Failed to load bitmap from resource.");
          	}
          
          if (status)
          	{
          	LayoutButtons();
          	SetWindowText(getBarWindowText());
          	}
          
          DWORD const toolBarStyle  = GetStyle();
          DWORD const toolBarDblClk = toolBarStyle & CS\_DBLCLKS;
          OPS\_ASSERTMSG(toolBarDblClk != 0,"ToolBar does not support 'CS\_DBLCLKS' style.");
          
          if (status)
          	{
          	GetToolBarCtrl().SetOwner( myToolBarWndP );
          	}
          
          return status;
          }
          

          Hope this helps, Chris Brown D-Cubed Ltd.

          L 1 Reply Last reply
          0
          • C Chris Brown Phd

            Yup. Just use a normal CToolbar. Parent it to AutoCAD's main frame window. You may need to create an invisible CWnd to act as message target for button presses. The CToolbar will not dock alongside one of AutoCAD's toolbars. I spent a long time trying to get this to work, together with ADN support, and didn't get anywhere. If you are able to, please let me know! However, the toolbar will dock underneath the existing toolbars, or on either side or bottom of the frame. Looks OK in practice. Here's some code. It's copied and pasted, and as it's not in any context, it won't build, but it might give you an idea.

            CMDIFrameWnd\* const pAcadFrame = acedGetAcadFrame();
            
            //----- Add the ToolBar
            myToolBarP = new ZbUiToolBar(myPartManagerP);
            
            BOOL res = myToolBarP->CreateExAndLoad(
            	pAcadFrame,
            	TBSTYLE\_FLAT /\*| TBSTYLE\_TRANSPARENT\*/ | TBSTYLE\_TOOLTIPS,
            	WS\_CHILD | WS\_VISIBLE | CBRS\_SIZE\_DYNAMIC | 
            	CBRS\_TOP | CBRS\_GRIPPER | CBRS\_BORDER\_TOP | CBRS\_BORDER\_BOTTOM );
            
            myToolBarP->EnableDocking( CBRS\_ALIGN\_ANY );
            myToolBarP->SetBorders(3, 3, 3, 3);
            
            myToolBarP->RestorePosition(/\*NOXLATE\*/"DCUBED.OPSToolbar");
            

            and here's the code for CreateExAndLoad:

            BOOL ZbUiToolBar::CreateExAndLoad(CWnd* pParentWnd,
            DWORD dwCtrlStyle,
            DWORD dwStyle,
            CRect rcBorders,
            UINT nID)
            {
            BOOL status = true;
            if (status)
            {
            status = myToolBarWndP->Create(NULL, NULL, WS_CHILD | WS_MINIMIZE, CRect (0,0,1,1), pParentWnd, 10) ;
            }

            if (status)
            	{
            	status = CreateEx(pParentWnd,dwCtrlStyle,dwStyle,rcBorders,nID);
            	}
            
            if (status)
            	{
            	status = LoadToolBar( GetResourceId() );
            	//status = LoadBitmap( GetResourceId() );
            	OPS\_ASSERTMSG(status,"Failed to load bitmap from resource.");
            	}
            
            if (status)
            	{
            	LayoutButtons();
            	SetWindowText(getBarWindowText());
            	}
            
            DWORD const toolBarStyle  = GetStyle();
            DWORD const toolBarDblClk = toolBarStyle & CS\_DBLCLKS;
            OPS\_ASSERTMSG(toolBarDblClk != 0,"ToolBar does not support 'CS\_DBLCLKS' style.");
            
            if (status)
            	{
            	GetToolBarCtrl().SetOwner( myToolBarWndP );
            	}
            
            return status;
            }
            

            Hope this helps, Chris Brown D-Cubed Ltd.

            L Offline
            L Offline
            Le Ridder Noir
            wrote on last edited by
            #5

            From autodesk i got an answer which is: Hi, I am afraid it is not possible at all. AutoCAD toolbar are not standard toolbars. If you need a combobox, you do not have any other choices than using MFC toolbars. Cheers, Cyrille Fauvel autodesk Considderd to be the worlds fastest knoppenbonker. 10 Months of working experience with the worlds fastest copie paster(about 2000 lines a minute). And experience with the one and only NewEra Guru.

            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