PlanetSquires Forums

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: App not starting in Windows 10.  (Read 234 times)

Brian Alvarez

  • Little Newbie
  • *
  • Posts: 15
  • FF3 User
App not starting in Windows 10.
« on: September 25, 2019, 02:52:24 AM »


 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:

Code: [Select]
    ' // 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?


Logged

Pierre Bellisle

  • Junior Member
  • **
  • Posts: 88
Re: App not starting in Windows 10.
« Reply #1 on: September 25, 2019, 10:29:19 AM »

Brian,
What if you add the WS_VISIBLE style?
Logged

Brian Alvarez

  • Little Newbie
  • *
  • Posts: 15
  • FF3 User
Re: App not starting in Windows 10.
« Reply #2 on: September 25, 2019, 01:29:18 PM »


 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.
Logged

Paul Squires

  • Administrator
  • Guru Member
  • *****
  • Posts: 8865
  • Windows 10
    • PlanetSquires Software
Re: App not starting in Windows 10.
« Reply #3 on: September 25, 2019, 02:02:49 PM »

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.
Logged
Paul Squires
PlanetSquires Software
WinFBE Editor and Visual Designer

Brian Alvarez

  • Little Newbie
  • *
  • Posts: 15
  • FF3 User
Re: App not starting in Windows 10.
« Reply #4 on: September 25, 2019, 02:55:55 PM »

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

Pierre Bellisle

  • Junior Member
  • **
  • Posts: 88
Re: App not starting in Windows 10.
« Reply #5 on: September 26, 2019, 01:15:47 PM »

What if you try this under Windows 10?

Code: [Select]

#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
'_____________________________________________________________________________
'
Logged

Brian Alvarez

  • Little Newbie
  • *
  • Posts: 15
  • FF3 User
Re: App not starting in Windows 10.
« Reply #6 on: September 26, 2019, 02:11:55 PM »


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... :)
Logged

Brian Alvarez

  • Little Newbie
  • *
  • Posts: 15
  • FF3 User
Re: App not starting in Windows 10.
« Reply #7 on: September 27, 2019, 01:08:20 AM »

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....
Logged

Brian Alvarez

  • Little Newbie
  • *
  • Posts: 15
  • FF3 User
Re: App not starting in Windows 10.
« Reply #8 on: September 27, 2019, 05:40:09 PM »

 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. :(
 
« Last Edit: September 27, 2019, 05:42:22 PM by Brian Alvarez »
Logged