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
  • 0 Votes
    3 Posts
    0 Views
    CPalliniC
    You can use Visual Studio for writing C++ applications targetting the Windows platforms. If you are using UNIX (or Linux) then you are NOT using Visual Studio (and you are using a UNIX or Linux compiler, e.g. gcc). SQL commands are used to deal with databases, see, for instance the SQL Wikipedia page[^]. THESE PEOPLE REALLY BOTHER ME!! How can they know what you should do without knowing what you want done?!?! -- C++ FQA Lite
  • 0 Votes
    10 Posts
    1 Views
    S
    The result of that part of the condition would be the same as static_cast(system[index].name) The string literal will be evaluated but the result of the comma operator is always the leftmost argument. (You probably know that, but I thought I should offer an explanation for less experienced readers) My guess is this was supposed to be a string comparison. Not that it makes the condition look any better... Oh, and btw., I know that '??!' is the trigraph for '|', but I'm not familiar with '?!?'. Typo? ;P 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)
  • Strange

    c++ csharp visual-studio performance help
    4
    0 Votes
    4 Posts
    0 Views
    S
    Have you considered the possibility of a comment line containing a trigraph? See for example this article[^] on curious errors caused by accidental introduction of trigraphs in comment lines. 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)
  • MFC Ribbon Editor

    csharp c++ visual-studio design question
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • CListBox Header

    help c++ tutorial
    2
    0 Votes
    2 Posts
    0 Views
    J
    Might you try changing to a CListCtrl (that has a built in header)? or maybe add a CHeaderCtrl object just above the list box? "the debugger doesn't tell me anything because this code compiles just fine" - random QA comment "Facebook is where you tell lies to your friends. Twitter is where you tell the truth to strangers." - chriselst
  • Undeclared identifier in API

    help c++ json question
    6
    0 Votes
    6 Posts
    0 Views
    O
    Ideally, you'd want minimal exposure, to ensure low coupling. The original post made a point of only showing Param in the private section, and said the user of the library should not be playing around with Param, so I assumed it was not a public type. If the Param type was a public type used in the interface, the best solution would be to include Param.h in libApi.h instead of introducing a new file.
  • COM Component

    com debugging help question
    2
    0 Votes
    2 Posts
    0 Views
    _
    Add the function AfxEnableControlContainer() in the InitInstance method of you app class. «_Superman_»  _I love work. It gives me something to do between weekends. _Microsoft MVP (Visual C++) (October 2009 - September 2013) Polymorphism in C
  • C++ MFC Dialog Password encryption Vs2005 [moved]

    c++ help mysql security regex
    3
    0 Votes
    3 Posts
    0 Views
    L
    Do not use encryption for passwords. You should add a salt value and use the two pieces of data to create a one-way hash which you store in your database. Remember, encrypted data can be decrypted, hashes cannot. There are many articles and samples explaining this in detail, including Secure Password Authentication Explained Simply[^].
  • 0 Votes
    8 Posts
    0 Views
    D
    narmadha_s wrote: I have to capture Entire desktop without my application window. So then minimize just your app and then capture the desktop. "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
  • About SetFocus in Doc/View Architecture

    architecture question
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • saving records without database?

    database help question
    2
    0 Votes
    2 Posts
    0 Views
    CPalliniC
    Robin Percival Vibar wrote: how am i suppose to do it??? Yes, that's a good question: if you don't want to loose your changes every time your program exits then you have to use permanent storage, that is the hard disk (or another persistent medium like, for instance, flash memory of pen drives). Since you don't want to use a text file, I suppose a binary file is OK for you. You could design your own protocol or use object serialization. If you are using MFC, then you are lucky, since such framework provides good support to serialization, see "Serialization in MFC"[^]. THESE PEOPLE REALLY BOTHER ME!! How can they know what you should do without knowing what you want done?!?! -- C++ FQA Lite
  • TLS Callback generates Virus alert

    question c++ visual-studio security debugging
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • MFC- receiving Button-Click-Message failed

    c++ linux tools help question
    3
    0 Votes
    3 Posts
    2 Views
    M
    Hello Richard, "buttonX" applies to all buttons.
  • quine mccluskey method on C/C++

    help c++ algorithms
    11
    0 Votes
    11 Posts
    3 Views
    R
    ok. so the binary form is stored in the string. and the i will make a for loop that will count the number of 1's in the binary form of each entered minterms. my problems is how do I group together the minterms with the same number of 1's cause i need to compare 2 different groups later.
  • replace malloc by new

    question
    2
    0 Votes
    2 Posts
    0 Views
    _
    I know what: I replaced "(" by "[" in pBuffer = new unsigned char(nSize); ex pBuffer = new unsigned char[nSize];
  • how to utilize "(int argc, const char * argv[]) " in a program

    css tutorial
    3
    0 Votes
    3 Posts
    3 Views
    CPalliniC
    Google is your friend. See for instance: "argc and argv"[^]. THESE PEOPLE REALLY BOTHER ME!! How can they know what you should do without knowing what you want done?!?! -- C++ FQA Lite
  • Change LVS_ALIGNLEFT by LVS_ALIGNTOP

    question
    9
    0 Votes
    9 Posts
    0 Views
    _
    I noticed something: in order to work correctly, before I change the aligment style, I have to setup scrollbars of list control to top/bottom ... orelse, the list looks uggly (all items are bad drawned) ... it is logical to happend that ? I am thinking that if I setup vertical scrollbar on some position, if I change the aligment style to horizontal, it doesn't fit at he same horizontal position ...
  • Is it possible to bind the "this" pointer

    c++ question
    3
    0 Votes
    3 Posts
    0 Views
    C
    You could use bind1st if CallBackFunc took one parameter: void CallBackFunc(int) { ... } ... obj->SetCallback(std::bind1st(std::mem_fun(&MyClass::CallBackFunc), this)); Since it takes nothing, you may have to write your own function template that takes a callable and a pointer that returns a small function object that stores the callable and the pointer as members and invokes them with operator(): as always, by refusing to use boost you're forcing yourself to reimplement parts of it.
  • Function in namespace - multiple definition

    c++ question
    5
    0 Votes
    5 Posts
    0 Views
    A
    Off the top of my head, one thing that may cause this message would be if you #include the header in multiple locations and have no header guards (either pragma once directive or #ifndef/#define/#endif method).
  • kuch ni milya.....

    2
    0 Votes
    2 Posts
    0 Views
    I
    dhayan naal labbo :) :-D :laugh: ;P If it can happen, it will happen - Murphy's Law