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
    U
    Thanks you !!!
  • 0 Votes
    6 Posts
    0 Views
    CPalliniC
    You are right, of course. If the problem needs an exact solution, Simulated Annealing is not the right algorithm.
  • plz ans this program

    data-structures question
    4
    0 Votes
    4 Posts
    0 Views
    D
    It's all done. I even went so far as to grade it for you. Definitely a solid B. How would you like it delivered? :rolleyes: "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
  • Baffling Error!

    csharp visual-studio debugging help question
    4
    0 Votes
    4 Posts
    0 Views
    Richard Andrew x64R
    Thank you David. I was tearing my hair out. :) The difficult we do right away... ...the impossible takes slightly longer.
  • How to make flowchart for matrix on C language?

    help tutorial question
    3
    0 Votes
    3 Posts
    1 Views
    L
    Start by simply describing in english what each code section does, the flowchart will fall out from that. It will only be a problem if you didn't write the code yourself :-) In vino veritas
  • 0 Votes
    4 Posts
    0 Views
    L
    All the PDB file stuff isn't errors it's just the debugger telling you it can't debug inside the windows dll. You need the non community version for that aka the paid version :-) The actual error is you don't have the comctl32.dll loaded. I could give you the long explanation of where you add it in the program options but lets give you the new hack way Simply place this near the top of your main file #pragma comment( lib, "comctl32.lib" ) In vino veritas
  • parsing bitmap files (2)

    question graphics json
    10
    0 Votes
    10 Posts
    1 Views
    L
    Don't worry, I have the freedom to ignore any messages that don't interest me.
  • c libraries needed to deal with bitmaps

    c++ help question
    32
    0 Votes
    32 Posts
    1 Views
    L
    I found myself thinking about this when I woke up this morning and you are, of course, quite correct.
  • What`s a palette in the parsing a bitmap context

    graphics json tutorial learning
    12
    0 Votes
    12 Posts
    1 Views
    L
    It is rare but even 24bit and 32bit bitmaps can have palettes, you do it if you want something like millions of shades of blue for example when printing an ocean scene. If you look at the structure of the BitmapFileInfo header .. look at the second last entry that is how you know how many palette colours there are ... the last entry tells you how many are important. bitmapinfoheader[^] It is spelled out very clearly ... If biClrUsed is zero, the array contains the maximum number of colors for the given bitdepth You assume a 24bit or 32bit bitmap have no palette at your own risk. In vino veritas
  • Having issues with the cin.getline() function in C++

    help c++
    10
    0 Votes
    10 Posts
    0 Views
    K
    You're very welcome. String comparisons can be tricky in C/C++. I have over 30 years experience with C and it took me a couple of readings of your code to realize if(weight != "\n") did not do what it looks like it should! I'm sure I'm not the only one who looked at that and didn't twig right away that the string comparisons were incorrect.
  • 0 Votes
    11 Posts
    0 Views
    S
    Yes, this is the future direction going forward because MS does not want the user to install many VC++ redistributables on their machine.
  • launching Caliberate the screen for Pen or touch input C++

    c++ mobile tutorial
    3
    0 Votes
    3 Posts
    0 Views
    A
    Please see it may be this will be useful to you. How to read HTML file using stream reader in C#?[^]
  • Youtube Supporter

    help
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • Youtube Supporter

    help
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • Trying to add a menu bar to a dialog

    com linux learning
    8
    0 Votes
    8 Posts
    0 Views
    F
    IDR_MENU is defined in my resource file I basically took the menu for the MainFrame and wanted to use it for the Dialog Opening up The resource editor I am beginning to think when you view a dialog with menu it wont display it There is a only a way to view the menu by itself once I get my code going and do a ShowWindow for the Dialog i'll see if it displays the menu IDR_MAINFRAME MENU BEGIN POPUP "&File" BEGIN MENUITEM "E&xit", ID_APP_EXIT END POPUP "&Edit" BEGIN MENUITEM "&Undo\tCtrl+Z", ID_EDIT_UNDO MENUITEM SEPARATOR MENUITEM "Cu&t\tCtrl+X", ID_EDIT_CUT MENUITEM "&Copy\tCtrl+C", ID_EDIT_COPY MENUITEM "&Paste\tCtrl+V", ID_EDIT_PASTE END POPUP "&View" BEGIN MENUITEM "&Toolbar", ID_VIEW_TOOLBAR MENUITEM "&Status Bar", ID_VIEW_STATUS_BAR END POPUP "&ProgDebug" BEGIN MENUITEM "Program Debug", ID_DEBUG END POPUP "&Asidlist" BEGIN MENUITEM "Address Space List", ID_ASID END POPUP "&Help" BEGIN MENUITEM "&About DBGR...", ID_APP_ABOUT END END
  • TAPI http request

    c++ tutorial question
    2
    0 Votes
    2 Posts
    0 Views
    L
    HTTP request C++ - Google Search[^]
  • Text based mining game using if and while

    c++ game-dev help discussion career
    5
    0 Votes
    5 Posts
    0 Views
    D
    Chleba225 wrote: else if(startWay != 1 || 2){ cout << "\nError, try again.\n\n"; } } //while loop }else if(marketWay != 1 || 2){ I'm sure your intent was something closer to: else if (startWay != 1 && startWay != 2) ... else if (marketWay != 1 && marketWay != 2) ... Otherwise the OR part of the condition would evaluate to true and display the message. Going one step further, since each of these if/else if pairs are only interested in the values 1 or 2, there's no need to check against those values at the end to determine if the message needs displaying. Just use an else by itself. "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
  • To bool or not to bool in C/C++ ?

    c++ help question learning
    24
    0 Votes
    24 Posts
    0 Views
    V
    ... with only one exception: if someone agrees with him! :^)
  • Cannot open file 'hid.lib' in microsip

    help visual-studio
    2
    0 Votes
    2 Posts
    1 Views
    CPalliniC
    Have a look at this competitors page voip - Microsip softphone build problem (cannot open file 'hid.lib') - Stack Overflow[^].
  • VfW Saving Compression Options

    tutorial question
    9
    0 Votes
    9 Posts
    0 Views
    M
    plz read the whole thread! i want to store the settings, that i made in the dialog! i haven't found a way to ACCESS the data/settings programmatically - that was my question. i know thousands of ways to store/serialize/dump the data. thank you.