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
  • Visual c++ 6 freeware ?

    c++ question announcement
    9
    0 Votes
    9 Posts
    0 Views
    A
    When I've had to use really old versions of something... I've gone to ebay and looked there. The other way would be if you have an MSDN subscription, since MS usually makes all versions of their IDEs available to developers to download through there, but a subscription is pricey to begin with (you'll likely find it cheaper through some third party online).
  • Get Windows TaskBar Height & width

    c++ json
    5
    0 Votes
    5 Posts
    0 Views
    F
    According to the API description you have to pass the hwnd of your taskbar. :/ SHAppBarMessage(ABM_QUERYPOS, pabd); pabd A pointer to an APPBARDATA structure. The uEdge member specifies a screen edge, and the rc member contains the proposed bounding rectangle. When the SHAppBarMessage function returns, rc contains the approved bounding rectangle. You must specify the cbSize, hWnd, uEdge, and rc members when sending this message; all other members are ignored. Source: msdn
  • Compiling DLL - what is the sequence of compilation? SOLVED

    question c++ tutorial
    7
    0 Votes
    7 Posts
    1 Views
    L
    Vaclav_Sal wrote: My problem now is that #ifndef / #define / #endif DOES NOT work building this simple DLL. Because (I'm sorry to belabour this point) those directives have nothing to do with the program being a DLL. They are used by the compiler to include or exclude some sections of source code, in a compilation module. Vaclav_Sal wrote: I use #pragma message to track the compilation,   and than the linker goes crazy. That hardly tells us anything useful. You really need to show us some of the source code (and please use <pre> tags around it) and indicate what errors occur and where.
  • Low-Level Keyboard Input Detection

    android ios linux hardware question
    5
    0 Votes
    5 Posts
    4 Views
    D
    Thanks for the code! Does this work if it's a on-screen/software key board?
  • MFC set Control color question [Solved]

    tutorial c++ database question
    4
    0 Votes
    4 Posts
    0 Views
    CPalliniC
    You are welcome. Veni, vidi, vici.
  • Auto align of toolbar by frame width

    c++ question
    6
    0 Votes
    6 Posts
    0 Views
    A
    Yes am using CMFCToolbar, i have already checked with palette sample and EnableDocking();, they didnt help me :( i will attach the code i have tried for docking the toolbar m_wndMenuBar.EnableDocking(CBRS_ALIGN_ANY); m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY); tb1.EnableDocking(CBRS_ALIGN_ANY); tb2.EnableDocking(CBRS_ALIGN_ANY); tb3.EnableDocking(CBRS_ALIGN_ANY); tb4.EnableDocking(CBRS_ALIGN_ANY); tb6.EnableDocking(CBRS_ALIGN_ANY); tb7.EnableDocking(CBRS_ALIGN_ANY); tb8.EnableDocking(CBRS_ALIGN_ANY); tb9.EnableDocking(CBRS_ALIGN_ANY); EnableDocking(CBRS_ALIGN_ANY); DockPane(&m\_wndMenuBar); // tb1.SetControlBarStyle(AFX_CBRS_RESIZE); // m_wndToolBar.SetControlBarStyle(AFX_CBRS_RESIZE); // tb4.SetControlBarStyle(AFX_CBRS_RESIZE); // tb8.SetControlBarStyle(AFX_CBRS_RESIZE); // tb9.SetControlBarStyle(AFX_CBRS_RESIZE); // tb2.SetControlBarStyle(AFX_CBRS_RESIZE); // tb3.SetControlBarStyle(AFX_CBRS_RESIZE); // tb6.SetControlBarStyle(AFX_CBRS_RESIZE); // tb7.SetControlBarStyle(AFX_CBRS_RESIZE); DockPane(&tb1); DockPane(&m\_wndToolBar); DockPane(&tb4); DockPane(&tb8); DockPane(&tb9); DockPane(&tb7); DockPane(&tb3); DockPane(&tb6); DockPane(&tb2);
  • DrawText() blinking problem

    adobe help
    11
    0 Votes
    11 Posts
    0 Views
    E
    write a test program in a MFC PC program. Now I think I can use a control, like text box to implement my job. but I am still wonder how can I use CRect/DrawText() to implement the same job.
  • What this function does?

    question
    3
    0 Votes
    3 Posts
    0 Views
    E
    InvalidateRect(rect,FALSE); DrawText(hDC,dtcMsgStr,-1,rect,DT_WORDBREAK|DT_LEFT); I tried the above way, same phenomenon
  • MFC class wizard comment delimiters [Solved]

    c++ tutorial question
    3
    0 Votes
    3 Posts
    0 Views
    A
    the comment delimiters only used by IDE(vc6.0) , so when you add code manually, you can add code in anywhere. and you can remove the comment delimiters, but the IDE class warized will can't use!
  • 0 Votes
    4 Posts
    0 Views
    Richard Andrew x64R
    I recommend that you use the remote debugging tools in Visual Studio to find where it is hanging up. Remote Debugging[^] The difficult we do right away... ...the impossible takes slightly longer.
  • How to unload WinHttp library?

    performance help tutorial question announcement
    6
    0 Votes
    6 Posts
    0 Views
    D
    A common misconception about Task Manager numbers is that they tell something about the memory your program is consuming. This is not what those numbers tell you. They tell you the amount of address space that is in use. This has nothing to do with the amount of that address space your program is actually using. The blocks of memory that your code, or the library, freed are still in the address space, but they are available for subsequent allocation. The numbers you see in Task Manager are almost but not quite completely useless for telling how much of your memory is in use. If you see it shrink, this is good, but if you don't, it is not necessarily bad. If it's really important to you, use the heap-walking functions to track what is going on. "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
  • How can I use winRing0.dll

    question help
    4
    0 Votes
    4 Posts
    1 Views
    R
    cedricvictor wrote: Could you send me these files, please? You would have to install svn to be able to check out. I have no installation of svn on my working computer, so I will not be able to send you the files. :( cedricvictor wrote: I have been try your reference, but it still no sound with buzzer Is the code running ? Is your buzzer working at all ? ~RaGE(); I think words like 'destiny' are a way of trying to find order where none exists. - Christian Graus Entropy isn't what is used to.
  • GetWindowRgn API returns ERROR

    help json question
    5
    0 Votes
    5 Posts
    0 Views
    L
    atm.menon wrote: why its happened only some times Impossible to tell without a lot more diagnostic information.
  • Relationship between Latency and Frame Rate

    question learning
    5
    0 Votes
    5 Posts
    1 Views
    J
    This[^] might be an interesting read regarding Sleep(). I agree with Rage that Sleep() is not the best choice here, possibly waitable timers or SetTimer()?
  • Get data from Grid Control

    css question
    3
    0 Votes
    3 Posts
    0 Views
    R
    Could you post your code ? ~RaGE(); I think words like 'destiny' are a way of trying to find order where none exists. - Christian Graus Entropy isn't what is used to.
  • CMap efficiency

    question
    4
    0 Votes
    4 Posts
    0 Views
    S
    Lookup requires comparing keys, i. e. calling the operator < and maybe operator ==. Since these operators are more efficient for ints than they are for strings, I suspect that CMap is better. However, the rest of the looking-up algorithm that does not involve comparing keys may play a much more significant role on performance overall, so you might not notice a difference. You should also consider whether there are other operations than looking up which are called often, e. g. insertion, removal, converting keys to different formats, etc.: E. g. if you spend a lot of time reading keys from a text source or writing them as text, then it may be advisable to just stick with string keys rather than converting them back and forth all the time! 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) Point in case: http://www.infoq.com/news/2014/02/apple_gotofail_lessons[^]
  • C and Macros

    question
    12
    0 Votes
    12 Posts
    0 Views
    F
    Hi Leon, thanks for your answer. What you described here is exactly my problem. The problem is that I always program in C++ and the few C programs were really small ones. The way to think is a little different and I always think in an object way. I decided to migrate to C++. The code became cleaned and easy to read. One more time, thanks for your answer and I am sorry to take so long to answer :) Best regards Filipe Marques
  • Boost::Log DB backend?

    c++ database question
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • How do I access / use base class method declared private?

    question help tutorial
    6
    0 Votes
    6 Posts
    0 Views
    V
    Thanks, you found the problem. My splitter is derived from CMDIChildWnd. I am not sure why, but it works as a splitter OK. And since I am still using VC6.0 MFC multiple inheritance should work, but that is a ton of work to remove all the ambiguities... I was going to use HitTest to maximize selected pane, so I better stick with moving splitter bars.
  • MDI frame "Window" menu / submenu dynamics - where to start?

    c++ help question
    6
    0 Votes
    6 Posts
    0 Views
    L
    Your choice, of course. Stick with whichever technology you prefer.