1985, Timex Sinclair 1000.. Now hold on to your seat :) It had a whopping 2K of onboard memory, and I had the tape drive to go with it :) .... Man those were good days.
NTense
Posts
-
What was your First Computer? :) -
Can't Undock my CDialogBarI can't seem to undock my CDialogBar. It creates the dialog bar, and docks it to the left side of my main frame, but I can't drag it away. I'm not quite sure what's wrong. Any ideas? Here's my code:
//////// My DialogBar Class Declaration class CDlgTree : public CDialogBar { DECLARE_DYNAMIC(CDlgTree) public: CDlgTree(CWnd* pParent = NULL); // standard constructor virtual ~CDlgTree(); // Dialog Data enum { IDD = IDD_DLGTREEBAR }; protected: virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support DECLARE_MESSAGE_MAP() }; /////////////////////////////////////////////////////////////////////// // The creation in my CMainFrm class in OnCreate /////////////////////////////////////////////////////////////////////// // TreeDlg if (!m_treeBar.Create(this, IDD_DLGTREEBAR, CBRS_ALIGN_RIGHT | CBRS_ALIGN_LEFT | CBRS_GRIPPER, AFX_IDW_CONTROLBAR_LAST - 1)) { TRACE0("Failed to create TreeBar\n"); return -1; } m_treeBar.SetWindowText("Components"); m_treeBar.EnableDocking(CBRS_ALIGN_RIGHT | CBRS_ALIGN_LEFT);
Thanks :-D -
Problems with Dialog Controls in VS2003Ahh, found in another recently posted thread.. I needed to click the 'down button' in the resource editor, and then it will allow me to resize the display rect, but only after clicking on the down button. Weird. I don't remember that:confused: . Oh well, thanks for your help Anon
-
Problems with Dialog Controls in VS2003I can see the values in the editbox portion of the combo when I cycle through the mouse wheel, but the dropdown doesn't show up. I can't find a method to change the dropdown size, and it's not in the properties dialog.
-
Problems with Dialog Controls in VS2003Hi All, I'm working on my first project in VS 2003 (coming from 6.0), and have run into a snag while creating a simple dialog. The problem is this. I am building a CAD application with MFC, and needed a dialog to manage the creation of one of the primitives. Simple enough.. I placed 2 radio buttons on the form (along with other controls), and then began assigning variables to the controls. The problem arose when the class wizard would not display any of the control ID's for the radio buttons. So, I tried to add the variable relations in by using DDX_Radio(). The program would give me a runtime error at that point that I couldn't track down. After troubleshooting for about an hour, I decided to place a CComboBox in instead since I could essentially track/manage the variable just as easily. After assigning a variable to the combo box, I went to fill it using AddString in the OnInitDialog() function. The problem is that the combobox doesn't drop. I can't see a way to manipulate it in the resource editor, and this has consumed and insane amount of time for such a simple task. I've never had a problem with this in VS 6.0, and it's a bit confusing. Here's the code in my InitDialog (m_typeBox is the CComboBox control):
BOOL CTerminalPrompt::OnInitDialog() { CDialog::OnInitDialog(); // TODO: Add extra initialization here m_Elements = 1; m_typeBox.AddString("testing"); m_typeBox.AddString("testing2"); this->UpdateData(FALSE); return TRUE; // return TRUE unless you set the focus to a control // EXCEPTION: OCX Property Pages should return FALSE }
Does anyone have any suggestions? Am I missing something? Thanks, your help is a GREATLY appreciated :-D -
A pointer delimma (requesting help from pointer/dynamic array gurus)That worked perfectly!!!! Thanks Pete.. I didn't even know that container existed, .. which will help a quite a few more problems I've been facing. Thanks Again :)
-
A pointer delimma (requesting help from pointer/dynamic array gurus)Ok, I have a CArray container like so:
CArray objectList;
and I declared a dynamic array in a separate class like so:class SelectionBox { public: //constructor , destructor, etc... void AddContent(myObject *); // <-- this is what's I can't figure out protected: myObject *content; // to be used as dynamic array unsigned long numContents; // counter that contains the number // of contents in the selection box }
So now I built my AddContent() function like this:void SelectionBox::AddContent(myObject *c) { unsigned long counter; myObject *tempObject; tempObject = new myObject[numContents]; tempObject = content; content = new myObject[numContents + 1]; for(counter = 0; counter < numContents; counter++) { content[counter] = tempObject[counter]; } //c->IsSelected = true; //<- this gives me the illusion that it's working content[numContents] = c; //content[numContents].IsSelected = true; // <- this is what I need to work numContents++; delete [] tempObject; }
Finally, in another part of the program, I shoot the address of one of the objects stored in the CArray to the AddContent function. At first the function appeared to be working.. That is until I later tried to manipulate the original objects in the CArray by manipulating what I thought was the pointer to them in my SelectionBox class. Then I found out that I had copies of data stored and not a pointer to the CArray data. I can't for the life of me figure out how to declare the function and pass the data so that I can store an array of pointers/addresses to the data in the CArray container. Can someone show me an example, or maybe a link to a relevant tutorial? -
Inheriting a new View Class for MDII'm getting an error when I try to inherit a new view class for a MDI application, and I can't figure out why :/ .. First I created an OpenGL viewport inherited from CView, and packed it with all kinds of functionality. It works great. But now I'm trying to derive a new view class from it, and I'm getting the following error (using VC++ 6.0 professional): C:\DEVELOPMENT\MotionX\MotionX.cpp(119) : error C2039: 'classCMotionXModelView' : is not a member of 'CMotionXModelView' c:\development\motionx\motionxmodelview.h(15) : see declaration of 'CMotionXModelView' C:\DEVELOPMENT\MotionX\MotionX.cpp(119) : error C2065: 'classCMotionXModelView' : undeclared identifier The thing is, I'm just deriving it from a class that is fully functional, and haven't added anything except a member variable to it. This is the view class declaration that works:
#if !defined(AFX_MOTIONXGLVIEW_H__A90B4B55_D9F7_4DD4_A776_7EDC323D4724__INCLUDED_) #define AFX_MOTIONXGLVIEW_H__A90B4B55_D9F7_4DD4_A776_7EDC323D4724__INCLUDED_ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 // MotionXGLView.h : header file // #include "gl/gl.h" #include "gl/glu.h" #include "gl/glaux.h" #include "MotionXSceneDoc.h" #include "MotionXCamera.h" #include "MotionXModel.h" // Added by ClassView ///////////////////////////////////////////////////////////////////////////// // CMotionXGLView view // Define Viewport modes #define PERSPECTIVE 0 #define FRONT 1 #define BACK 2 #define LEFT 3 #define RIGHT 4 #define TOP 5 #define BOTTOM 6 class CMotionXGLView : public CView { protected: CMotionXGLView(); // protected constructor used by dynamic creation DECLARE_DYNCREATE(CMotionXGLView) // Attributes public: // Operations public: CMotionXModel model; void DrawGrid(); void SwitchViewportMode(unsigned int); void DollyViewport(const float speed); void PitchAroundPoint(const float speed); void RotateAroundPoint(const float speed); inline void PedistalViewport(float speed); inline void StrafeViewport(float speed); CMotionXCamera viewCam; BOOL SetupPixelFormat(); // Overrides // ClassWizard generated virtual function overrides //{{AFX_VIRTUAL(CMotionXGLView) public: virtual void OnInitialUpdate(); protected: virtual void OnDraw(CDC* pDC); // overridden to draw this view virtual void OnUpdate(CView* pSender, LPARAM lHint, CObject* pHint); virtual BOOL PreCreateWindow(CREATESTRUCT& cs); virtual BOOL OnCommand(WPARAM wP
-
TreeView in dockable DialogBarI'm writing a 3D modeling app using MFC MDI framework. I'm trying to get a dockable dialog bar with a Treeview control to display a list of objects within the project's workspace, but I can't seem to access the treeview for initialization or manipulation. I've created a dialog template in the resource editor with a treeview control in the dialog. I then created a class for the dialog box/bar, and assigned a variable to the treecontrol (m_tree). I then declared the entire dialogbar in CMainFrame. The dialog bar loads, and is dockable, but I can't seem to initialize it anywhere. I've tried initilizing it in the Dialog class OnCreate, and OnInitDialog, but it has no effect. I also tried to apply afx_msg overrides to the CMainFrame class, but I get an error saying I can't call a static function (something along those lines). Does anyone know how I can get this thing running, or know of any good articles/tutorials that deal with a dockable treeview in an MDI application?
-
TreeCtrl in DialogBar in MFC MDII'm writing a MFC MDI application, that has a dockable DialogBar containing a TreeCtrl to manage the application's project workspace. The problem is, I can't seem to initialize or otherwise interact with my tree control. I'm using VS 6.0 professional, I've designed the dialog in the resource editor and given it the id IDD_TREE_ORGANIZER. In addition I assigned the tree control a variable within the dialog class (m_tree). At first I tried to initialize the tree control in the dialog's OnCreate() function, but I just got a blank control. Then I read that the control should be initialized in a dialog's OnInitDialog function. I tried that as well, but again got a blank tree control (though the sample exersize I worked on did fine.. It was on a standard dialog though, and not a dockable dialog bar owned by the mainframe). Does anyone know of some sample code out there that shows how to create and interact with a tree control in a dockable dialog bar in an MFC MDI application that I can use for reference? I've been working on this for weeks and I'm pretty frustrated at this point :(