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

Search:

Type: Posts; User: VictorN

Page 1 of 80 1 2 3 4

Search: Search took 1.87 seconds.

  1. Replies
    10
    Views
    192

    Re: Can't change CTreeCtrl item image

    These article/discussions may be useful:
    https://stackoverflow.com/questions/1164868/how-to-get-size-of-check-and-gap-in-check-box...
  2. Replies
    10
    Views
    192

    Re: Can't change CTreeCtrl item image

    If you "need to show the icon 32x32" then do
    m_imglist.Create(32, 32, ILC_COLOR32,1, 1);
    ...
    ::LoadImage(AfxGetResourceHandle(), MAKEINTRESOURCE(IDI_UnCheck_ICO),
    IMAGE_ICON, 32, 32,...
  3. Replies
    10
    Views
    192

    Re: Can't change CTreeCtrl item image

    You have to add a new custom (21x21) images to your icons.
    Then load them using
    ::LoadImage(AfxGetResourceHandle(), MAKEINTRESOURCE(IDI_UnCheck_ICO),
    IMAGE_ICON, 21, 21, LR_DEFAULTCOLOR));
  4. Replies
    10
    Views
    192

    Re: Can't change CTreeCtrl item image

    The simplest way would be "resize" your icons (or just create the icons of the size 21x21) in the image editor. And then use these 21x21 icons.
  5. Replies
    10
    Views
    192

    Re: Can't change CTreeCtrl item image

    Why do you pass 2 as the index in the image list? Your image list has the size 2, thus the only valid indexes are 0 and 1.

    BTW, using SetItemImage method looks a little simpler that SetItem. ;)
  6. Replies
    10
    Views
    168

    Re: My simple vector crashes

    Run the "programs in Debug mode" is not the same as debug the program!
    Have a look at
    https://docs.microsoft.com/en-us/visualstudio/debugger/debugging-absolute-beginners?view=vs-2019
  7. Replies
    10
    Views
    168

    Re: My simple vector crashes

    Why presumably ?
    didn't you debug your code to see the exact place of the "crash"? :confused:
  8. Replies
    4
    Views
    126

    Re: Reopen the Dialog.

    What if you add (the block in blue)?

    if (m_pResultAnalysisDialog)
    {
    WINDOWPLACEMENT windowPlace;
    windowPlace.length = sizeof(WINDOWPLACEMENT);
    BOOL bOk =...
  9. Re: How to generate a condition (true or false) based on possibilities?

    Perhaps, this one will work?...
  10. Replies
    11
    Views
    2,615

    Re: variable visualisation in MSVC2019 debugger

    Very simple: you should ask your questions directly in the forum posts, not in some attachments that have to be downloaded just to read what you meant.
    The same is valid for the (not too long) code...
  11. Replies
    13
    Views
    328

    Re: MFC CListCtrl change checkbox color

    Then you nave to implement owner or custom drawing!
    some examples:
    http://codexpert.ro/blog/2013/02/22/custom-draw-vs-owner-draw-controls/
    https://www.codeproject.com/KB/list/#Custom+Draw
  12. Replies
    13
    Views
    328

    Re: MFC CListCtrl change checkbox color

    Did you try using CListCtrl::SetBkColor? Does it work or not?
  13. Re: How to return the value of a const char* method

    std::string myString = getOwnerSerNoString();
  14. Replies
    13
    Views
    328

    Re: MFC CListCtrl change checkbox color

    CListCtrl already has the methods to set the background ( https://docs.microsoft.com/en-us/cpp/mfc/reference/clistctrl-class?view=msvc-160#setbkcolor ) and text colors. So you don't need to handle...
  15. Replies
    13
    Views
    328

    Re: MFC CListCtrl change checkbox color

    CListCtrl or CListBox?
    The CTLCOLOR_LISTBOX belongs to the CListBox class (ListBox control)
  16. Re: Using datagridview AdjustCellBorderStyle function to change border color

    [moved from Visual C++ Programming Forum]
  17. Re: Using datagridview AdjustCellBorderStyle function to change border color

    The code you have posted has nothing to do with the native C++.
    It looks like the managed code.

    So I move this thread to the most appropriate Forum.
  18. Replies
    25
    Views
    849

    Re: Excel Automation Headaches

    Why "exit(0)"? Why "_exit()"? :confused:
    Using either of these in MFC application never was a good idea! And it is still a bad idea now!
  19. Replies
    25
    Views
    849

    Re: Excel Automation Headaches

    Then have a look at the post#17
  20. Replies
    5
    Views
    400

    Re: Closing a Dialog Box

    And does this code work?
  21. Replies
    25
    Views
    849

    Re: Excel Automation Headaches

    Then try the option "... from registry..." (sorry, i currently do not have any VS on my notebook, therefore cannot be more precise)
  22. Replies
    2
    Views
    370

    Re: Identifier is undefined - why?

    [moved from Visual C++ Programming forum]
  23. Replies
    25
    Views
    849

    Re: Excel Automation Headaches

    If you will use VS2017 to create the Excel-MFC classes from the type library then you won't need any #import at all, neither mso.dil, nor VBE6EXT.OLB, nor excel.exe.
    Only the classes created from...
  24. Replies
    25
    Views
    849

    Re: Excel Automation Headaches

    The best and simplest way would be using https://docs.microsoft.com/en-us/previous-versions/office/troubleshoot/office-developer/automate-excel-from-mfc-fill-data
    The only problem here is the...
  25. Replies
    21
    Views
    5,360

    Re: Installing Windows 8.1

    Dear Tim Paine,
    whom will it be helpful to install OS which "Mainstream support ended on January 9, 2018"?
Results 1 to 25 of 2000
Page 1 of 80 1 2 3 4


Windows Mobile Development Center


Click Here to Expand Forum to Full Width




On-Demand Webinars (sponsored)