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
  • Now none of my .h header file changes seem to take

    help
    18
    0 Votes
    18 Posts
    1 Views
    F
    Thanks Richard I got rid of it have to fix up a few other things thank you
  • header file not being read (resource.h)

    c++ tutorial learning
    6
    0 Votes
    6 Posts
    1 Views
    F
    I am on VS 2019 16.11.8 My windows program is a client to a z/os mainframe machine. I am down to the final component and I wrote a stand alone VS 2019 project because testing the code I building would require an ipl on the z/os machine most everytime What I am trying to say I am going to carry over these changes to my windows MFC client when I am done including copying over the .rc entries and resource.h file for some reason the that Project solution I dont run into this problem
  • 0 Votes
    2 Posts
    2 Views
    Richard DeemingR
    Member 14968771 wrote: PS I did post same request on QT forum Given the complete lack of detail in your "question", you'd have better luck posting it on a "psychic hotline" forum instead. :doh: Even people who are "familiar with QT Bluetooth CODING" can't guess what your secret code is doing, nor what the secret problem is. If you want someone to help you, you need to start by asking a proper question, with enough details to explain the problem and to show the relevant parts of your code. "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
  • 0 Votes
    6 Posts
    2 Views
    K
    Its only used as a loop counter. If you prefer we could do while(num--) { s = val_arg(args, QString); // ... } That, of course alters the value of num, so if you need to know how many args were passed in, or need to traverse the argument list again, you don't want to do that. Keep Calm and Carry On
  • 0 Votes
    4 Posts
    1 Views
    S
    If you're looking for work at Google or another international (and especially US-based) company, you should work on your grasp of the english language first. 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)
  • question about CDC:Pie

    question
    7
    0 Votes
    7 Posts
    5 Views
    F
    My client etc is a square so either the width or height divided by 2 Ok thanks
  • EVC++ - dummy target?

    c++ data-structures tutorial question workspace
    1
    0 Votes
    1 Posts
    1 Views
    No one has replied
  • Saving a memory DC to a file

    graphics performance question
    6
    0 Votes
    6 Posts
    2 Views
    V
    ForNow wrote: Mircea provided an example that will work for me Yes. However in this example the bitmap is saved into the file, and not the memory or some other DC (device context)!
  • Hi! Im new at coding and i wanted to ask some help.

    sharepoint help
    4
    0 Votes
    4 Posts
    2 Views
    D
    panda08 wrote: The incomplete code bellow.... If you completed, would it then work? panda08 wrote: The incomplete code bellow doesnt seem to be working... Was it intentional that you failed to explain what it is (not) supposed to do? panda08 wrote: ...as intended. What is its intent? The onus is on you to pare down your code to just that which is problematic; not ours to wade through a bunch of code to try and figure out what it is supposed to do and why it is not doing such. "One man's wage rise is another man's price increase." - Harold Wilson "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons "You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
  • 0 Votes
    10 Posts
    4 Views
    C
    Make sure you are using the correct DC. Windows loves to clip stuff when drawing. 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.
  • ActiveX control development - old farts need apply

    com help
    4
    0 Votes
    4 Posts
    7 Views
    C
    happily, after dancing with this for many years, I have resolved my bug. As in most cases, it was a series of cascading failures, but ultimately, it came down to an arcane threading issue in COM. Of course, the error message was "failed to load control, is it properly registered?" which had nothing to do with the real problem. Happy to have this monkey off my back. 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.
  • Link error referencing Windows Desk Top Manager

    help visual-studio json lounge
    4
    0 Votes
    4 Posts
    0 Views
    L
    Oh yes, yet another one of Microsoft's 'Easter Eggs' left for us to trip over.
  • Drawing a Caption using CDC Class

    graphics
    3
    0 Votes
    3 Posts
    3 Views
    F
    thanks I choose the later NC_CLIENT might I ask you a few follow up questions 1) is there a way to determine the NC area,like GetWindowNCRect. In Additon TextOut is giving me issues would I be better off using DrawText would it need to be preceded by DrawCaption Not sure as if you could steer me the right direction would appreciate it
  • WriteFile return access denied?

    help question
    8
    0 Votes
    8 Posts
    0 Views
    J
    Two things First you are a person which has specific access to the file system. Your application is not you. The access it has depends on how it runs. You as a person are likely checking the access but that does not mean the application has it. Second the directories also determine access. You can programmatically request information about permissions. Write some code that returns that information from EACH level of the directory tree including the drive letter. Then inspect that.
  • 0 Votes
    4 Posts
    3 Views
    C
    Thanks for that tip. Exactly what I was looking for. 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.
  • Best IDE for golang

    visual-studio help tutorial question
    2
    0 Votes
    2 Posts
    2 Views
    L
    Features - GoLand[^]
  • Debugging

    visual-studio debugging announcement
    6
    0 Votes
    6 Posts
    3 Views
    K
    The really low level implementation may vary a lot. A couple variants I have worked with: To halt execution temporarily, e.g. an explicitly declared breakpoint, or implicit by e.g. a 'continue to next line', the debugger looks up the address of the first instruction generated for that source line in the debug information. It copies and saves the first instruction, and inserts a special breakpoint instruction. Most modern CPUs provide a specific instruction, generating an internal interrupt, causing exeution of an interrupt handler provided by the debugger. Also, most modern CPUs have a mechanism for executing a single instruction and then cause a similar internal interrupt. And, the handlers are run at a low priority so that a higher priority interrupt, e.g. the clock, may preempt the debugger interrupt handler to let other processes have their CPU share. The debugger user dialog (e.g. to continue exectution, remove the breakpoint, display the current value of some variable etc.) takes place within this interrupt handler. When target execution is resumed, the debugger backs up the program counter to the start of the breakpoint instruction it has inserted, puts the saved "real" instruction into the code, sets the 'single instruction' flag to the CPU, and returns from the debug interrupt. The single instruction interrupt reinserts the breakpoint instruction, ready for the next time execution passes through this point in code. It resets the single instruction flag and returns from interrupt, and target execution continues until the next breakpoint. For 'run to next line', the debugger may find the first instruction of every relevant line in the code (usually limited to the current function and the continuation point upon return, but exception handlers may complicate this) and save all the instructions being overwritten. When any of the breakpoints are hit, the same restore-original / single step / reinsert breakpoint procedure is followed. The breakpoints remain until that scope is left, i.e. when the function is exited. The handler for that interrupt will restore all the original code, and then set breakpoints on all line starts in the new scope. Also if another function is called and another scope is entered, the debugger must set breakpoints in that scope. In the old days when memory was scarce, setting a huge number of line start breakpoints and saving information for each of them would break all memory limits. So when halted at one line, as the single current breakpoint, the debugger would
  • AddVectoredExceptionHandler in Release

    debugging help announcement
    6
    0 Votes
    6 Posts
    4 Views
    L
    Sorry, I have no experience of that error. Maybe this will help: Abnormal DBG_PRINTEXCEPTION_C (0x40010006) and DBG_PRINTEXCEPTION_WIDE_C (0x4001000A) - Code World[^].
  • c++ code interpreter/debugging tool

    csharp c++ debugging question
    14
    0 Votes
    14 Posts
    2 Views
    M
    Good day to all. Unfortunately, personally, I - I cannot answer the question you raised, but I want to share very useful information. Since I am also engaged in software development, sometimes questions arise, and I find the answers to them on one site that my friend advised me. There you can find the answer to any question regarding IT. If you are interested, I leave a link for you: https://sirinsoftware.com/services/iot-development/[^]
  • Erroneous information returned from CImage Class

    graphics regex
    2
    0 Votes
    2 Posts
    4 Views
    V
    It is hard to guess how you has implemented it without seeing your code.