Skip to content

ATL / WTL / STL

Discussions on ATL, WTL and STL programming

This category can be followed from the open social web via the handle atl-wtl-stl@forum.codeproject.com

3.1k Topics 9.9k Posts
  • stl thread safe

    c++ docker tutorial question
    1
    0 Votes
    1 Posts
    1 Views
    No one has replied
  • MFC vs STL performance test

    c++ performance visual-studio graphics help
    15
    0 Votes
    15 Posts
    4 Views
    A
    Well... although a dynamically growing vector will still be slower than a pre-allocated array. Although you can presize a vector as well but that would require you to know about the speed cost of dynamic allocation and how vectors allocate arrays internally. Guess what I'm getting at is... you have to know at least a little about your containers and how you're using them. In summary, no free ride. ;P :)
  • std::string name.copy(...)

    c++ question csharp visual-studio help
    4
    0 Votes
    4 Posts
    2 Views
    L
    p_char = my_string.c_str(); as described in the documentation[^]. Veni, vidi, abiit domum
  • Create iwebbrowser2 in protected mode

    tutorial question
    4
    0 Votes
    4 Posts
    3 Views
    L
    narasingubhanu wrote: Any idea about this? Sorry, no. Veni, vidi, abiit domum
  • Group Box won't group

    c++ question csharp visual-studio
    9
    0 Votes
    9 Posts
    12 Views
    J
    Me either,Perhaps it doesn,t support that :doh:
  • Passing CString

    question
    8
    0 Votes
    8 Posts
    3 Views
    H
    Your analysis is a bit flawed. First of all, you don't need to empty the string before populating it: bkelly13 wrote: void B( CString &some_string ); // (spelling error fixed) { some_string.empty(); // this line is unnecessary some_string = internal_string; } There are several things that happen in this (fixed) code that don't happen in the 'first call' version. When calling the API, there is more setup on the part of the caller. A CString variable needs to exist already, and API setup makes sure that it is either empty or ref count is zero (and writable). Assuming that internal_string is another CString, no copying takes place. The some_string object's header info is updated to duplicate the same info in internal_string, and the ref count is incremented. If internal_string is 1MB in size, only a pointer and counter are changed (ie. no copying). Again, if internal_string is a CString, a similar process also happens in your 'first call' code (ie. no copying). If internal_string is a (const?) char* or (const?) char[] or something else that looks like one of those, then a copy needs to take place for both versions of the code. Windows 8 is the resurrected version of Microsoft Bob. The only thing missing is the Fisher-Price logo. - Harvey
  • Changing Title of an SDI appliction

    help tutorial
    5
    0 Votes
    5 Posts
    8 Views
    H
    puneit4u wrote: I have done the same thing earlier but it did not work. Keep in mind that if you set the title to something, then open a document, the framework sets the title as you describe in your original message. You can suppress this behavior by overriding a framework method. I don't have VS2010 open right now but you can figure this out by looking at the source. Windows 8 is the resurrected version of Microsoft Bob. The only thing missing is the Fisher-Price logo. - Harvey
  • oncreate function

    tutorial
    2
    0 Votes
    2 Posts
    5 Views
    L
    You need to provide much more information. Saying "it does not work" tells us very little. Veni, vidi, abiit domum
  • Help : learn ATL, STL and COM

    c++ com help tutorial
    4
    0 Votes
    4 Posts
    3 Views
    A
    hi, i will suggest to start with Inside COM by Dale Rogerson and then start with ATL/WTL for STL - start with Nicolai M. Josuttis books/online resources. regards, Ajay
  • COM technology and use

    c++ java com question
    6
    0 Votes
    6 Posts
    6 Views
    Y
    I think that these technologies still using by Microsoft and I think also that they are very important. but it's not wrong to use a new software builder and coder , they all the same but the new are easier to use. :)
  • Here is a C Program showing some Error, Give some solution

    c++ visual-studio help
    3
    0 Votes
    3 Posts
    6 Views
    L
    Replace int *val1,*val2; int *oper; void calc(val1,val2,oper) with //int *val1,*val2; //int *oper; void calc(int* val1,int* val2,int* oper)
  • COM Apartment

    com question
    7
    0 Votes
    7 Posts
    5 Views
    L
    http://docs.eiffel.com/sites/docs.eiffel.com/files/images/com-2.gif[^]
  • COM or DCOM?

    com help question
    11
    0 Votes
    11 Posts
    3 Views
    L
    ‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌ /* LIFE RUNS ON CODE */
  • trouble with a safe array of variants

    c++ com data-structures question lounge
    1
    0 Votes
    1 Posts
    2 Views
    No one has replied
  • chang folder's icon

    linux question
    1
    0 Votes
    1 Posts
    1 Views
    No one has replied
  • How can I get the ATL Headers for free?

    c++ question visual-studio
    2
    0 Votes
    2 Posts
    2 Views
    L
    I t6hink you have to pay for one of the full Visual Studio editions, same as MFC. Use the best guess
  • CFileException, discover reasons RESOLVED

    c++ visual-studio help csharp tools
    12
    0 Votes
    12 Posts
    18 Views
    L
    You're welcome. Use the best guess
  • 0 Votes
    1 Posts
    3 Views
    No one has replied
  • ActiveX in ActiveX problem

    help com question c++ asp-net
    1
    0 Votes
    1 Posts
    2 Views
    No one has replied
  • how to export an enum type in an ATL prject

    c++ help tutorial question
    2
    0 Votes
    2 Posts
    0 Views
    J
    Declare it in IDL e.g. typedef [v1_enum] enum LogLevel // These are the possible levels of log { None = 1, Error = 2, Warning = 3 }LogLevel; Use it in an interface parameter if you need to export a method: interface IMyErrors : IDispatch { HRESULT GetCurrentError(LogLevel udtLevel,... ... Compile and and export as a type library or .dll or import the IDL into a .h file