• Welcome to PlanetSquires Forums.
 

App not starting in Windows 10.

Started by Brian Alvarez, September 25, 2019, 02:52:24 AM

Previous topic - Next topic

Brian Alvarez


Hello Paul and everyone,

I created my IDE using Firefly 3.74 + PowerBASIC 10.4. I found an issue and i am not
experienced enough in WinFBE to convert my IDE to it.

My IDE consists on around 100 forms...

Basically My IDE does nothing in Windows 10. It doesnt show up or crash... it simply quits at
pWindow.CreateWindow(), no more execution after that statement and it dissapears
from the taskbar:

    ' // Create the main window
    pWindow.CreateWindow( hWndParent, _
                          "PluriBASIC 6.0 IDE", _
                          0, 0, 870, 538, _
                          %WS_POPUP Or %WS_THICKFRAME Or %WS_CAPTION Or %WS_SYSMENU _
                                  Or %WS_MINIMIZEBOX Or %WS_MAXIMIZEBOX Or %WS_CLIPSIBLINGS _
                                  Or %WS_CLIPCHILDREN , _
                          %WS_EX_STATICEDGE Or %WS_EX_CONTROLPARENT _
                                  Or %WS_EX_LEFT Or %WS_EX_LTRREADING Or %WS_EX_RIGHTSCROLLBAR _
                                 , _
                          CodePtr( MAINFORM_FORMPROCEDURE ) )

    ' code never gets here...


I tracked all the messages it receives at MAINFORM_FORMPROCEDURE and the last one is WM_ACTIVATE,
then... everything just fades in silence.

It works flawless in Windows 7 and older (havent tested windows 8, probably works fine as well), but in
windows 10 it presents this behavior. Running it in compatibility mode does not help at all. My main form
is called MAINFORM, and MAINFORM_WM_CREATE is never invoked.

I imagine you are pretty busy but if you want to take a look, i can probably remove some of the copyrighted code
and share it, but maybe there are any suggestions before?



Pierre Bellisle

Brian,
What if you add the WS_VISIBLE style?

Brian Alvarez


It is set in the VD. It is strange it doesnt appear there, but the VD shows it is selected.
I am right now in the Win7 box, i will add it manually to the generated code later and
see what happens.

However, i doubt the problem is that... because the IDE simply dissapears from the
task manager. Ill try though.

Paul Squires

Kind of sounds like an api call that is GPF'ing. Maybe the call was more forgiving on Windows 7 but now Windows 10 is dumping the whole program.
Paul Squires
PlanetSquires Software
WinFBE Editor and Visual Designer

Brian Alvarez

Do you think the error could be in my code or in the pWindow's class?

Pierre Bellisle

What if you try this under Windows 10?



#COMPILE EXE '#Win 10#
#INCLUDE ONCE "CWindow.inc" 'CWindow class
'_____________________________________________________________________________

FUNCTION MAINFORM_FORMPROCEDURE (BYVAL hwnd AS DWORD, BYVAL uMsg AS DWORD, BYVAL wParam AS DWORD, BYVAL lParam AS LONG) AS LONG

SELECT CASE uMsg

   CASE %WM_CREATE
     EXIT FUNCTION

   CASE %WM_DESTROY
      PostQuitMessage(0)
      EXIT FUNCTION

END SELECT

FUNCTION = DefWindowProc(hwnd, uMsg, wParam, lParam)

END FUNCTION
'_____________________________________________________________________________

FUNCTION PBMAIN()
LOCAL pWindow AS IWindow
LOCAL hWndParent AS DWORD
LOCAL nCmdShow AS LONG

pWindow = CLASS "CWindow"

pWindow.CreateWindow(hWndParent, _
                      "PluriBASIC 6.0 IDE", _
                      0, 0, 870, 538, _
                      %WS_POPUP OR %WS_THICKFRAME OR %WS_CAPTION OR %WS_SYSMENU OR _
                      %WS_MINIMIZEBOX OR %WS_MAXIMIZEBOX OR %WS_CLIPSIBLINGS OR _
                      %WS_CLIPCHILDREN OR %WS_VISIBLE, _
                      %WS_EX_STATICEDGE OR %WS_EX_CONTROLPARENT OR _
                      %WS_EX_LEFT OR %WS_EX_LTRREADING OR %WS_EX_RIGHTSCROLLBAR, _
                      CodePtr(MAINFORM_FORMPROCEDURE))
pWindow.CenterWindow
pWindow.DoEvents(nCmdShow)

END FUNCTION
'_____________________________________________________________________________
'

Brian Alvarez


Hello Pierre, I will need to do something in my Windows 7 box first, but after that, I will turn the Win10 box and try... :)

Brian Alvarez

If i remove everytihng from the form it appears to work fine... Im not sure but it appears to be the firesplitter the one with an issue.
I will do test to remove stuff from it tomorrow. I hope the issue is on my side....

Brian Alvarez

#8
 I got it working. It was after all a null handle not being handled correctly. Pun intended.

The good news is that it was on my code. When the IDE is restored, all tabs get restored,
so, no null handles, but for a new PC, there are no tabs restored, so, no initial handle... :)

It wasnt easy to track because i had to manually remove each form in the MAINFORM form
to see which one was causing the issue... well, in fact removing it was the easy part...
for putting it back, it was easier to just delete the whole project and restore from a backup.

Why? because the expanded list is truncated and not all forms can be selected. See image
attached. Once removed, the only way to put them bac kwas to manually edit the frm file or
restoring the project from backup. :(