How to make an app - Andromo App Maker


No announcement yet.


  • Filter
  • Time
  • Show
Clear All
new posts

  • ChildWindow

    hi again ^^
    I'am now trying to create a child window by using "lua lanes" and "winapi" to force DialogEx become a child of main window. But sometime, the **** is not working.
    Please tell me a better way ^^

  • #2
    it already is a child of the main window but its modal, you can just enable the main window "EnableWindow" in User32.dll to regain control of the main window, be careful tho, doing that can cause some unstable results!
    Embrace change in your life, you never know, it could all work out for the best


    • #3
      I think my problem came from "lua lanes", because I use it to call a DialogEx, I will not lock the main window
      I don't understand very clear. You mean that you can unlock the main window when you call a DialogEx by using User32? If so, could you tell me how, it could help me a lot


      • #4
        nMainWindow=WinApi.FindWindow("", "FreshSys Software Designer")
        DLL.CallFunction(_SystemFolder.."\\User32.dll", "EnableWindow", nMainWindow..",true", DLL_RETURN_TYPE_LONG, DLL_CALL_STDCALL)

        I can enable/disable any window but cannot enable the main window when calling a DialogEx


        • #5
          Use the main window handle as retrieved with Application.GetWndHandle(), and WinAPI does not understand lua boolean values, you must use 0 for false and 1 for true
          DLL.CallFunction(_SystemFolder.."\\User32.dll", "EnableWindow", Application.GetWndHandle()..",1", DLL_RETURN_TYPE_LONG, DLL_CALL_STDCALL)
          Embrace change in your life, you never know, it could all work out for the best


          • #6
            Mmm, in the past I made some experiments with the WinApiMultiDialogs example provided with the WinApi plugin, but the real problem is not how to set the main window enabled but the fact that AMS runtime stops the execution of the code of the main window when the DialogEx is opened, so there is nothing to do.

            Yes, the main window is active, buttons react when you hover the mouse cursor or click on them, but the code in them is not executed, nor timers and so on. So, totally usefulness.
            We are slowly invading your planet to teach lazy humans to read the user manual.
            But don't be scared: we are here to help.


            • #7
              yes, it worked. But like Cyber says... it's useless. When I use "lua lanes", it more better than this but the application is not stable.
              so, there is no way to solve this problem?