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
  • Link Error Which .lib to include

    help
    6
    0 Votes
    6 Posts
    0 Views
    F
    Yes thanks
  • 0 Votes
    5 Posts
    0 Views
    J
    Note that reading even a trivial excel file in an application can be a difficult task. Once you have read the data the user interface and writing to a database is easier because there are more sources that one can learn from.
  • MALLOC FUNCTION IMPLEMENTATION

    c++
    4
    0 Votes
    4 Posts
    0 Views
    J
    A very simple and realistically non-worthwhile implementation is simple. Your malloc calls new with an byte array. Then your free, which you would also implement would use delete to delete the array. If you want a learning experience however then you should do the following in the specified order. 1. Learn what stack and list are and how to implement them. 2. Specifically learn how to implement them using sequential memory and not just pointers. 3. Learn how malloc is generally implemented. You will need substantial understanding of 1/2 to understand this. 4. Implement your own heap management. (Which you will understand after doing 1/2/3.)
  • To copy path of selected file or folder

    help
    3
    0 Votes
    3 Posts
    0 Views
    Richard DeemingR
    You already asked this question a couple of weeks ago: "copy path" option in right click context menu using c#[^] DO NOT post the same question multiple times. Either follow the article that Sergey linked to[^], or use the built-in "Copy as path" option[^] that I linked to. "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
  • How to fast read excel file, with VC2005

    tutorial
    5
    0 Votes
    5 Posts
    2 Views
    L
    Indeed, thanks for you infomation!
  • Writing vector data into a file!

    graphics game-dev c++ announcement learning
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • BIG trouble with 64-bit Shell_NotifyIcon() - can anyone help?

    c++ help wpf com linux
    10
    0 Votes
    10 Posts
    4 Views
    F
    Tacitonitus, I don't think that a code couldn't work because someone is marked by the obscure forces. First of all, it was was my wrong about the new operator because it seemed to me that you destroyed the buffer exiting the function. Of course to use a static or dynamic allocation makes no difference, what really counts is that the memory stay there when shell functions are called. The Shell_NotifyIcon, with a lot of bugs as usual for MS products, couldn't be not functional. There is a sea of 64 bits applications out there that works. My personal idea is that the problem is not in your code for Shell_NotifyIcon, but somewhere else. Probably you would take a tighten look to the whole code and try debugging to see if the buffer is consistent each time you use the Shell_NotifyIcon function. Cheers
  • IAccessible - get word under mouse pointer in IE

    question
    2
    0 Votes
    2 Posts
    0 Views
    S
    Reading the word under the cursor via UI Automation[^] This example is in C# but you should be able to make a C++ version easily enough. Steve
  • 0 Votes
    2 Posts
    0 Views
    Richard Andrew x64R
    There are two main issues to deal with here. 1. If you want to call functions like that in a C++ DLL, you shouldn't put them inside classes. 2. There is an issue called C++ Name Mangling. This is where the linker exports the functions with additional characters that describe the function signature. To call the functions by their names directly, you must place the definitions inside an "extern C" declaration like so: extern "C" { void Hello() { printf("Hello");} void Hello1() { printf("Hello 1");} } The difficult we do right away... ...the impossible takes slightly longer.
  • C++ to C problem

    help data-structures c++ visual-studio com
    4
    0 Votes
    4 Posts
    0 Views
    D
    Back when I was in school, we made our own RPN calculator from scratch (after spending weeks discussing data structures and algorithms on the chalkboard), not converting it from one language to another. As a result, I understand how they work. "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
  • 0 Votes
    4 Posts
    0 Views
    A
    Member 11203277 wrote: One of the strongest arguments in support for using WTL over MFC was the fact that executable of WTL will be around 4x smaller in size than statically linked MFC Application.   Now, given the fact that we are living in 2015 now, does it really matter? If your program is 8MB or 2MB? Well, when it comes to MFC, you should probably be dynamically linking to system installed dll's anyways. In that case, the size of the libraries doesn't really matter since you'd be sharing the system MFC libraries (instead of bloating the application).
  • UI widget

    design visual-studio business help
    2
    0 Votes
    2 Posts
    0 Views
    A
    This is a looooonnnnggg conversation. If you're just starting out, I'd look at what other widget libraries have done. You'll probably also find that a lot of widget libraries have grown into full out frameworks. Here are a few to look at: - Qt - MFC - wxWidgets - GTK+
  • UI widget

    design visual-studio business help
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • Destructors

    c++ graphics help question
    6
    0 Votes
    6 Posts
    0 Views
    S
    SILK Packers and movers in Lahore Karachi islamabad rawalpindi Pakistan http://www.asklint.com/
  • The transfer of Technology

    c++ database performance tutorial csharp
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • c graphics

    graphics game-dev tutorial question learning
    3
    0 Votes
    3 Posts
    2 Views
    A
    If a book offers graphics, its best for beginners! There is no problem for you to get in depth of everything, you need to get idea of it right now... Any book, would give you an idea of what graphics is, what C has for graphics and so on. Secondly, every compiler if it compiles the code correctly, is good... You can try out multiple, and see for which one suits you. Once you've learnt enough, and you want to move to productive scenarios. Then I would suggest, you move on from C to C++ at least. GTK+, QT and many more libraries are out there to support graphics. You can learn the basic difference here: http://stackoverflow.com/a/1887094/1762944[^]. Finally, nothing is best, you have to see which product suits your requirements. Good luck! The shit I complain about It's like there ain't a cloud in the sky and it's raining out - Eminem ~! Firewall !~
  • Ejecting USB memory sticks problem

    help question tools performance
    3
    0 Votes
    3 Posts
    0 Views
    S
    Hello David, Thanks for your reply ! I have tried your suggestion but this change produces the command line "D:\StickCopier\deveject -EjectName:""USB Mass Storage Device""" in the debugger (i.e. a PAIR of double quotes whereas single double quotes are needed for the argument to EjectName:) Since my original posting, I have tried ShellExecute() and am getting a similar result - ShellExecute() succeeds (RC = 42, which is greater than 33), but the USB stick is still mounted. New code is as follows:- CString szFile = "D:\\\\StickCopier\\\\deveject.exe"; const CString quote = "\\""; // This is actually the character '"' CString szParameters = "-EjectName:" + quote + "USB Mass Storage Device" + quote; CString szDirectory = "D:\\\\StickCopier\\\\"; HINSTANCE hInstance; hInstance = ShellExecute(NULL,"Open",szFile, szParameters, szDirectory,SW\_HIDE); // returns 42 (> 33 so no error Doug
  • 0 Votes
    2 Posts
    0 Views
    Richard DeemingR
    This is a C++ forum; you're looking for the C# forum, which is immediately below this one in the list. You'll also need to explain what "softtree" is. "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
  • 0 Votes
    13 Posts
    0 Views
    L
    Sample code for what? Allocate a memory buffer, copy the string into it, and pass it to the receiver. The receiver can then keep that buffer until it is no longer needed.
  • cryptosystem

    c++
    3
    0 Votes
    3 Posts
    0 Views
    C
    declined image processing toolkits | batch image processing