CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: Marc G

Page 1 of 79 1 2 3 4

Search: Search took 2.26 seconds; generated 47 minute(s) ago.

  1. Thread: Re-vamped MSDN

    by Marc G
    Replies
    13
    Views
    2,051

    Re: Re-vamped MSDN

    For Standard Library stuff, I always use cppreference. Just Google or Bing and include "cppreference", even without including it, it will be near the top.
  2. Thread: Re-vamped MSDN

    by Marc G
    Replies
    13
    Views
    2,051

    Re: Re-vamped MSDN

    I found that to be always the case...
  3. Replies
    2
    Views
    2,313

    Re: safe to reinterpret_cast vector?

    I don't think this is safe. The elements in your vector are instances of CComPtr, while the GetFiles() method needs a buffer of plain IDWriteFontFile pointers.
    I would create a...
  4. Replies
    5
    Views
    4,618

    Re: Changing color of CProgressBarCtrl in MFC C++

    As Arjay said, you can directly use methods on the CProgressBarCtrl. See MSDN: https://docs.microsoft.com/en-us/cpp/mfc/reference/cprogressctrl-class?view=vs-2019
  5. Replies
    4
    Views
    4,225

    Re: Unit testing in C++?

    I use both MSTest and Google test.
  6. Re: Reading contents of file into SetWindowTextA for output into an Edit field of win

    I assumed C++, this section of the forum is called "C++ and WinAPI" after all.
  7. Re: Reading contents of file into SetWindowTextA for output into an Edit field of win

    Why GlobalAlloc() after all?
    You can just use standard C++ memory allocation.
    Preferably using some kind of RAII object like std::vector.
    So, instead of GlobalAlloc(), create std::vector of the...
  8. Replies
    6
    Views
    4,567

    Re: Hello world prgram not runing

    Check the properties of your solution and see that your executable is set as the startup project.
  9. Re: C or C++ equivalent to Java 2D graphics functionality

    Another nice and powerful library is AGG ( http://antigrain.com/ ), unfortunately, not actively maintained anymore, but what's there works nicely.
  10. Replies
    9
    Views
    11,901

    Re: How are these controls created ?

    As VictorN said, you can customize the look using custom drawing or owner drawing.
  11. Replies
    6
    Views
    2,763

    Re: trancate fonction

    Just a note: The C++ Standard resize_file() method I mentioned earlier requires C++17.
  12. Replies
    6
    Views
    2,763

    Re: trancate fonction

    I suggest to use the portable C++ Standard resize_file() method. It's part of the C++ Standard Library std::filesystem.
    See https://en.cppreference.com/w/cpp/filesystem/resize_file
  13. Re: How to edit original object through object* temp that points to original object?

    Please post compilable code.
    What's the definition of your Friend class?
    Where do you define your vector?
    You are using f1 which is uninitialized.
  14. Replies
    2
    Views
    4,966

    Re: Location for Windows system classes?

    What do you mean stored in the file system?
    Most are probably in user32.dll.
    If you want to create menu's that look completely different, you probably better of starting from scratch on your own...
  15. Re: Unresolved external symbol since migration to_X64

    A quick search brought me to: https://stackoverflow.com/questions/52602411/vs2015-after-migration-to-x64-middle-compiler-has-unresolved-smbols
    There they say to remove the pragmas.
  16. Re: Unresolved external symbol since migration to_X64

    That pragma should not be necessary I think.
    Can you post your DllRegisterServer code?
  17. Replies
    1
    Views
    2,206

    Re: gmp-6.1.2.tar.lz collecting cygwin.

    You might have to use lunzip followed by tar.
    See: https://apple.stackexchange.com/questions/301016/how-uncompress-tar-lz-file
  18. Replies
    3
    Views
    3,720

    Re: Inverting axes in the back buffer

    Bitmaps in Win32 are usually up-side down.
    See this article: https://docs.microsoft.com/en-us/windows/desktop/directshow/top-down-vs--bottom-up-dibs
  19. Thread: Color indicator

    by Marc G
    Replies
    7
    Views
    4,961

    Re: Color indicator

    Yes, that's one way to detect clicks.
    As said, if you want to encapsulate it further, you might want to look at custom control. Here is a good set of articles.
  20. Replies
    1
    Views
    3,425

    Re: Cant figure out my errors

    Are you sure that's the right piece of code and right set of errors?
    According to the first error, there is something wrong on line 33, but line 33 is the following comment:

    //ntosp.h
  21. Thread: Color indicator

    by Marc G
    Replies
    7
    Views
    4,961

    Re: Color indicator

    Right, my mistake. My code is indeed using MFC syntax, but as Arjay said, it's pretty much straightforward to translate that to Win32 API calls.

    To intercept mouse clicks, you can just handle...
  22. Thread: Color indicator

    by Marc G
    Replies
    7
    Views
    4,961

    Re: Color indicator

    One way is to just implement the drawing in the OnPaint handler of your dialog. For example:

    void CMyDialog::OnPaint()
    {
    CPaintDC dc(this);

    CRect rect;...
  23. Replies
    13
    Views
    3,708

    Re: Eliminating an odd bug

    How are you iterating? Are you maybe iterating one element too far in your container?
    Can you post your iteration loop?
  24. Replies
    13
    Views
    3,708

    Re: Eliminating an odd bug

    Based on that piece of code, there is not much we can help you with.
    That piece of code is perfectly fine.
    Maybe there is some dynamic memory happening inside the struct?
    Maybe that's not properly...
  25. Replies
    27
    Views
    20,733

    Re: What debuggers do you use?

    As others have said, it's impossible to write bug-free code, but there are tools to help you.
    One such tool is called unit-tests. You should write unit-tests to cover every line of code you've...
Results 1 to 25 of 1969
Page 1 of 79 1 2 3 4





Click Here to Expand Forum to Full Width

Featured