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
  • Tell me about the c programming languages

    3
    0 Votes
    3 Posts
    0 Views
    J
    C Programming - Wikibooks, open books for an open world[^]
  • MFC Icon indicator (red/green)

    c++ question
    3
    0 Votes
    3 Posts
    0 Views
    _
    You can easily find here: Free Icons & Vector Files[^]
  • 0 Votes
    2 Posts
    0 Views
    L
    The old modem protocols XModem, YModem and Zmodem are designed for what you are doing they send packets with CRC checks and packets are accept or reject which causes the packet to be resent. You can net search for the code. A simple XModem send routine looks like this which should give you an understanding of what it does Send data of a fixed packet size, send the CRC for the packet .. wait for ACK or NAK. Resend packet on NAK. simple xmodem/ymodem implementation in C · GitHub[^] A full Zmodem with both send and receive implementation is more complex but once you understand the simple xmodem it should make sense. The greater complexity is because the transfer packet size auto adjusts, as you get more packet rejects it sends smaller and smaller packets. If you are getting transmission errors you don't want to waste time sending large packets over and over, expect an error and send small packets. The smaller packets means there is a lot of packet acknowledges going on but that is faster than resending large packets. pkg-sbbs/zmodem.c at master · ftnapps/pkg-sbbs · GitHub[^] ZMODEM - Wikipedia[^] Ethernet protocols extend beyond that in that they allow and expect the packets to arrive out of order. The X/Y/Z modem protocols are strictly packets in order processes which is what you said was okay. In vino veritas
  • Condition variable question

    question help
    10
    0 Votes
    10 Posts
    0 Views
    L
    That's a whole new question.
  • 0 Votes
    1 Posts
    0 Views
    No one has replied
  • how to query a previous query

    database help tutorial question
    2
    0 Votes
    2 Posts
    0 Views
    V
    unfortunately your code nothing to do with C/C++/MFC... Maybe you will try to ask to some more appropriate forum?
  • 0 Votes
    8 Posts
    0 Views
    D
    So am I!! Thanks again for your help
  • CEditCtrl in FrameWnd

    question
    4
    0 Votes
    4 Posts
    0 Views
    V
    You could use CEdit::Create method. However, as already mentioned, there is rarely or maybe not at all a good idea to create control in the frame window.
  • Run CFile::Open as admin

    question
    3
    0 Votes
    3 Posts
    0 Views
    _
    Ok, understood. Thank you.
  • execl in c++ example

    c++ tutorial
    2
    0 Votes
    2 Posts
    1 Views
    J
    Using your subject with a search engine should give you multiple results. But read the function documentation first to understand the examples. _execl, _wexecl | Microsoft Docs[^] _exec, _wexec Functions | Microsoft Docs[^] (with example code) exec(3) - Linux manual page[^] exec family of functions in C - GeeksforGeeks[^] (with example code)
  • The new upgrade system

    c++ question csharp delphi visual-studio
    15
    0 Votes
    15 Posts
    0 Views
    L
    No thanks. You should report it to Microsoft though.
  • help me~ for use..... #define macro ## #@ #

    help
    2
    0 Votes
    2 Posts
    0 Views
    D
    Please don't cross-post. See [my answer](https://www.codeproject.com/Messages/5541483/Re-help-me-for-use-sharpdefine-macro-sharpsharp-sh.aspx) in Algorithms. Freedom is the freedom to say that two plus two make four. If that is granted, all else follows. -- 6079 Smith W.
  • Trouble with the current automatic upgrade

    c++ question
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • unique_ptr and make_unique -- [SOLVED]

    question linq functional help
    3
    0 Votes
    3 Posts
    0 Views
    Richard Andrew x64R
    Thanks for the vote of confidence, Richard! :-D I can't say that I completely understand it. Getting it to work was partly just trying different things until I hit upon the magic combination! I do understand some parts of it better now, but hardly well enough to write an article. :) The difficult we do right away... ...the impossible takes slightly longer.
  • Return nothing from a function having return type

    c++ data-structures help
    6
    0 Votes
    6 Posts
    0 Views
    L
    I don't understand what you are saying. If the return type of your getPackage function is a Package object, then that is what you must return. If the function fails then you must find some other way to signal that failure, perhaps by throwing an exception. If you want the possibility of returning nullptr to indicate failure, then the function must return a pointer to a Package object, thus: Package* getPackage() { Package* pPackage; // code to create a new package ... pPackage = new Package(); // ... if (some problem with creating the object) pPackage = nullptr; return pPackage; }
  • 0 Votes
    8 Posts
    0 Views
    G
    Thank you very much I got the idea now, 100000 of thanks.
  • CreateProcess lpApplicationName param

    json
    8
    0 Votes
    8 Posts
    0 Views
    F
    This helps I’ll look into this thanks
  • c++ - std :: map - Is my idea too dirty?

    question c++ performance help
    18
    0 Votes
    18 Posts
    0 Views
    L
    :thumbsup: Wow, great that you share this knowledge. Thank you very much for this. It does not solve my Problem, but it answers my question
  • 0 Votes
    3 Posts
    1 Views
    L
    Member 9453331 wrote: I tried changing the below registry. But the problem with changing registry is that touchpad cursor speed gets updated only after system restart. I need an API to change touchpad cursor speed without restarting system (similar to how we can change mouse speed using SystemParametersInfo) HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\PrecisionTouchPad\CursorSpeed Any suggestions in this regard will be really very helpful. If you need to restart the touchpad driver then you could probably use the [Setupapi](https://docs.microsoft.com/en-us/windows/desktop/devinst/setupapi-h). I believe that you will need to first call [SetupDiSetClassInstallParams](https://docs.microsoft.com/en-us/windows/desktop/api/setupapi/nf-setupapi-setupdisetclassinstallparamsw) with the SP_CLASSINSTALL_HEADER.InstallFunction set to [DIF_PROPERTYCHANGE](https://docs.microsoft.com/en-us/windows-hardware/drivers/install/dif-propertychange) followed by a call to the [SetupDiCallClassInstaller function](https://docs.microsoft.com/en-us/windows/desktop/api/setupapi/nf-setupapi-setupdicallclassinstaller) with the DI_FUNCTION also set to [DIF_PROPERTYCHANGE](https://docs.microsoft.com/en-us/windows-hardware/drivers/install/dif-propertychange). Be aware that many touchpad drivers are written by third-party vendor (i.e. not Microsoft). I don't think all touchpad drivers support being restarted from the Setup API. It really depends on how the third-party vendor has implemented their [driver co-installer](https://msdn.microsoft.com/en-us/library/windows/hardware/ff553394(v=vs.85).aspx). The Windows operating system is 'aware' of the co-installer capabilities from when the [co-installer was registered](https://docs.microsoft.com/en-us/windows/desktop/api/Setupapi/nf-setupapi-setupdiregistercodeviceinstallers). If you want to check if your touchpad supports enable/disable then go into the device manager and right click... if you see 'Disable Device' then that means that the co-installer supports device restart. Believe it or not the touchpad device driver itself probably supports [start/stop](https://docs.microsoft.com/en-us/windows-hardware/drivers/kernel/irp-mn-start-device) so there is nothing preventing you from developing a co-installer and registering it as the handler for the third-party touchpad driver as long as the co-installer DLL is not part of a [digitally-signed catalog](https://docs.microsoft.com/en-us/windows-hardware/drive
  • Registering a IOT Device in C++

    c++ java asp-net com hosting
    2
    0 Votes
    2 Posts
    0 Views
    L
    That looks more like a set of Google API calls, than native Java.