1. Windows XP: message box with no other GUI does not work
- Posted by ArthurCrump Feb 02, 2011
- 1981 views
A program which issues message boxes with no conventional graphical user interface and has worked on previous versions of Euphoria does not now produce any output unless a suitable DLL is opened. The following program opens a suitable DLL and works. However, if the open_dll statement is commented out it does not produce a message box.
include std\dll.e open_dll("comdlg32.dll") -- or "EuWinGUI.DLL" or "libwxeu.dll" or "Graphics.dll" include std\win32\msgbox.e message_box("Trying\nmessage_box","Trial",MB_OK)
I am using Euphoria version 4.0.0
The DLL doesn't even need to be used and most DLLs do not make it work.
I realise that my Windows XP system has also changed, so could someone else with an up-to-date Windows XP system try it and see if it gives similar results?
2. Re: Windows XP: message box with no other GUI does not work
- Posted by ArthurCrump Feb 02, 2011
- 1975 views
I am sorry; I should have made that a ticket, which I have now done.
3. Re: Windows XP: message box with no other GUI does not work
- Posted by dcole Feb 02, 2011
- 1932 views
Hello Arthur,
I remmed out the dll and it still works with XP eu. ver 4.
Don Cole
4. Re: Windows XP: message box with no other GUI does not work
- Posted by ArthurCrump Feb 05, 2011
- 1902 views
Hello Arthur,
I remmed out the dll and it still works with XP eu. ver 4.
Don Cole
Are you using the final release?
I have reinstalled some earlier releases and have found that it works with release candidate 1 and the beta releases, but it doesn't work with release candidate 2 or the final release.
5. Re: Windows XP: message box with no other GUI does not work
- Posted by dcole Feb 06, 2011
- 1816 views
Are you using the final release?
I have reinstalled some earlier releases and have found that it works with release candidate 1 and the beta releases, but it doesn't work with release candidate 2 or the final release.
I'm using Microsoft Windows XP
Professional
Version 2002
Service Pack 2
Don Cole
6. Re: Windows XP: message box with no other GUI does not work
- Posted by jimcbrown (admin) Feb 06, 2011
- 1787 views
Are you using the final release?
I have reinstalled some earlier releases and have found that it works with release candidate 1 and the beta releases, but it doesn't work with release candidate 2 or the final release.
I'm using Microsoft Windows XP
Professional
Version 2002
Service Pack 2
Don Cole
But what is the output of eui --version and eui -version ?
7. Re: Windows XP: message box with no other GUI does not work
- Posted by ArthurCrump Feb 06, 2011
- 1829 views
With eui -v or eui --version I get something like:
Euphoria 4.0.0
...Managed memory
Revision date 2010-12-22 Id:115714454200
8. Re: Windows XP: message box with no other GUI does not work
- Posted by dcole Feb 06, 2011
- 1778 views
With eui -v or eui --version I get something like:
Euphoria 4.0.0
...Managed memory
Revision date 2010-12-22 Id:115714454200
It say,
Euphoria Interpreter 4.0.0 Release Candidate 1 (r3951M)
Using Managed Memory
I'm not sure why they use a lower case r but capital M.
Don Cole
9. Re: Windows XP: message box with no other GUI does not work
- Posted by ArthurCrump Feb 07, 2011
- 1812 views
Earlier I had said that I had created a ticket, but forgot to give the ticket number, which is ticket:598
Further information:
The return code from message_box is 0, which indicates an error, but getLastErr also returns 0.
I have also tried custom dialogs whic are supposed to resemble prompt_string.
These also only work when a suitable dll is opened.
I suspect that getSaveFileName will be similar.
I will try it and report.
10. Re: Windows XP: message box with no other GUI does not work
- Posted by ArthurCrump Feb 07, 2011
- 1857 views
Earlier I had said that I had created a ticket, but forgot to give the ticket number, which is ticket:598
Further information:
The return code from message_box is 0, which indicates an error, but getLastErr also returns 0.
I have also tried custom dialogs which are supposed to resemble prompt_string.
These also only work when a suitable dll is opened.
I suspect that getSaveFileName will be similar.
I will try it and report.
getSaveFileName is in comdlg32.dll, which is one of the DLLs which makes message_box work, so it's no good trying that or any of the other dialogs provided in Windows XP. Those would also be on comdlg32.dll.
11. Re: Windows XP: message box with no other GUI does not work
- Posted by ArthurCrump Feb 07, 2011
- 1764 views
demo\sanity.ex has two message_boxes which suffer from this problem. See ticket:598
12. Re: Windows XP: message box with no other GUI does not work
- Posted by dr_can Feb 22, 2011
- 1661 views
I tried out your little program. I am using Windows XP with all automatic updates and Euphoria 4.0.0. The two-line code worked for me.
13. Re: Windows XP: message box with no other GUI does not work
- Posted by petelomax Feb 22, 2011
- 1633 views
I know Matt has already comitted a fix by invoking InitCommonControlsEx(), but since this came up again... though I hesitate to send anyone off on a pointless wild goose chase...
Last week I stumbled across some code I added to my copy of arwen last September:
if 01 then -- PL 05/09/2010 (the demo program edita/f.exw failed under exw -- apparently because it didn't open_dll("shell32.dll")... ???) createWindowParams = {dwExStyle, -- extended style lpszClassName, -- window class name lpszWindowName, -- window caption or Button text etc.. dwStyle, -- window style x, -- initial x position y, -- initial y position nWidth, -- initial x size nHeight, -- initial y size pHwnd, -- parent window handle NULL, -- window menu handle OR user id for child windows NULL, -- program instance handle - Legacy of Win16 apps. 0 will work too. NULL} -- creation parameters --?createWindowParams ePrev = 0 while 1 do hwnd = c_func(xCreateWindowEx, createWindowParams) if hwnd!=NULL then exit end if -- ERROR_TLW_WITH_WSCHILD = 1406, -- ERROR_CANNOT_FIND_WND_CLASS = 1407, -- ERROR_CLASS_DOES_NOT_EXIST = 1411, eCode = c_func(xGetLastError,{}) if ePrev=0 and (eCode=ERROR_CANNOT_FIND_WND_CLASS or eCode=ERROR_CLASS_DOES_NOT_EXIST) then ePrev = eCode if not registerClass(classname,0,WndProcCallBack,NULL,NULL,COLOR_BTNFACE+1) then -- (the [2] is just so you know it's this message not the one above) FatalErr("Registration[2] of new window class: "& classname &" failed.") end if else printf(1,"Control creation routine failed with error code %d.\n",eCode) return 0 end if end while else -- old code: hwnd = c_func(xCreateWindowEx, { dwExStyle, -- extended style lpszClassName, -- window class name lpszWindowName, -- window caption or Button text etc.. dwStyle, -- window style x, -- initial x position y, -- initial y position nWidth, -- initial x size nHeight, -- initial y size pHwnd, -- parent window handle NULL, -- window menu handle OR user id for child windows NULL, -- program instance handle - Legacy of Win16 apps. 0 will work too. NULL}) -- creation parameters --?hwnd if hwnd=NULL then --?getLastError() ?9/0 WarnErr("Control creation routine failed.") return 0 end if end if
so if I get an ERROR_CANNOT_FIND_WND_CLASS or ERROR_CLASS_DOES_NOT_EXIST (=1411), I now try registering the unknown class and re-try the CreateWindowEx, at most once.
I cannot see how this could apply to msgbox.e, but someone else might.
Of course I fully accept that precious time is usually better spent fixing things that are still broken
Pete
14. Re: Windows XP: message box with no other GUI does not work
- Posted by mattlewis (admin) Feb 22, 2011
- 1519 views
so if I get an ERROR_CANNOT_FIND_WND_CLASS or ERROR_CLASS_DOES_NOT_EXIST (=1411), I now try registering the unknown class and re-try the CreateWindowEx, at most once.
I cannot see how this could apply to msgbox.e, but someone else might.
Of course I fully accept that precious time is usually better spent fixing things that are still broken
That's interesting...I think Derek found a possibly similar issue where CreateWindowEx was failing in Win32Lib. IIRC, this was with 4.1, so it could easily be something else that was broken.
Matt