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
  • Add blocker application

    c++ help tutorial
    8
    0 Votes
    8 Posts
    0 Views
    J
    Richard Deeming wrote: Someone do it for me. I I don't consider "Please anyone help me and guide me" to be the same as "do it for me". Not even really close. And I basically ignore "urgent" requests so intent there means little.
  • modbus tcp clent server with multiple slave id

    wpf wcf sysadmin question
    10
    0 Votes
    10 Posts
    1 Views
    S
    Hi Member 10296418, to avoid the exception you need to close the Socket Connection and reopen the same. you can create multiple virtual ports and try creating multiple threads for the socket connection. And also give 5MS delay after closing the connection. Hope this helps . Regards, Shyam Kodase Feb 13 2014 ;)
  • 0 Votes
    3 Posts
    0 Views
    A
    Hi, Thanks for your reply. Hmm.. I have just shared the folder( permission to everyone i think). The problem is still exists when UAC is enabled( my UAC settings is default) and I run application as admin. Its works fine when UAC is disabled( i.e Never notify). Thanks Arun
  • 0 Votes
    6 Posts
    0 Views
    A
    Or.... just completely separate your GUI from your working code. :)
  • 0 Votes
    2 Posts
    0 Views
    A
    I found a simple workaround using FindWindow() and SetForegroundWindow to force the Excel window to the foreground. Note, the application parameter of FindWindow() needs to be "XLMAIN". HWND xlsHWnd = FindWindow(_T("XLMAIN"), NULL); SetForegroundWindow(xlsHWnd);
  • Using C# DLL in C++ App - nearly there...

    csharp c++ dotnet help
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • Run an app that loaded to ram

    tutorial
    4
    0 Votes
    4 Posts
    0 Views
    CPalliniC
    Fasten your seat belt and read this article: "Loading a DLL from memory"[^]. Veni, vidi, vici.
  • A problem regarding EOT

    help question sysadmin
    9
    0 Votes
    9 Posts
    0 Views
    C
    Thank u very much my dear friend really appreciate your help.
  • 0 Votes
    2 Posts
    3 Views
    Richard Andrew x64R
    You could create a custom resource inside the exe, and then read it at runtime. Check out: Creating a Resource[^] The difficult we do right away... ...the impossible takes slightly longer.
  • OpenCV in MFC App

    c++ csharp visual-studio question
    23
    0 Votes
    23 Posts
    3 Views
    S
    Don Guy wrote: Now the next part am working on is adding an XML file to the project and compiling it into the project. I assume you are putting it in the resource. XResFile - Files Stored in Resources: Part 1 - Text and Binary[^] Soren Madsen "When you don't know what you're doing it's best to do it quickly" - Jase #DuckDynasty
  • Ethernet code for talking to Hardware I/O

    c++ hardware
    6
    0 Votes
    6 Posts
    0 Views
    A
    I've actually done this a few times in my life, it's not any more difficult than having an API for two pieces of software to communicate across. Usually on the hardware side, they'll implement a regular ethernet stack so they follow all the same rules and guidelines that you do on the PC software side. As a matter of fact, most people usually buy an Ethernet "core" that gives them the functionality without implementing it themselves, same as you using the Winsock library. The only trick is really understanding the bytes received and what they mean (just an exercise in arranging structures and casting bytes).
  • Proper array memory management in C++

    c++ data-structures performance help tutorial
    5
    0 Votes
    5 Posts
    0 Views
    J
    Maximilien wrote: Proper c++ memory management would tell you to use standard c++ classes and collections... None those suggestions however would fix the problem of increasing memory usage. Where the first response does.
  • Lining up the Decimal Points

    question c++
    8
    0 Votes
    8 Posts
    1 Views
    B
    David, Adding the line: cout << setiosflags(ios::fixed); before the for loop did the trick. The program now works as expected. I am happy. I thank you and all the other people who responded to my post for their help in this matter. Bob
  • 0 Votes
    5 Posts
    0 Views
    D
    Please clarify... when you say "I just tried the above code and it works fine.", do you mean you put the code fragment that I printed, in another program and ran it? I was hoping you downloaded and built my sample code... I guess that would be a problem if you don't use MinGW. I agree that it is something in my code, but I'm damned if I can figure out what !! I'm comparing the stripped-down failing code against another working Win32 utility that I have (where the button code works fine), and for the life of me I cannot figure out what the difference is!! What I'm doing now, is I made a copy of the working project, and am pasting pieces of my target project into it, one piece at a time, until I hopefully find what breaks the color dialog. My great fear is that I'll never find it, and the copied project will work fine - and I'll NEVER figure out why this one is broken... :wtf: //************************ Later note: yeah, I got the application completely ported over from the original project to the new project based on a dialog where the ChooseColor() worked properly, and the entire project works fine. Of course, I can't find any difference between the two, that could explain the original problem. I guess I'll never know...
  • problem with RegSetvalue in c++

    help c++ java windows-admin question
    4
    0 Votes
    4 Posts
    1 Views
    L
    LPCTSTR data = L"0\0"; LONG setRes = RegSetValueEx (hKey, value, 0, REG_DWORD, (LPBYTE)data, 1); You are storing a Unicode string instead of an integer. The data should be a DWORD containing either 0 or 1, like: DWORD data = 0; LONG setRes = RegSetValueEx (hKey, value, 0, REG_DWORD, (LPBYTE)&data, sizeof data); Veni, vidi, abiit domum
  • Unresolved External Symbols ---- Using .Lib

    c++ question lounge
    14
    0 Votes
    14 Posts
    0 Views
    J
    Vaclav_Sal wrote: I'll check the compiler doc to get more info on the option. It is a linker option, not a compiler option. So you might have looked at the wrong place. When adding the command to the DSP file, the place should not care as long as the command is correct. But the VC 6 project settings should provide an input field for user defined linker options where you can enter the option (with more recent VC versions it is 'Additional Options' on the Linker - Command Line tab).
  • AMCap in MFC

    c++ help question
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • 0 Votes
    11 Posts
    1 Views
    V
    I have changed my directory structure and separated the common "applications" from the project. That way each project can access the common application, likes SDK for example, using direct path. Thanks for all suggestions, it helped to reinforce the KISS motto.
  • Building UI Automation in C++ for MFC applications??

    c++ design testing tools help
    3
    0 Votes
    3 Posts
    0 Views
    L
    Hi, The Microsoft API for this is Windows Automation API[^]. It is built on top of Microsoft Active Accessibility[^]. Expand the nodes on the left frame and you might find some sample code. Best Wishes, -David Delaune
  • VC++ Matrix

    c++
    2
    0 Votes
    2 Posts
    0 Views
    L
    Well it depends on your definition of a matrix of strings. Do you mean a 2-dimensional array of string ponters or something more complex? Veni, vidi, abiit domum