User Profile

Collapse

Profile Sidebar

Collapse
BahatiSiD
BahatiSiD
Last Activity: Jun 19 '09, 01:19 PM
Joined: Oct 4 '08
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • BahatiSiD
    replied to Synchronous events? (c++/cli)
    in C
    Got it!

    When you think about it (which I was apparently not able to do at five AM) there had to be something going on in the handler which is not immediately done - i.e. drawing the new row in the DataGridView.

    The 'secret' was the Refresh() method of the dgv which forces it to redraw immediately.

    My little cpu is now, of course, painfully slow, but that's kind of the whole point - to be able to SEE it...
    See more | Go to post

    Leave a comment:


  • BahatiSiD
    started a topic Synchronous events? (c++/cli)
    in C

    Synchronous events? (c++/cli)

    Hello!

    I have a class instance that fires events and they are handled in a form.

    I believe this kind of event is called trivial:
    Code:
    public: delegate void CpuStepEventHandler(Object^ sender, CpuStepEventArgs^ e);
    	public: event CpuStepEventHandler^ CpuStepEvent;
    	protected: virtual void OnCpuStepEvent(CpuStepEventArgs^ e) {
    				   //if(CpuStepEvent != nullptr)
    				   CpuStepEvent(this,
    ...
    See more | Go to post

  • BahatiSiD
    replied to How to pass by reference in C++ .net?
    in C
    That seems about right!

    As it stands I’m writing my code in a ref class which is Form1 and when I declare an int outside of a function (which is then a member function of Form1) it's just a member variable of a ref class so I guess it's on the heap too.

    This clearly isn't the way to go, so it's back to the drawing board for me. :)

    Can someone point me in the direction of a fairly comprehensive managed...
    See more | Go to post

    Leave a comment:


  • l034n, thank you very much for all the help. "Managed c++" keyword does seem to get me more relevant search results.

    I know there should not be too much of a difference between native and managed syntax, but I am getting errors if I don't make changes to the code you supplied. I made a new post in the other thread about it.

    It’s probably due to a very basic error on my part. And that's the issue that makes...
    See more | Go to post

    Leave a comment:


  • BahatiSiD
    replied to How to pass by reference in C++ .net?
    in C
    These are the steps I’ve taken to try this out, and indeed I take whenever I’m making an application.

    In visual studio 2008 I click on file>new>projec t, select visual c++ in project types and windows forms application in templates.

    In an 'empty' project I get a 'Form.h'. The last lines in that file are:
    Code:
    #pragma endregion
    };
    }
    I write my code between lines 1 and 2.

    This...
    See more | Go to post

    Leave a comment:


  • it does indeed, thank you very much!

    in terms of time passed from my first 'application' (that is, the first piece of code that does something useful, and is not an exercise in something) i'm an absolute newbie, and it can be measured in months. i did some native c++ code for school and stumbled on windows forms when i needed my output to be graphical. i liked it very much because i could immediately apply my newly gained familiarity...
    See more | Go to post

    Leave a comment:


  • BahatiSiD
    replied to How to pass by reference in C++ .net?
    in C
    it now says: error C2664: cannot convert parameter 2 from 'cli::interior_ ptr<Type>' to 'int *' on the same line.

    the more i think about it the original code should not work at all? the function body says: the address of y = x*x
    not: the value on the addres of y = x*x as it should?

    please correct me if i'm wrong, as i am a noob. :)

    your code makes much more sence!

    and guess what,...
    See more | Go to post

    Leave a comment:


  • BahatiSiD
    started a topic What am I coding in? Visual C++? .net? CLI???
    in .NET

    What am I coding in? Visual C++? .net? CLI???

    it's as noob as it gets, but i'm having trouble finding information on the internet because i don't know what to look for.

    i'm using visual studio 2008. i click on file>new>projec t, select visual c++ in project types and windows forms application in templates.

    if i use "visual c++" as a keyword in my searches i get a lot of mfc stuff. ".net" takes me to c#. "windows forms" also. so...
    See more | Go to post

  • BahatiSiD
    started a topic How to pass by reference in C++ .net?
    in C

    How to pass by reference in C++ .net?

    Code:
    int y;
    void square(int x, int& result)
        {
         result = x*x;
         }
    ...
    square(3,y);
    this code compiles and works in DevCpp (native C++), but not in VS2008 .net C++

    it says: error C2664: cannot convert parameter 2 from 'int' to 'int &' (on the line where i call the function)


    can someone please tell me what can be done?
    See more | Go to post
No activity results to display
Show More
Working...