twig / dcxdll

Dialog Control eXtensions for mIRC
BSD 3-Clause "New" or "Revised" License
23 stars 2 forks source link

Webctrl - Blank/non-functioning control? #77

Closed Daedalus11069 closed 8 months ago

Daedalus11069 commented 9 months ago

I'm using mIRC 7.75 and dcxdll-3.1-git469 on Windows 11 Pro (22H2, OS Build 22621.2428 with Experience Pack 1000.22674.1000.0)

I've been trying to use the web control to display a custom page, or any page really, and it's just blank. Nothing renders even if I just set the url to https://google.com. On top of that, trying to access the status text or any property seems to crash mIRC when done, but the regular commands don't seem to crash it(seem, as in I only tested -m).

image

Additionally, here is the simple code I used to try the webctrl control:

dialog WebControlTest {
  title "Web Control Test"
  size -1 -1 510 110
  option dbu close
}
alias webControlTestopen {
  clear
  if ($dialog(webcontroltest) == $null) {
    dialog -m webcontroltest WebControlTest
  }
  else {
    dialog -x webcontroltest
    dialog -m webcontroltest WebControlTest
  }
}
alias webctrltest.events {
  ; Nothing to do here
}
on *:DIALOG:webcontroltest:init:0:{
  dcx Mark $dname webctrltest.events

  xdialog -b $dname +tzy
  xdialog -T $dname +sp
  dcxml -d $dname web_test $qt($mircdirscripts\interface.xml)

  xdid -m $dname page +hwbf +b http://www.google.com
}
<dcxml>
    <dialogs>
        <dialog name="web_test" caption="Web Control Test" w="300" h="300" margin="5 5 5 5">
            <control type="webctrl" id="page" />
        </dialog>
    </dialogs>
</dcxml>

I also attempted to add the control manually with explicit height and width(values were 400 for both). This didn't work either.

Browsers set as default that I tested:

I can't install IE 11 as it is discontinued at this point, but I tried the included registry keys never the less, with the same results as above.

d3Vilb4T commented 9 months ago

Try to run CMD.exe as Administrator and: reg add "hkey_current_user\software\microsoft\internet explorer\main\featurecontrol\feature_browser_emulation" /d 11001 /f /t reg_dword /v mIRC.exe

Restart mIRC.exe. You can make yourself a .reg file and run it after installing windows.

Daedalus11069 commented 9 months ago

Try to run CMD.exe as Administrator and: reg add "hkey_current_user\software\microsoft\internet explorer\main\featurecontrol\feature_browser_emulation" /d 11001 /f /t reg_dword /v mIRC.exe

Restart mIRC.exe. You can make yourself a .reg file and run it after installing windows.

I already said that I tried this. But to be clear, I used regedit directly. Added the dword of the correct value, quit regedit, and restarted mIRC. Same result as above. My uneducated opinion(I'm used to languages other than C++), is that this is because I don't have Internet Explorer installed on my system, because like I said, the program is discontinued and I can't install it. I'll update my post at least with the specific OS I'm running, since I apparently forgot to do that.

OokEek commented 9 months ago

I don't have win11 so no if that matters. The code you gave is missing the after init update of the cla, when i add that everything works fine.

dialog WebControlTest {
  title "Web Control Test"
  size -1 -1 510 110
  option dbu close
}
alias webControlTestopen {
  clear
  if ($dialog(webcontroltest) == $null) {
    dialog -m webcontroltest WebControlTest
  }
  else {
    dialog -x webcontroltest
    dialog -m webcontroltest WebControlTest
  }
}
alias webctrltest.events {
  ; Nothing to do here
}
alias -l _postinit {
  xdialog -l $1 update
  xdialog -j $1
}
on *:DIALOG:webcontroltest:init:0:{
  dcx Mark $dname webctrltest.events

  xdialog -b $dname +tzy
  xdialog -T $dname +sp
  dcxml -d $dname web_test $qt($mircdirinterface.xml)

  xdid -m $dname page +hwbf +b http://www.google.com

  .timer 1 0 _postinit $dname
}
Daedalus11069 commented 9 months ago

Right as you may be that I forgot the update for the CLA, adding it in does not make the control work for me. I still get the same blank control, without any telling messages in the status window(even with verbose enabled).

I don't immediately think its related to my OS, just the fact that Internet Explorer is missing on my system, and I can't install it because as far as I know, there is no way to(the microsoft link that used to have it is no more).

OokEek commented 8 months ago

Try the latest dll & web2ctrl, this should work fine on win7+

Daedalus11069 commented 8 months ago

I can confirm the latest dll works in regards to the web2ctrl.

However, the performance of the dialog in general is significantly slower between versions 3.1-git952 and 3.1-git469, at least where a complex CLA is in use(for example, the minimal CLA I used to test the web is fast, but my primary use case results in it being slow. Still investigating if it is something I can fix on my end). I'll open a separate issue if it makes tracking things easier.