Skip to content
Code Project
CODE PROJECT For Those Who Code

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
  • reading stdout

    debugging c++ com help question
    7
    0 Votes
    7 Posts
    1 Views
    L
    Hey Chris, Creating a Child Process with Redirected Input and Output[^] If you don't get any redirected output from the sample above... then your third-party console app might be writing to the STD_ERROR_HANDLE rather than the STD_OUTPUT_HANDLE. GetStdHandle function[^]. Best Wishes, -David Delaune
  • An algorithm question

    hardware algorithms tutorial question
    7
    0 Votes
    7 Posts
    0 Views
    S
    econy wrote: I wonder what data structure is good for the above logic and application. The problem in this question is that you didn't actually tell us a lot about the logic and application. You only told us about the scope of input values, and that these values are gathered in batches and processed (filtering out duplicates) before sending out. You didn't tell us if anything of this is time-critical, or you're working with restricted amounts of memory - should we try to optimize for either? Also, is it more important for the receiver to receive the data in a timely manner, requiring on-the-fly processing so you can send out the batch right after the end of the cycle - or can you afford to delay the processing until after receiving the last input of the cycle, before sending it out? The answer to these questions will influence what algorithm to use, and the algorithm will influence what data structures to use. 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) Point in case: http://www.infoq.com/news/2014/02/apple_gotofail_lessons[^]
  • Add MFC support to ATL COM DLL project

    c++ question com
    6
    0 Votes
    6 Posts
    0 Views
    L
    I have no way of checking whether that article is correct or not, I suggest you try some feedback to Microsoft.
  • 0 Votes
    2 Posts
    0 Views
    L
    cedricvictor wrote: How do I know my device send no data in WindowProc, if I did not touch? You cannot test for something not happening, only for things that do happen. You could use a flag in your WindowProc, which starts as false and gets set to true if you receive a touch input. At the end of the routine if the flag is still false then set your value to zero.
  • DATABASE PROBLEM

    database help
    4
    0 Votes
    4 Posts
    0 Views
    D
    Using the debugger, what is the value of query? "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
  • Bitwise operation for mod operation

    tutorial question
    3
    0 Votes
    3 Posts
    0 Views
    CPalliniC
    Have a look at this page "Modulus without Division, a tutorial"[^]. Veni, vidi, vici.
  • How to use global hook with WH_GETMESSAGE

    json help tutorial question
    4
    0 Votes
    4 Posts
    0 Views
    L
    Sorry, my original message was incorrect (the MSDN description lacks clarity). This should capture all messages, not just those directed to your application.
  • Receive UDP packet from multiple default gateway

    c++ sysadmin
    7
    0 Votes
    7 Posts
    1 Views
    S
    Thanks for your valuable suggestion. I am trying all this, I will update you once I will collect the result.
  • 0 Votes
    2 Posts
    0 Views
    J
    With Windows 7 SP1 or installed KB983246, the ADO DLL has been changed. See http://support.microsoft.com/kb/2517589/en-us[^]. Solution 1 (install updated libraries) See http://blogs.msdn.com/b/psssql/archive/2011/10/03/yes-we-made-a-mistake-and-are-finally-going-to-fix-it.aspx[^] and http://support.microsoft.com/kb/2640696[^] to download new libraries. Solution 2 (excluding and renaming changed UUIDs) See Your ADO is broken[^]. Use this only when your developing machine uses Windows 7 SP1.
  • 0 Votes
    1 Posts
    0 Views
    No one has replied
  • 0 Votes
    12 Posts
    3 Views
    F
    no, i hate QT
  • Device Build

    c++ game-dev help
    3
    0 Votes
    3 Posts
    0 Views
    enhzflepE
    Personally, I'd go with the Arduino platform. You can buy an Arduino Pro Mini (clone) for about $4 on flea-bay, which you could either couple with a 16x2 character display complete with buttons, or with a 128x160 16-bit graphics display and some extra buttons. In either case, you should be able to build the device for under $15. Arduino gives you the advantage of writing in C/C++. The Nokia 101 looks like programming would be something more of a task. Links: Arduino Pro Mini - $4.49 delivered to Aus[^] 1602 character display (no buttons) - $2.55 delivered to aus[^] 1602 5 button arduino shield - $5.89 delivered to aus[^] 128x160px tft display (no buttons) - $5.32 delivered to aus[^] You'd also need a USB->serial converter, which can be bought for a few dollars or so, depending on whether you'd like it to have the ability to
  • Free fails with access violation

    performance
    5
    0 Votes
    5 Posts
    0 Views
    L
    There was no need to repost. It could be spamming. I suggest you read the existing responses carefully before going any further. They may be from members who know something. Peter Wasser "The whole problem with the world is that fools and fanatics are always so certain of themselves, and wiser people so full of doubts." - Bertrand Russell
  • CDatabase::ExecuteSQL

    help database
    8
    0 Votes
    8 Posts
    0 Views
    F
    Please, I have order problem. when I do this: CRecordset recordset(&database); CString temp, query; query.Format(L"SELECT number FROM personne WHERE numPiece = '%s'", numPiecPer); recordset.Open(CRecordset::snapshot, query, CRecordset::appendOnly); while (!recordset.IsEOF()) { recordset.GetFieldValue((short)0, temp); messageBox(temp, 0, 0); recordset.MoveNext(); } It don't work. :(
  • 0 Votes
    3 Posts
    0 Views
    V
    Thanks for reply. I did not specify which issue I need help with. Sorry. As I said, I'll figure out the update "problem". I feel the property sheet dialog should do the update just fine. But I am just curious why the difference between GraphEdit using "off the shelf" filters both Ezrgb24 and Color Conversion Filter. I did some search and found some discussions to the effect that GraphEdit does some extra work when displaying property sheet. I think I found my problem, but it will take some undooing to fix it. For safety reasons I did make copies of both filters and compiled them. For so far unknown reason the options tab page in property sheet is gone, only the pins pages are there. I assume this page code is external to the filter code. That is why it works when filters are added manually in GraphEdit - it uses the original source.
  • How do you define flags?

    question
    3
    0 Votes
    3 Posts
    0 Views
    A
    I mostly use hex flags, I think that's the most common method. It's probably because it's a lot clearer which bits are actually set (for that same reason, I don't think I've ever seen decimal used for flags since the conversion isn't as neat). Empty flags have a definition if they have a meaning (i.e. not necessary but could be labeled for clarity).
  • Win CE program, SetFong() not work

    c++ help question
    4
    0 Votes
    4 Posts
    0 Views
    E
    Thanks, CreateFontIndrect work for WinCE also. Now it solved. seems when the IDE pop up a message window, ask me if I hope to change the character set, I clicked no.
  • Free fails with Access violation reading location

    help performance question
    10
    0 Votes
    10 Posts
    0 Views
    T
    iFileCountInFolder is always fixed, since the files in a folder are fixed , means no files are added at run time. I did not understand why the Free statement is failing.
  • if/else, expression can not be used as a function. C program

    help question
    7
    0 Votes
    7 Posts
    0 Views
    T
    I donot know your C program. Please talk me you realize the function. I come from China.My English is not good.I hope you can understand my replay.
  • How to update DirectShow filter properties?

    announcement c++ com data-structures help
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied