“Encountered an improper argument” error on DestroyWindow() RRS feed

  • Question

  • Whenever I close the application, a messagebox with the following message pops up "Encountered an improper argument". If I close the application after this messagebox pops up. It doesn't close. The application goes to background and then I have to go to Task Manager and kill the application. Please let me know how to solve this problem.
    Friday, December 20, 2019 7:50 AM

All replies

  • Hi Tintu,

    Can you provide a Minimal, Reproducible Example?

    And I will be better able to provide help if I can reproduce your issue.

    Best regards,


    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

    Friday, December 20, 2019 8:07 AM