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
  • Who has experience in php?

    php question
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • 0 Votes
    7 Posts
    0 Views
    V
    ForNow wrote: dc.Attach(pdi->hDC); CString str(lpszText,8); // Get the first 8 charcaters and later write it out // Draw the text. dc.DrawText( str, (int)_tcslen(str), BTW, if you are using CString then you have to use CString::GetLength(), not the C-runtime _tcslen(str).
  • String In C++

    help c++ algorithms regex learning
    7
    0 Votes
    7 Posts
    0 Views
    H
    Bro it's still the same. It's only searching for the last word of the file. Plz tell me what to do. I don't know what's happening
  • SMS Access

    5
    0 Votes
    5 Posts
    0 Views
    L
    Bram van Kampen wrote: the Mobile Phone service runs over the same physical network As far as I know the mobile phone service runs over a totally different physical and logical network using radio transmission. Details of the actual protocol used can be found by sms protocol - Google Search[^].
  • 0 Votes
    5 Posts
    0 Views
    Z
    Misread the date but I meant you should (as in its practical to) quote what you're looking at in a link in case the link goes away (as it surely will) people still get context after Microsoft or who ever removes there site down the line.
  • How to resolve such exception?

    tutorial question
    4
    0 Votes
    4 Posts
    1 Views
    V
    There are some [Magic number (programming) - Wikipedia](https://en.wikipedia.org/wiki/Magic\_number\_(programming)) that one could find out while debugging (just look for "Microsoft" there)
  • Using a selection

    c++
    3
    0 Votes
    3 Posts
    0 Views
    _
    Yes, it goes. Here is the code, in case that everyone need it: CHARFORMAT2 cf; cf.cbSize = sizeof(cf); cf.dwMask = CFM\_BACKCOLOR | CFE\_AUTOCOLOR; cf.dwEffects = CFE\_PROTECTED; cf.crTextColor = RGB(64, 255, 33); cf.crBackColor = RGB(240, 64, 64); GetRichEditCtrl().SetSel(18, 28); GetRichEditCtrl().SetSelectionCharFormat(cf); GetRichEditCtrl().SetSel(-1, -1);
  • Testing a CGI

    testing beta-testing question
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • gcc configure for hardware

    question linux hardware workspace
    17
    0 Votes
    17 Posts
    0 Views
    V
    OK, I was wrong Here is what is in output - both compiler and linker --build=x86_64-linux-gnu --host=x86_64-linux-gnu –target=arm-linux-gnueabihf This is what I am reading ( into it) - in English "build" C++ code ( on OS (?) x86_64-linux-gnu ) "host" is OS(?) x86_64-linux-gnu and "host" does what ? and the code will run on "target " arm-linux-gnueabihf So where is the "target" (armv6l) (?) specification - hardware , OS , etc . ? Am I finally asking right questions? Do I need better terminology ? Would it help to post the entire output?
  • string array ?

    c++ data-structures tutorial question
    4
    0 Votes
    4 Posts
    0 Views
    L
    It's C++/CLI the ^ denotes a handle to a reference. C++/CLI - Wikipedia[^] The key point to understanding it Quote: Operator overloading works analogously to standard C++. Every * becomes a ^, every & becomes an %, but the rest of the syntax is unchanged You need to reverse that to turn it into C++ code you would recognize. I suggest you also want int32_t not uint32_t as just from it's name I am guessing it is a signed direction In vino veritas
  • about deep learn

    4
    0 Votes
    4 Posts
    0 Views
    CPalliniC
    Luckily, I don't need to learn that. :)
  • Display tooltip for each listbox item on combobox using ctooltipctrl

    help
    8
    0 Votes
    8 Posts
    1 Views
    U
    Thanks victor for the providing the much needed answer :) is there any other possibility to overcome this issue by using any other methods like setting the parent window as combo-box for dropdown list using setparent() mfc method.
  • 0 Votes
    14 Posts
    2 Views
    L
    Hi, Sorry about the late reply. It's the Thanks Giving holiday here. It has also been 7 years since I wrote the above comment which appears to be completely correct. arnoudmulder wrote: In a remote desktop session on same computer the return value is zero. The odd thing is, in Windows 10 it also returns 0, odd because you would expect once it was supported it will stay supported. I believe that this CDC::GetDeviceCaps behavior over "Remote Desktop" is because your code is not using the physical hardware display driver. I believe over RDP you are actually using the "RDP Encoder Mirror Driver" object located at (%WinDir%\system32\drivers\rdpencdd.sys) which does not have hardware acceleration. In other words... the return value from CDC::GetDeviceCaps is correct. Best Wishes, -David Delaune
  • problems with pointer to struct

    question performance help tutorial
    6
    0 Votes
    6 Posts
    2 Views
    J
    Why bother making Engine_t and ABS_t pointers? Just make them members.
  • Text Access

    2
    0 Votes
    2 Posts
    0 Views
    L
    See https://www.codeproject.com/search.aspx?q=send+sms&x=0&y=0&sbo=kw[^]. The main issue is finding a provider that will accept your message and send it on to the telephone subscriber.
  • 0 Votes
    4 Posts
    0 Views
    B
    Is your Dialog Modal? Bram van Kampen
  • Linked List Problem - K reverse linked list

    help com data-structures tutorial question
    7
    0 Votes
    7 Posts
    1 Views
    CPalliniC
    Yes, you are right. I was focused on the space complexity related to the list length. I see my assumption the 'the algo is O(1)' only holds if K is a constant.
  • 0 Votes
    16 Posts
    4 Views
    S
    While, like Richard, I haven't read any (recent) books on C++, The C++ programming Language[^] is still pretty much a must-have. Bjarne Stroustrup keeps updating it to make sure it covers all the new features of the constantly evolving C++ standard (currently C++17, working on C++20). And it provides lots of useful examples that help understand all the great features of this language. Other than that, I suggest searching the web for articles from specific Book authors such as Herb Sutter (check out his Guru of the Week series[^] !) , Alexei Alexandrescu, or Scott Hanselman. 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)
  • facing issue in “Ajantha” font on windows10 in GDIplus

    graphics help
    3
    0 Votes
    3 Posts
    0 Views
    L
    Adding to what has already been said ... read carefully CreateFontA function | Microsoft Docs[^] Read this bit carefully Quote: To ensure consistent results when creating a font, do not specify OEM_CHARSET or DEFAULT_CHARSET. If you specify a typeface name in the lpszFace parameter, make sure that the fdwCharSet value matches the character set of the typeface specified in lpszFace. Specifically you may want to look at the GDIPLUS font class CFont Class | Microsoft Docs[^] Quote: The font mapper does not use the DEFAULT_CHARSET value. An application can use this value to allow the name and size of a font to fully describe the logical font. If a font with the specified name does not exist, a font from any character set can be substituted for the specified font. To avoid unexpected results, applications should use the DEFAULT_CHARSET value sparingly. Look at the sample code on the page and what setting they use, so what you really want to do for entirely predictable results is specify ANSI_CHARSET and use UNICODE strings, anything else is hit and miss :-) In vino veritas
  • Elevate Process from user to Admins Rights without UAC Elevation

    question
    2
    0 Votes
    2 Posts
    1 Views
    L
    c elevate process - Google Search[^]