Skip to content

C / C++ / MFC

C, Visual C++ and MFC discussions

This category can be followed from the open social web via the handle c-c-mfc@forum.codeproject.com

111.5k Topics 465.7k Posts
  • threads ( c language ) in Ubunt

    data-structures tutorial
    7
    0 Votes
    7 Posts
    0 Views
    A
    0. Split your array into four parts (use the pointer to determine where you're doing the split, don't make another copy of the data) 1. Create worker threads to sum each with their portion (pointer to the beginning and size). 2. Wait for all threads to finish, sum their results. If this was a program that needed to do this over and over again, I'd also create a "thread pool" that is precreated. Creating threads on the fly is actually a pretty slow process, you want to do it sparingly.
  • 0 Votes
    4 Posts
    0 Views
    CPalliniC
    You may either want to use the circular buffer for holding the pointers of the actual strings or, more likely, for holding the strings themselves. In the first case coding is pretty straightforward (you may use Wikipedia's circular buffe[^]r page for inception). On the other hand, the second case is bit more complex, since you have to explicitely manage blocks of bytes (the strings) in the circular buffer. THESE PEOPLE REALLY BOTHER ME!! How can they know what you should do without knowing what you want done?!?! -- C++ FQA Lite
  • 0 Votes
    3 Posts
    0 Views
    A
    This is a good question because I'm not sure any of those really describes Windows messaging well. Sort of interesting given that it's the primary means of communication in the Windows desktop environment. I guess the rational behind this is that you can't really pass along data across messages, you can pass commands/messages and references. I used to use messages a lot within an application to communicate but it's a bit different when dealing internal to an application because you can pass data by reference easily. Externally, you can only do that if the data is in a place that is accessible to both applications or meets certain restrictions (as described here[^]).
  • how to use message queue in windows

    tutorial visual-studio com data-structures help
    5
    0 Votes
    5 Posts
    1 Views
    A
    Quote: _snwprintf_s and wprintf are not identifier. If you look at the tchar.h include[^], it has the definitions for those. If you include that file and still get errors in regards to wprintf and the other call, do note that they're enclosed in an #ifdef statement that requires the project to be compiled using _UNICODE.
  • general error c101008a: Failed to save manifest

    help c++ question announcement lounge
    3
    0 Votes
    3 Posts
    0 Views
    U
    Thanks a lot!!!
  • ImageHlp.h and DbgHelp.h in the same program

    question
    2
    0 Votes
    2 Posts
    0 Views
    CPalliniC
    It looks[^] the official library is DbgHelp, and they do actually provide overlapping functionality. THESE PEOPLE REALLY BOTHER ME!! How can they know what you should do without knowing what you want done?!?! -- C++ FQA Lite
  • DllMain safety

    question
    3
    0 Votes
    3 Posts
    3 Views
    Richard Andrew x64R
    Thanks Superman! The difficult we do right away... ...the impossible takes slightly longer.
  • stock market code please

    help
    8
    0 Votes
    8 Posts
    0 Views
    S
    You haven't asked for help, you asked for a full solution. If you want help, then you first need to do as much as possible by yourself, up to the point where you don't know how to proceed. Then tell us why you can't proceed and what, precisely, it is that you don't understand or don't know how to solve. There's no point for us to provide a full fledged answer if we don't know what you already know - we might just be wasting our time telling you what you already know! You may be unsure on how to start, maybe you believe if your design isn't perfect right from the start then you will ultimately fail. But that is not how software development works: software development never starts with a perfect design! Instead you start with what you think works best, and go on until you realize that you can't go on, or some detalis of your design are impractical. Then, based on what you've just learned, you correct your design. If all else fails, start new from scratch. GOTOs are a bit like wire coat hangers: they tend to breed in the darkness, such that where there once were few, eventually there are many, and the program's architecture collapses beneath them. (Fran Poretto)
  • 0 Votes
    17 Posts
    0 Views
    U
    No worries Richard, and please note that I do thank you for your overall support. Cheers
  • Format int in C

    help tutorial
    4
    0 Votes
    4 Posts
    0 Views
    Kornfeld Eliyahu PeterK
    C has a powerful printf[^] function to format variables... Skipper: We'll fix it. Alex: Fix it? How you gonna fix this? Skipper: Grit, spit and a whole lotta duct tape.
  • Dynamically re sizable dialog

    help tutorial question
    4
    0 Votes
    4 Posts
    0 Views
    _
    I would design the UI for such a requirement by embedding the radio button is some sort of a list. Here is an example - CQuickList[^] «_Superman_»  _I love work. It gives me something to do between weekends. _Microsoft MVP (Visual C++) (October 2009 - September 2013) Polymorphism in C
  • Perform operations on c++ DataTable

    c++ question
    24
    0 Votes
    24 Posts
    0 Views
    U
    Hi Richard, First and foremost, sincere apologies for a naivety mainly attributable to inexperience Yet. I acknowledge that the code posted is perfectly fine. While adapting to my needs, performing the loop before the below piece of code has resulted in blank "Ret" columns, confused me, and triggered some skepticism. sda->Fill(dbdataset); Now all look fine, and I'd like to thank you very much for your assistance. I spent the weekend on this mater whereas it took you barely few minutes from your side to bring a concrete solution. Hence I am indeed impressed, and hope to become a day a c++ pundit like you so as to give back by helping others on forums too. Cheers Member 11230372
  • Performing operations from DataTable c++

    c++ question
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • Classes and List of classes

    question c++ learning
    2
    0 Votes
    2 Posts
    0 Views
    L
    You could use one of the STL collection classes, such as array or vector. See http://msdn.microsoft.com/en-us/library/a7tkse1h(v=vs.100).aspx[^] for details.
  • As i delivery getting older ones just about

    com help
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • DLL creation process in windows application with CEN XFS

    sharepoint com help
    17
    0 Votes
    17 Posts
    0 Views
    V
    No problem , I will try some option too...
  • Insert icons CTreeCtrl (some items only)

    question
    4
    0 Votes
    4 Posts
    0 Views
    L
    That's the space for the icon, nothing you can do about it. You could use an image that just contains a line so it extends to the actual tree item.
  • Edit Control Problem

    csharp visual-studio help
    3
    0 Votes
    3 Posts
    0 Views
    U
    The graphic is simply used as a diagram of the antenna that pictures the dimensions needed for the equations. I do mean that values are plugged into each field six times or so before the program hangs using the mouse to select each field. So, if the user does a lot of playing around with different dimensions and frequencies during the same session and uses the mouse to change from one field to another the program might hang.
  • Office automation help

    c++ testing tools help question
    4
    0 Votes
    4 Posts
    1 Views
    D
    Good luck with that. I've just learned it all by trial and error over the years. MSDN does have a reference, which is fairly complete. For the missing pieces, empirical testing is your friend. "One man's wage rise is another man's price increase." - Harold Wilson "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons "You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
  • plz solution this programe????????????

    question
    5
    0 Votes
    5 Posts
    0 Views
    L
    :thumbsup: