CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: darwen

Page 1 of 80 1 2 3 4

Search: Search took 0.40 seconds; generated 49 minute(s) ago.

  1. Replies
    10
    Views
    1,946

    Re: How can I *simulate* an AfxMessageBox?

    Actually it sounds like this is a windows message loop problem.

    By calling show dialog the dialog is setting up its one message loop which pumps the window's messages around.

    The hardware...
  2. Re: C++/CLI...convert wchar_t array to System::String^

    Or in your case :



    wchar_t ch = ' '
    array<wchar_t>^ returnstr = gcnew array<wchar_t>(10);
    int pos = str->IndexOf(ch);
    str->CopyTo(0, returnstr, 0, pos);

    return gcnew String(returnstr);
  3. Re: C++/CLI...convert wchar_t array to System::String^

    Dead easy :



    const wchar_t *test = L"hello there";
    String ^xx = gcnew String(test);


    Darwen.
  4. Replies
    8
    Views
    2,034

    Re: ArrayList adding item

    To fix your original problem :



    foreach (HtmlAgilityPack.HtmlNode node in rowNodes)
    {
    string url_1 = node.InnerText;
    urlpool0 = new ArrayList(); // problem is here ! creating a new...
  5. Replies
    45
    Views
    8,829

    Re: How much it takes from you to master C++ ?!

    C++ is a great starting point in my opinion but beware ! The learning curve is very steep (especially when you start moving into templates etc).

    For instance if you know (and I really do mean know...
  6. Thread: Vector

    by darwen
    Replies
    2
    Views
    1,198

    Re: Vector

    Try not to mix .NET and native C++ constructs like this.

    Vector is a native C++ container and in .NET you should be using the .NET equivalents : System.Collections.Generic.List for instance.
    ...
  7. Replies
    7
    Views
    1,441

    Re: Symbol to a symbol?

    You can do this using delegates :

    e.g.



    // have to fill in the types with '...' yourself, don't know what they are
    IEnumerable<...> GetQuery(... checkData, Guid guidToFind, Func<Guid, ...>...
  8. Replies
    5
    Views
    3,634

    Re: ContextSwitchDeadLock please help

    You've not shown any code which is the slow part - you mentioned TickImporter.ImportDataToStore can you post that ?

    If this is loading 20 files from disc at the same time then this'll be causing...
  9. Replies
    6
    Views
    7,021

    Re: Adding A Function To A Windows Form Button

    What you're doing isn't C++ - it's C++/CLI which is a completely different language although it looks very similar. Google for "native C++" and "managed C++" and see the differences.

    Some of your...
  10. Replies
    18
    Views
    10,805

    Re: A faster std::set?

    One thing I've done to speed up this sort of thing before is to add all elements to a list (unordered) first, then sort the list.

    You can then easily remove duplicates by checking adjacent...
  11. Replies
    13
    Views
    2,483

    Re: Linked List, Tree, etc is useful now a day?

    Just about any application will use data structures. Try writing one without them !

    Darwen.
  12. Replies
    13
    Views
    2,483

    Re: Linked List, Tree, etc is useful now a day?

    I think it is essential for any programmer to know standard data structures nomatter which language they use.

    They should also know basic algorithms like search algorithms.

    Darwen
  13. Replies
    1
    Views
    1,000

    Re: C# MarshalException C code

    You can't return structs from PInvoke methods.

    You'll have to do it like this :



    // C++
    struct GetPluginData
    {
    int data[22];
  14. Replies
    13
    Views
    2,483

    Re: Linked List, Tree, etc is useful now a day?

    Sounds like a homework question to be, but I'll answer it regardless.



    The behaviour of standard data structures is something everyone should know in any language, not just C#.

    In order to...
  15. Replies
    2
    Views
    928

    Re: need help in process.start()

    Why is the c# copying the exe into it's local folder ? Are you adding the game exe as a reference ? It won't do this by default. You shouldn't be adding the exe as a reference anyway if you are doing...
  16. Replies
    2
    Views
    2,971

    Re: Using DoEvents in WPF

    This really isn't the way to do things. DoEvents or anything like it should be avoided at all costs because it can cause all sorts of problems (re-entrancy of code etc etc).

    What you really should...
  17. Replies
    2
    Views
    1,441

    Re: Background Worker...how to kill the class??

    Don't worry about creating a new instance every time. .NET will clean up automatically for you (that's what working in a managed language is all about).

    You could always make the instance of the...
  18. Thread: Image Browser

    by darwen
    Replies
    2
    Views
    805

    Re: Image Browser

    Doing this in WPF is really easy. There's lots of examples on the net as well - see here..

    Darwen.
  19. Re: setting combo-box to enable/disable in a code...

    You should have a member called 'cmbDocumentClasses'. Windows forms puts a member variable named the same as the 'Name' property for each control into the form.

    e.g.



    public void Example()...
  20. Replies
    2
    Views
    1,351

    Re: return type of derived class

    The only way to do this is to use generics. Otherwise you can't define the type of the return value.

    Darwen.
  21. Replies
    5
    Views
    1,339

    Re: Regex except words

    Have you looked at string.Replace method ?

    e.g.



    string x = "AT52156123156\r\nNL648312315";
    string result = x.Replace("AT", string.Empty);
    result = result.Replace("NL", string.Empty);
  22. Replies
    5
    Views
    1,339

    Re: Regex except words

    I personally wouldn't use a regex for this.

    Try this :



    using System;
    using System.Linq;

    // ...
  23. Thread: List item name

    by darwen
    Replies
    2
    Views
    1,004

    Re: List item name

    In answer - yes, you can do this with reflection.

    However you shouldn't - it leads to runtime errors rather than compile-time errors (so they tend to happen infront of users which makes you look...
  24. Replies
    9
    Views
    1,739

    Re: List vs Array

    Another consideration is memory.

    List (unless you set its capacity) continually doubles the memory it uses when its internal buffer becomes full.

    This can lead to large sections of unused...
  25. Replies
    9
    Views
    1,252

    Re: GUI for controller

    Or server-side developement. Or linux.

    And that's if they write a UI at all.

    Oooh I love 10,000 lines of xml config files and console apps.

    Reminds me of when I started by University degree...
Results 1 to 25 of 1998
Page 1 of 80 1 2 3 4





Click Here to Expand Forum to Full Width

Featured