Results 1 to 3 of 3

Thread: [RESOLVED] Exiting from within a WndProc?

  1. #1

    Thread Starter
    Join Date
    Jul 2010

    Resolved [RESOLVED] Exiting from within a WndProc?

    I added a tray icon to a recent app I'm working on, and put an exit option in the menu. But when I use this option, the program never unloads. The command to remove the icon is executed but it stays running in task manager, presumably because of issues exiting a form from within a form subclass (via SetWindowSubclass).

    What's the easiest way to properly exit here? I didn't want to just use 'End'.

    Edit: Nevermind, sorry, I should have tried the usual suspects API-wise first, PostMessage Me.hWnd, WM_CLOSE, 0, ByVal 0 works.
    Last edited by fafalone; Jun 20th, 2024 at 03:20 PM.

  2. #2
    Frenzied Member VanGoghGaming's Avatar
    Join Date
    Jan 2020
    Eve Online - Mining, Missions & Market Trading!

    Talking Re: [RESOLVED] Exiting from within a WndProc?

    If you used the proper way to subclass a form via "Implements ISubclass" then you could have used "Unload Me". Otherwise I guess you could just post "WM_CLOSE" from your WndProc.

  3. #3

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Click Here to Expand Forum to Full Width