message 275 (1792 on similar projects)
message 275 (1792 on similar projects)
Hi y'all
I got PureBasic 0n 3/9/04, and I'm amazed by IT, but dismayed by Microsoft/Windows. In the 80's I used COBOL and have been playing catch-up ever since. I've enjoyed running some of your(s) code, and have done some things myself. One of my approaches has been to take your examples down to the minimum of what I'd like to do, and here's an example.
I have commented my specific questions; but of course there are others, such as 1)as far as I know, atl.dll is not in the same directory;
2)is this machine or environment(or machine/environment-whatever that is) specific; 3)who knows????- As for (3),Bluenz is aware of 275; Fred' of course, would know; and whoever else except me knows. Thanks to Freak, I wish I was able to use IsBusy.......
This is the first time I've posted to any forum whatsoever(don't even know how to use emoticons or if this is a new topic ), so please excuse whatever whatever, and I look forward to any assistance.
If OpenWindow(0, 0, 0, 600, 600, #PB_Window_Screencentered|#PB_Window_SystemMenu, "Web(Image)Browser")
If CreateGadgetList(WindowID())
File$ = OpenFileRequester("Choose some JPEGs", "", "JPEG Formats|*.jpg;*.jpeg", 0, #PB_Requester_MultiSelection)
WebGadget(0, 0,0, 1000, 1000, "File://"+File$) ;maybe "File://" tells browser not to look for connection????????
CallDebugger
Repeat
Event = WaitWindowEvent()
Debug event
If Event = 275; This works on my Win 98 machine, anyone know why?????????????????
Delay(2000)
SetGadgetText(0,NextSelectedFileName())
EndIf
Until Event = #PB_EventCloseWindow
EndIf
EndIf
Regards,
Ern
I got PureBasic 0n 3/9/04, and I'm amazed by IT, but dismayed by Microsoft/Windows. In the 80's I used COBOL and have been playing catch-up ever since. I've enjoyed running some of your(s) code, and have done some things myself. One of my approaches has been to take your examples down to the minimum of what I'd like to do, and here's an example.
I have commented my specific questions; but of course there are others, such as 1)as far as I know, atl.dll is not in the same directory;
2)is this machine or environment(or machine/environment-whatever that is) specific; 3)who knows????- As for (3),Bluenz is aware of 275; Fred' of course, would know; and whoever else except me knows. Thanks to Freak, I wish I was able to use IsBusy.......
This is the first time I've posted to any forum whatsoever(don't even know how to use emoticons or if this is a new topic ), so please excuse whatever whatever, and I look forward to any assistance.
If OpenWindow(0, 0, 0, 600, 600, #PB_Window_Screencentered|#PB_Window_SystemMenu, "Web(Image)Browser")
If CreateGadgetList(WindowID())
File$ = OpenFileRequester("Choose some JPEGs", "", "JPEG Formats|*.jpg;*.jpeg", 0, #PB_Requester_MultiSelection)
WebGadget(0, 0,0, 1000, 1000, "File://"+File$) ;maybe "File://" tells browser not to look for connection????????
CallDebugger
Repeat
Event = WaitWindowEvent()
Debug event
If Event = 275; This works on my Win 98 machine, anyone know why?????????????????
Delay(2000)
SetGadgetText(0,NextSelectedFileName())
EndIf
Until Event = #PB_EventCloseWindow
EndIf
EndIf
Regards,
Ern
Ern,
First about 275 message you get, AFAIK only three values correspond to :
#ERROR_EAS_DIDNT_FIT
#MCIERR_FILE_NOT_FOUND
#WM_TIMER
In your case, I guess this is #WM_TIMER which is sent because of no message in the queue. I am not sure, but I guess so.
Well, if this is the case, you don't have to care about. This is underground messaging from Windows OS.
Then, indeed File:// means to search for a local resource file instead of browsing over the net when using http://
As it seems you have long experience in software programming and computing, welcome for questions and shared code.
Rgrds
First about 275 message you get, AFAIK only three values correspond to :
#ERROR_EAS_DIDNT_FIT
#MCIERR_FILE_NOT_FOUND
#WM_TIMER
In your case, I guess this is #WM_TIMER which is sent because of no message in the queue. I am not sure, but I guess so.
Well, if this is the case, you don't have to care about. This is underground messaging from Windows OS.
Then, indeed File:// means to search for a local resource file instead of browsing over the net when using http://
As it seems you have long experience in software programming and computing, welcome for questions and shared code.
Rgrds
My avatar is a small copy of the 4x1.8m image I created and exposed at 'Le salon international du meuble à Paris' january 2004 in Matt Sindall's 'Shades' designers exhibition. The original laminated print was designed using a 150 dpi printout.
Back to the drawing board
Well; I see this morning that my code works fine in the debugger, but not in an executable, so my questions may be academic-but I'm stuck with them.
Sometimes, with Windows, I feel like The Blind Men and the Elephant. Microsoft suggests using the webbrowser control for uses other than Web browsing, but they only make this easy? for users of their C++ and VB products. PureBasic has made it very easy to access the control (thumbs up); and, for all of its problems, my little piece of code is far less bewildering than the MSN documentation. Perhaps it only needs a little fix here and there, but....perhaps not. I'll keep my fingers crossed.
Thanks for the previous reply and any others which may come along.
Sometimes, with Windows, I feel like The Blind Men and the Elephant. Microsoft suggests using the webbrowser control for uses other than Web browsing, but they only make this easy? for users of their C++ and VB products. PureBasic has made it very easy to access the control (thumbs up); and, for all of its problems, my little piece of code is far less bewildering than the MSN documentation. Perhaps it only needs a little fix here and there, but....perhaps not. I'll keep my fingers crossed.
Thanks for the previous reply and any others which may come along.
Ern,
You say
It works after compiling and excuting the .exe file to me.
Let me know if this is another part of code or post it if you want some more help.
Rgrds
You say
... you mean the code posted here ?Well; I see this morning that my code works fine in the debugger, but not in an executable, so my questions may be academic-but I'm stuck with them.
It works after compiling and excuting the .exe file to me.
Let me know if this is another part of code or post it if you want some more help.
Rgrds
My avatar is a small copy of the 4x1.8m image I created and exposed at 'Le salon international du meuble à Paris' january 2004 in Matt Sindall's 'Shades' designers exhibition. The original laminated print was designed using a 150 dpi printout.
Ern,
Could you try the following and tell what it does ?
Could you try the following and tell what it does ?
Code: Select all
If OpenWindow(0, 0, 0, 600, 600, #PB_Window_Screencentered|#PB_Window_SystemMenu, "Web(Image)Browser")
If CreateGadgetList(WindowID())
File$ = OpenFileRequester("Choose some JPEGs", "", "JPEG Formats|*.jpg;*.jpeg", 0, #PB_Requester_MultiSelection)
WebGadget(0, 0,0, 1000, 1000, "File://"+File$)
SetWindowTitle(0, "Web(Image)Browser : " + File$)
EndIf
Repeat
Wevent = WaitWindowEvent()
If Wevent = #PB_Event_CloseWindow
Quit = #TRUE
ElseIf WEvent = 275
Delay(2000)
File$ = NextSelectedFileName()
SetGadgetText(0,File$)
EndIf
Until Quit
EndIf
CloseWindow(0)
End
My avatar is a small copy of the 4x1.8m image I created and exposed at 'Le salon international du meuble à Paris' january 2004 in Matt Sindall's 'Shades' designers exhibition. The original laminated print was designed using a 150 dpi printout.
...,
Maybe by doing some tests call directly IwebBrowser2 functions you should discover that timers are launched to check the ready state or something like that. And probably some lacks exists in the Atl.dll file about such timers.
Anyway, I suppose it does not really affect other timers you may run or am I wrong ?
Maybe by doing some tests call directly IwebBrowser2 functions you should discover that timers are launched to check the ready state or something like that. And probably some lacks exists in the Atl.dll file about such timers.
Anyway, I suppose it does not really affect other timers you may run or am I wrong ?
My avatar is a small copy of the 4x1.8m image I created and exposed at 'Le salon international du meuble à Paris' january 2004 in Matt Sindall's 'Shades' designers exhibition. The original laminated print was designed using a 150 dpi printout.
While my original code worked consistently in my debugger and failed consistently as an executable; fweil's variation works inconsistently in both(for me); yet I can't see much difference in the logic.
I guess it was sort of reckless using something when I didn't know what it was, much less what it meant or whether it really really worked.
Anyway, I'm glad it worked all-around for some, and you're welcome to use it, being aware it's not very robust.
And, as I am writing this message, I think that freak has just summed up the situation.
Thanks so much to all, it's been fun, and I consider my questions (except for 32770 and 1792-which are, perhaps, the "underground messages") answered.
Good day
I guess it was sort of reckless using something when I didn't know what it was, much less what it meant or whether it really really worked.
Anyway, I'm glad it worked all-around for some, and you're welcome to use it, being aware it's not very robust.
And, as I am writing this message, I think that freak has just summed up the situation.
Thanks so much to all, it's been fun, and I consider my questions (except for 32770 and 1792-which are, perhaps, the "underground messages") answered.
Good day
...,
32770 is a #XTYP_ERROR : A dynamic data exchange (DDE) callback function receives the XTYP_ERROR transaction when a critical error occurs (WINAPI32 says)
1792 is a #EN_MSGFILTER : The EN_MSGFILTER notification message notifies a rich edit control's parent window of a keyboard or mouse event in the control. A rich edit control sends this notification message in the form of a WM_NOTIFY message (same WINAPI32 source of information).
This has effectively something to do with Atl.dll and IWebbrowser2 technologies.
Rgrds
32770 is a #XTYP_ERROR : A dynamic data exchange (DDE) callback function receives the XTYP_ERROR transaction when a critical error occurs (WINAPI32 says)
1792 is a #EN_MSGFILTER : The EN_MSGFILTER notification message notifies a rich edit control's parent window of a keyboard or mouse event in the control. A rich edit control sends this notification message in the form of a WM_NOTIFY message (same WINAPI32 source of information).
This has effectively something to do with Atl.dll and IWebbrowser2 technologies.
Rgrds
My avatar is a small copy of the 4x1.8m image I created and exposed at 'Le salon international du meuble à Paris' january 2004 in Matt Sindall's 'Shades' designers exhibition. The original laminated print was designed using a 150 dpi printout.