Support Forums > WinFBE - Code Editor and Visual Designer

WinFBE using CWindow #4

(1/5) > >>

Paul Squires:
Attached is the latest source code. I have been working on the "Environment Options" dialogs. The options are also saved and restored from a configuration file.

Updated: June 7, 2016
Updated: June 7, 2016 (later that evening)

Josť Roca:
Remove the deletion of CWindow from the WM_DESTROY message and put it after DoEvents:

--- Code: ---Function frmOptions_Show( ByVal hWndParent As HWnd, _
                          ByVal nCmdShow   As Long = 0 _
                          ) As Long


   ' Process Windows messages
   Function = pWindow->DoEvents(nCmdShow)

   ' // Destroy the CWindow class
   Delete pWindow

--- End code ---

Otherwise, DoEvents is going to call a method that doesn't exist anymore.

Josť Roca:
Remember that after receiving the WM_DESTROY message, the message pump must still exist to process the PostQuitMessage. If you delete the class, the pWindow pointer of pWindow.DoEvents is no longer valid.

Paul Squires:
Thanks Jose! I have now made those changes. :)

The gpf is in my version of the color selection combobox. I see mistakes where I forgot to change code when going from ANSI to the UNICODE version.  I should have it all fixed by tomorrow.

Paul Squires:
Updated the first post with the latest code.
Fixed gpfs on 64 bit.
Now using Jose's COM implementation of the FileOpenDialog (AfxIFileOpenDialogW).


[0] Message Index

[#] Next page

Go to full version