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
  • How do I add Thread in Dll

    question workspace
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • Class or object?

    question
    11
    0 Votes
    11 Posts
    0 Views
    K
    I don't use Hungarian these days but oClass seems to have been the more common style (especially in VB). In C++ it was also common not to use Hungarian with objects but just with simple types, integers, floats, etc. In the .NET world Hungarian is discouraged but there is still a widely-used concession to Hungarian with the names of UI controls. btnCustomer, etc., although really we should prefer customerButton. Kevin
  • Waiting for open files

    help
    11
    0 Votes
    11 Posts
    1 Views
    Y
    Waiting for open files Each error code page [url=http://cali88.net/xoc-dia/\]xoc dia[/url], [url=http://cali88.net/song-bai-truc-tuyen/\]song bai[/url] that does not fix the core dia Consortium is
  • Home I/P Address

    c++ json question
    4
    0 Votes
    4 Posts
    0 Views
    F
    LONG ret_code; PVOID ipaddr = new char[100]; DWORD ipaddr_size = 100; ret_code = RegGetValue(HKEY_LOCAL_MACHINE, _T ("SYSTEM\\CurrentControlSet\\Services\\Tcpip\\Parameters\\Interfaces\\{CFCAB3F3-0143-4AE0-A915-873AD57C942A}"), _T("IPAddress"), RRF_RT_ANY, NULL, ipaddr, &ipaddr_size);
  • linux c++ use V8 crash

    c++ linux performance help
    3
    0 Votes
    3 Posts
    0 Views
    J
    I don't know V8. But it seems that you want to allocate about 1 GB (1000 * 1024 * 1024) GB of physical memory and this amount is not available. This may be due to an internal V8 limit (a quick research found the --max-old-space-size command line flag) or your system has not enough remaining free physical memory.
  • Problem displaying CStatic text item

    help learning
    23
    0 Votes
    23 Posts
    0 Views
    F
    jeron1 just wanted to thank you I couldn't get anything going with DDX_Control/CStatic but the DDX_Text/CString worked out great Thanks
  • 0 Votes
    4 Posts
    1 Views
    K
    Thanks for that suggestion Pallini, I guess I was not clear enough in my questions about how time critical this operation is. In my current application, I do similarly for not so time critical operation. I am looking for something that can do it automatically for me in Direct2D like in OpenCV using LUT & merge commands rather than going pixel by pixel. PKNT
  • Timing in C language <time.h>

    sysadmin question
    2
    0 Votes
    2 Posts
    0 Views
    CPalliniC
    Quote: but I wish to reset the clock() in a certain area of the code so i could start the count since that point and not since the start of the runtime You usually don't do that. Instead, you keep track of your 'zero-time' and subtract it to the current one in order to find out the elapsed interval (You may use difftime[^] for the purpose).
  • Control CStatic, Height of FONT

    c++ tutorial
    4
    0 Votes
    4 Posts
    1 Views
    F
    two things could I use to this code anywhere Or does it have to be in let's say ::OnInitDialig ::OnCtlColor Also I read that using SetFont I would have to process the WM_SETFONT Message Thanks
  • recv no blocking

    sysadmin data-structures help question
    13
    0 Votes
    13 Posts
    0 Views
    A
    :doh: perhaps.... you would really only run into this issue in certain cases (where it would actually be a problem), where the data source isn't throttled and infinite (i.e. mostly test cases)
  • According to the website this brain booster contains

    com
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • Can a modeless Dialog Box be a main window "m_pMainWnd"

    3
    0 Votes
    3 Posts
    0 Views
    F
    Thanks
  • 0 Votes
    2 Posts
    0 Views
    L
    Most likely person to help you is the one who wrote the article and the code. Please post your question in the forum at the end of the article.
  • 0 Votes
    1 Posts
    0 Views
    No one has replied
  • Draw in front of bitmap

    question c++ graphics tutorial
    3
    0 Votes
    3 Posts
    0 Views
    L
    Dear Richard, many thanks for your help. I followed your suggestion and it works. In my previous code I put the IDB_BITMAP of the bitmap into the IMAGE property of the Picture Control in order to load the bitmap automatically. I hadn't used a control variable to load the bitmap. Now I have add a control variable and I load the bitmap before drawing the rectangle. In this way the bitmap is under my rectangles.
  • 0 Votes
    3 Posts
    0 Views
    J
    Tried that, but the result doesn't do anything. The VC++ Native Unit Tests have a test runner and that's the secret sauce, so to speak. (It enumerates all the exports from the test dll and runs them. I could figure this out, but was hoping someone else already has.)
  • Use #define or enum in switch() case(s) ?

    question tutorial
    10
    0 Votes
    10 Posts
    0 Views
    A
    If you're using my method, yes... otherwise the compiler will tell you that function is undefined.
  • Suggestions on real-time video display with drawing

    c++ graphics asp-net help question
    4
    0 Votes
    4 Posts
    2 Views
    D
    You need to double buffer the output. Create a bitmap in memory; copy from your frame to that bitmap, then draw your extra graphics on that bitmap. Then when it's done draw it to the screen in one blit. That's how you get rid of the flicker. Gdi+ will do it fine.
  • 0 Votes
    11 Posts
    0 Views
    M
    Albert Holguin wrote: Member 11703498 wrote: I can't afford to drop any frames from the Kinect I don't know how you can say this and also say that you're producing data faster than you can process it. You HAVE to decimate if you're not keeping up. You'll be dropping data even if you don't want to once your queue is full. Best to deal with that some way or another so the results are predictable. Not necessarily. Dropping frames is not a good idea when they are used by the Kinect Fusion algoritm. This algorithm simply fails if the consecutive frames supply data that differs too much from frame to frame. This typically happens when frames are dropped or the Color stream causes Kinect's frame rate to drop to approx 30fps/2 (it's just a feature, or downside one should say, of this particular sensor). The queue won't fill up. The system is required to have enough RAM available to the program. Also, the task should complete with a certain amount of frames stored in the queue. The nature of the application is to do a one off job, not a continuous one heavy lifting. If the task fails for whatever reason, say the amount of acquired frames was insufficient, or something along those lines, then the task can be repeated. I am not that proficient at parallelizing stuff on GPUs :). Fom what I've seen, the Fusion algorithm utilizes the GPUs resources to the max. A good GPU would actually make the Queue and high RAM requirement redundant. For the time being though, the best approach I can see is to stick to the use of the Queue and large RAM.
  • Very simple binary file compressor in C

    help
    2
    0 Votes
    2 Posts
    0 Views
    CPalliniC
    The compressor has a problem with a possibly pending 0-sequence at the end of the file, because your program outputs the 0-sequences only on changes, that is when meets a non-zero character. You have to check for a pending 0-sequence immediately after execution of the for loop: if(stanje != 0) { fputc(0x00, izlaz); fwrite(&brojac, sizeof(int),1,izlaz); }