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
    7 Posts
    0 Views
    CPalliniC
    So you have to it in place. Forgot the printf signature and write a function to output a string, a character at time. Then write a function to output properly a floating point number (that would be more difficult, but it depends on your requirements) and combine the two function in order to obtain the expected result. "In testa che avete, Signor di Ceprano?" -- Rigoletto
  • Changing gamma with multiple display setup

    help question workspace
    12
    0 Votes
    12 Posts
    0 Views
    D
    You apparently didn't look at the rest of the page, especially the navigation down the left side, and completely missed the link to "Reference", which gives you all of the functions involved with WCS and the documentation on each. If you're looking for someone to write the code for you, or to copy, I can't help you there. I have no need of color correction at all and don't have the time to the someone's research for them. Asking questions is a skill CodeProject Forum Guidelines Google: C# How to debug code Seriously, go read these articles. Dave Kreskowiak
  • 0 Votes
    5 Posts
    0 Views
    L
    Yes, it's the sort of question that gets you overthinking in your head. :laugh:
  • Final year project

    c++ com question
    1
    0 Votes
    1 Posts
    1 Views
    No one has replied
  • c++

    c++
    2
    0 Votes
    2 Posts
    0 Views
    J
    That line won't compile. "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 "I don't drink any more... then again, I don't drink any less." - Mike Mullikins uncle
  • Set precision based on a condition in cout

    testing beta-testing question
    2
    0 Votes
    2 Posts
    0 Views
    1
    I made the following change, and result is as expected: double x = asDouble(-2147483648.0, 4); // instead of asDouble(-2147483648, 4); Your code is not compiled for me, the error is: error C4146: unary minus operator applied to unsigned type, result still unsigned So, your conditional precision is OK, the problem is that 2147483648 is more than maximal unsigned int value, and applying unary minus operator to it gives compiler error in my case, and unexpected result in your case. Probably your compiler gives some warning for this line, don't ignore it. Output: -214748.3648 0.5456 Tested with VC++ 2015.
  • Add Window procedure to picture control

    c++ json tutorial learning
    7
    0 Votes
    7 Posts
    0 Views
    G
    Thank you. Will give it a try.
  • primary hormones in men

    com help question announcement
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • Battleship game in C

    game-dev
    4
    0 Votes
    4 Posts
    2 Views
    D
    Julien JG7 wrote: Does someone have a code in c, for a battleship game, i have to do it on codeblock So if YOU have to do it, why are you asking for SOMEONE ELSE's code? :confused: "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
  • dicom error

    visual-studio help
    3
    0 Votes
    3 Posts
    0 Views
    S
    Thanks and it is working now
  • typical NASM usage

    question linux
    6
    0 Votes
    6 Posts
    0 Views
    C
    thanks for advice
  • State Machine to C code and back

    collaboration com design hardware algorithms
    7
    0 Votes
    7 Posts
    2 Views
    Greg UtasG
    Your project might move along faster if you targeted your FSM editor to my session processing framework in the Robust Services Core sb[^] directory. I've yet to write any CP articles about it, because the lower level parts of that code base are useful to a much wider audience. But there's a fair amount of documentation[^] and examples; scroll to the bottom of that page. It's essentially the framework used in a GSM MSC that evolved to LTE and is still seeing development. It has run-time support, TLV messaging, state machines that can observe and override the behavior of others, and even overload controls. A tool would be very useful even if it simply generated the C++ boilerplate needed when deriving from the classes defined by that framework. Robust Services Core | Software Techniques for Lemmings | Articles The fox knows many things, but the hedgehog knows one big thing.
  • swedish file read

    c++
    5
    0 Votes
    5 Posts
    0 Views
    L
    Reminds me of when I was asked to send text files with "larger fonts" since the usual recipient had a hard time reading the "text" reports. It was only in wine that he laid down no limit for himself, but he did not allow himself to be confused by it. ― Confucian Analects: Rules of Confucius about his food
  • How to use C program to open a text file using Notepad?

    help tutorial question
    15
    0 Votes
    15 Posts
    1 Views
    Richard DeemingR
    User Account Control (Windows 10) - Microsoft 365 Security | Microsoft Docs[^] How User Account Control works (Windows 10) - Microsoft 365 Security | Microsoft Docs[^] "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
  • 0 Votes
    16 Posts
    0 Views
    J
    Hi Richard:thumbsup: I think because I am working on a EOL OS (XP) I have been having lots of problems installing Visual Studio 2010 I think the problems exist because the OS & the development of VStudio 2010 have not made any progress since its conception & I think that is why it is not working. I have alternatively installed Code::Blocks with some minor glitchs & needing some additional files to run under XP but it seems to be working correctly. I went for the portable install so that if it is no good for some reason I can easily ditch. Code::Blocks seems to have continuing development for XP so it has the advantage of update progression. I will keep you posted re developments Best Regards :-D
  • C++ template function returning "vector" ?

    c++ graphics hardware tutorial question
    6
    0 Votes
    6 Posts
    0 Views
    CPalliniC
    Quote: That would not work in my function which retrieves unknown "size" of (string) data. That's not a problem. It would work as well. Try, for instance #include #include using namespace std; vector get_a_fresh_vector_with_unknown_size() { vector v; int N = rand() % 128; for (int n = 0; n < N; ++n) v.push_back( rand() ); return v; } int main() { auto v = get_a_fresh_vector_with_unknown_size(); for (auto x : v) cout << x << " "; cout << endl; } "In testa che avete, Signor di Ceprano?" -- Rigoletto
  • CMFCRibbonComboBox

    tutorial c++
    7
    0 Votes
    7 Posts
    0 Views
    L
    www.google.com[^]
  • Bitmap::FromResource(HINSTANCE, WCHAR) , problem

    graphics question c++ winforms help
    3
    0 Votes
    3 Posts
    0 Views
    H
    how did you do that? please help www.logicsims.ir
  • CCombox

    help question
    2
    0 Votes
    2 Posts
    0 Views
    L
    That is a contradiction in terms. You cannot have the modern style and still use the old library. However, it may be possible if you implement the OwnerDraw property.
  • OnMouseWheel and OnSetCursor interaction

    question
    5
    0 Votes
    5 Posts
    0 Views
    U
    Actually SendMessage(WM_SETCURSOR, 0, 0 or use default) before zooming does the trick.