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
  • identifier 'mode_t'

    question help
    5
    0 Votes
    5 Posts
    0 Views
    L
    I would guess that in some other platform it is used to refer to the following line of the stat type: unsigned short st\_mode; Which you could verify by checking the original source. So you could just add the following above your includes typedef unsigned short mode_t;
  • 0 Votes
    14 Posts
    0 Views
    A
    I found a perfect tool, please see my reply below.
  • 0 Votes
    3 Posts
    0 Views
    _
    Thanks. That warning has disappeared.
  • 0 Votes
    1 Posts
    0 Views
    No one has replied
  • OnInitDialog() MFC vc++

    c++ help question
    2
    0 Votes
    2 Posts
    0 Views
    L
    You nee to call the base version to complete proper initialisation. Always refer to the documentation for the MFC classes to ensure you are following the rules.
  • S_IRUSR S_IWUSR

    help question
    4
    0 Votes
    4 Posts
    0 Views
    CPalliniC
    Quote: it is ok like that ? Yes.[^]
  • signed value is out of range for enum constant

    question linux learning
    8
    0 Votes
    8 Posts
    0 Views
    _
    Yes, it is x86/x64 Intel. From Wikipedia: Current architectures The Intel x86 and also AMD64 / x86-64 series of processors use the little-endian format.
  • Error C2059 C2143

    help linux question
    4
    0 Votes
    4 Posts
    0 Views
    L
    There is most likely something missing or incorrect, earlier in the code that you have not shown.
  • How to set EM_SETCUEBANNER in a Edit Control

    help tutorial code-review
    3
    0 Votes
    3 Posts
    0 Views
    _
    Set text inside your edit box like that: L" Enter ..."
  • 0 Votes
    5 Posts
    0 Views
    L
    [Collecting Memory Usage Information For a Process - Windows applications | Microsoft Docs](https://docs.microsoft.com/en-us/windows/win32/psapi/collecting-memory-usage-information-for-a-process) [Working Set Information - Windows applications | Microsoft Docs](https://docs.microsoft.com/en-us/windows/win32/psapi/working-set-information?redirectedfrom=MSDN) It was only in wine that he laid down no limit for himself, but he did not allow himself to be confused by it. ― Confucian Analects: Rules of Confucius about his food
  • Message_Map MFC vc++

    c++ question
    2
    0 Votes
    2 Posts
    0 Views
    CPalliniC
    &CMFCListViewDoc::OnMycommand is a pointer to the member function. See, for instance IBM Knowledge Center: Pointers to members (C++ only)[^]
  • How to hide or show button from another class MFC vc++

    c++ tutorial question
    7
    0 Votes
    7 Posts
    0 Views
    M
    Thank you for the pointing me to the right direction. :) I'll read about "loose coupling" and to be honest I don't really get how to send message as of now, so I'll read about that too. I've solve my problem in a naive way for now but i'll definitely follow your suggestions. Thanks again.
  • c programming

    5
    0 Votes
    5 Posts
    0 Views
    CPalliniC
    You could start from #include int main() { int i; for (;;) { printf("please enter a positive integer\n"); if ( scanf("%d", &i) == 1 && i > 0 ) break; } printf("you entered %d, a good one\n", i); return 0; } and then find a better way...
  • Determining length of Switch compare

    10
    0 Votes
    10 Posts
    1 Views
    L
    Again you are reinventing the wheel the traditional way to deal with Endian is via the standard ints and you simply do eandian aware reads from files. The output from the reads being big_int16_t or big_uint16_t which are big endian versions. In vino veritas
  • cannot change rgrc0 with wm_nccalcsize

    18
    0 Votes
    18 Posts
    1 Views
    L
    I have been investigating these messages and my opinion is that it will be very difficult to achieve what you want. In order to make it work you need to adjust the client size every time the Window moves or is resized. This means keeping track of the Window (or Control) in terms of size and position, and recalculating the values that you need. And, to be honest, Windows does not really want you to do it this way, so a rethink of your design would be a better idea.
  • 0 Votes
    3 Posts
    0 Views
    D
    I did something similar here. It may not be exactly what you are after, but it does give you another perspective, which could ultimately get you to your goal. "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
    6 Posts
    0 Views
    _
    The program that I am talking about is called RegShot[^], I haven't had it anymore, but as far I am see now, I don't know if it tell you about dll's, but you can retrieve valuable data when you install something, even Firefox. Short documentation: How to Use Regshot To Monitor Your Registry[^]
  • CCombobox MFC vc++

    c++ question
    6
    0 Votes
    6 Posts
    0 Views
    D
    Gerry Schmitz wrote: Tying the validation to the button "click" ("record" validation) is a lot simpler than context / field validation. True, but that does not make it right. Gerry Schmitz wrote: In this case, he would have to "disable" the button (to "not allow a press"), then enable it when a selection was made. Which is extremely easy. A "balloon tip" on the OK button briefly telling why it is disabled makes it even more intuitive. Gerry Schmitz wrote: The more fields, the more "options", the more complex the enabling / disabling logic. Only if done incorrectly. Yes, a common approach is to sprinkle enable/disable code all over the place to do that very thing, but that's what adds unnecessarily complex (and possibly unmaintainable) code. "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
  • MFC vc++ deleting column in list view control

    c++
    3
    0 Votes
    3 Posts
    0 Views
    M
    Okay now I understand. Thanks :)
  • CMFCEditBrowseCtrl issue

    help windows-admin algorithms question announcement
    1
    0 Votes
    1 Posts
    2 Views
    No one has replied