none
AfxMessageBox usericon custom icon upload does not display the whole icon but blank for 32x32 size -yohmatmitw RRS feed

  • Question

  • Hi

    Happy Holidays.

    Donate at http://viflys.blogspot.com

    This is about

    The AfxMessageBox usericon custom icon upload does not display the whole icon but blank for 32x32 size -

    AfxMessageBox message displays like 

    -visible(true) is to be invoked

    -the text seems to display like there is an icon but invisible.

    Hope you can help .

    yohmatmitw

    Wednesday, November 8, 2017 1:48 PM

All replies

  • Hi Vdisplay,

    Thank you for posting here.

    You could is more related to design about website, it would be better to post a new thread in ASP.NET forum.

    The CLR Forum discuss and ask questions about .NET Framework Base Classes (BCL) such as Collections, I/O, Regigistry, Globalization, Reflection. Also discuss all the other Microsoft libraries that are built on or extend the .NET Framework, including Managed Extensibility Framework (MEF), Charting Controls, CardSpace, Windows Identity Foundation (WIF), Point of Sale (POS), Transactions. 

    Best Regards,

    Wendy


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, November 10, 2017 5:30 AM
    Moderator
  • I will.

    Its vc++ .NET Framework.

    I will pass it on.

     from your list its the right place.

    I shall try. I have partial success but is sure not asp.net though I will give it a shot.

    Nothing to do with the blog.

    Its vc++ offline for a friend .net framework MB_ICONINFORMATION,

    MB_USERICON

    Visual c++ LoadIcon

    C++.

    Signing off.

    Sunday, November 12, 2017 8:07 AM
  • oadIcon API functions in WinMain. How do I display custom Icons in my dialog boxes. Is there an API funtion for this or a special process?

    Nothing special.

    1. Add a picture control to your dialog
    2. Change its property to icon
    3. Add a couple of lines of code to your dialog's OnInitDialog handler
    to load your custom icon into the icon control:

        HICON hIco = (HICON) LoadImage( AfxGetInstanceHandle(),
                    MAKEINTRESOURCE(IDI_ICON1),
                    IMAGE_ICON, 72, 64,
                    LR_DEFAULTCOLOR );

        ((CStatic * ) GetDlgItem(IDC_ICON_CTRL))->SetIcon( hIco );

    Dave

    --====

    Something like the above.

    AfxMessageBox("my message Wendy is the best vc++", MB_OK|MB_USERICON,1);

    Once the above load image is successfully loaded the AfxMessageBox 

    would have your own user custom icon.

    Sunday, November 12, 2017 8:19 AM
  • Hi Vdisplay,

    >>AfxMessageBox("my message Wendy is the best vc++", MB_OK|MB_USERICON,1);

    Once the above load image is successfully loaded the AfxMessageBox 
    would have your own user custom icon.

    As far as I know, the style of the message box only apply the message-box styles to the box. It doesn't include MB_USERICON format.

    If you want to show custom icon, you may need to create your own custom dialog.

    Here is a sample document for you as a reference.

    https://www.codeproject.com/Articles/6237/Enhanced-MFC-Message-Boxes

    Hope this could be help of you.

    Best Regards,
    Baron Bi


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Wednesday, November 22, 2017 6:14 AM