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 to dynamically delete sub-control created in run-time

    tutorial
    4
    0 Votes
    4 Posts
    5 Views
    L
    Looks like you send a WM_ERASEBKGND message to the parent group window (pGroup) and then redraw it. But parent windows will clip the child windows[^]. This is why you still see the windows you deleted. In other words when you invalidate/redraw pGroup it skips over the rectangles where your m_pDynEdit child windows were being drawn. You can use the ExcludeClipRect function[^] to remove the clipped rectangles from the clipping region. Also, you can use the RectVisible function[^] to check for clipping. I'm on a TV, I apologize in advance for any typos.
  • 0 Votes
    5 Posts
    4 Views
    Mircea NeacsuM
    I just noticed the bad formatting. Sorry, it's from CP not me. I tried editing my post but in the edit box the text shows OK. Not sure what's going on but smells like a bug. Mircea
  • resource wanted - print control / color codes

    linux c++ agentic-ai question learning
    5
    0 Votes
    5 Posts
    2 Views
    P
    They are ANSI escape codes for colors, etc. See, for example, ANSI Escape Codes · GitHub[^] Software rusts. Simon Stephenson, ca 1994. So does this signature. me, 2012
  • Static OwnerDraw SS_OWNERDRAW DrawItem not being called

    linux debugging learning
    8
    0 Votes
    8 Posts
    8 Views
    S
    If any body want to want to draw lsomeething like thi sthen how it is posible? In website . How to draw Glasses | Easy Pencil Sketch in 5 Steps - Easy Drawing[^]
  • C++

    c++ css career
    4
    0 Votes
    4 Posts
    4 Views
    A
    Hi there! I have started this Tax software program for you: #include using namespace std; int main() { cout<< "Tax software developed by https://iq.direct" << endl; cout<< "Enter Salary:"; double s = 0, t = 0; cin >> s; cout<<"you entered: " << s << endl; if (s < 600) { t = 0; } if (s >= 600 && s < 800 ) { t = s \* 0.1; } if (s >= 800 && s < 1000 ) { t = s \* 0.13; } cout<< "The tax will be :" << t; return 0; }
  • ways to write code for a class

    c++ csharp database help question
    4
    0 Votes
    4 Posts
    2 Views
    C
    thanks Greg that`s very descriptive
  • RichEdit Streamin SF_TEXT not appearing

    18
    0 Votes
    18 Posts
    3 Views
    V
    ForNow wrote: maybe it overlaid IDC_EDIT Yes, it is what I meant in my previous post. :)
  • C Programming

    java python learning
    1
    0 Votes
    1 Posts
    1 Views
    No one has replied
  • function translated to ASM

    question career
    12
    0 Votes
    12 Posts
    3 Views
    C
    Rather interesting. worth remembering.
  • control RESOURCE definition

    learning
    12
    0 Votes
    12 Posts
    4 Views
    V
    According to this discussion: [winapi - Are Windows window classes case-sensitive? - Stack Overflow](https://stackoverflow.com/questions/7928592/are-windows-window-classes-case-sensitive) and the link to [About Atom Tables - Win32 apps | Microsoft Docs](https://docs.microsoft.com/en-us/windows/win32/dataxchg/about-atom-tables?redirectedfrom=MSDN) the window class name is case insensitive.
  • How can I enable/disable CEdit control context menu items?

    question
    4
    0 Votes
    4 Posts
    13 Views
    A
    [windows 7 - How can i modify the context menu of a CEdit control? - Stack Overflow](https://stackoverflow.com/q/6265251/2287576)
  • 0 Votes
    2 Posts
    1 Views
    L
    sign pdf C++ - Google Search[^]
  • Stack Overflow exeception

    data-structures debugging
    8
    0 Votes
    8 Posts
    1 Views
    G
    This might not work - the compiler doesn't have to maintain the order of variables on the stack, so last could end up before or after first and the other variables.
  • VS2019 - missing dialog editor?

    help tutorial question
    6
    0 Votes
    6 Posts
    2 Views
    C
    I tried a few times by opening the resource file, etc. But each time I go back to the graphical dialog editor, it displays correctly. Things that make you go hmm. Charlie Gilley “They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759 Has never been more appropriate.
  • More about "system" call - sort of repost

    question c++ design linux debugging
    5
    0 Votes
    5 Posts
    1 Views
    L
    To add to what k5054 says, you can test all features of the system command in a terminal session. All that system does is to send the string you pass it direct to the shell, as explained at system(3) - Linux manual page[^], and system, _wsystem | Microsoft Docs[^].
  • How to read "compiier output "

    linux debugging tutorial question
    4
    0 Votes
    4 Posts
    1 Views
    K
    The -Wl,... arguments to g++ are passed on the the linker. For details of the rpath and rpath-link arguments see here: [Using LD, the GNU linker - Options](https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html\_node/ld\_3.html#:~:text=s' and `-S'.-,-rpath,-dir) Member 14968771 wrote: -shared -Wl,-soname,libHCI_VERSION_622.so.1 -o libHCI_VERSION_622.so.1.0.0 main.o mainwindow_hci_v_622.o moc_mainwindow_hci_v_622.o -shared : create a shared runtime -necessary for producing a shared library (DLL in windows-speak) -Wl,-soname,libHCI... : see above document re -soname linker option The .o files are the object files to put in the shared library You are correct about the other libraries. They get picked up by rpath and rpath-link, so that when you use then libHCI_VERSION_6622 library, you do not have to add them to the link command line Keep Calm and Carry On
  • Another long shot...

    debugging help c++ tutorial lounge
    3
    0 Votes
    3 Posts
    1 Views
    L
    Thanks very much. Since my program is "under construction" it always runs in debug mode. The error I am getting does not even get me to the first line of code to set brake point. Since last major change I did was to change the entire project from QT version 5.12.12 to 6.2.2. - that is the prime suspect. Since then I found out that I can "configure" individual project to specific version.... In theory - first project I tried it did not work... I appreciate your post, but since my backup works I will try to find out why the "disable versions prior to xyz " does not work first. I need only one of the subprojects to be of latest QT version. Cheers
  • 0 Votes
    3 Posts
    6 Views
    L
    I did try "splitting " program and argument - it did not pass compiler. Then I put all as a single parameter and it did not run at all. OProcess.start("/bin/sh", QStringList() << "-c" << "hcitool -i hci0 scan --flush | tee >> /tmp/temp"); no tee ourput to console - not that important qDebug() << OProcess.state(); returns "process starting" expected qDebug() << OProcess.state(); returns "process starting" sort of expected OProcess.waitForFinished(); //OProcess.state(); qDebug() << OProcess.state(); return process not running expected OProcess.execute("hcitool-i hci0 scan --flush >>/tmp/temp"); qDebug() << OProcess.state(); return process not running not surprised OProcess.waitForFinished(); OProcess.state(); qDebug() << OProcess.state(); return process not running obvious I am under the impression that "hci" was first - then "bluez" - based on "hci" The QT implementation of bluez is missing the "--flush" option in "scan". That keeps QT from actually scanning for devices and that is of no good....
  • 0 Votes
    1 Posts
    0 Views
    No one has replied
  • DDX_Text embedding nulls on UpdateData(TRUE)

    8
    0 Votes
    8 Posts
    0 Views
    L
    ForNow wrote: don’t know how I unicode got set It would appear that it is the default for new projects, at least in VS 2019.