bsalsa - Delphi tips, tricks, code snippets,Samples Component Search Engine.

The current search engine database includes about 5000 Delphi web sites and growing...

By pressing the button, you can add the Search engine to your iGoogle. Add to Google


Go Back   EmbeddedWB - bsalsa forum > TEmbeddedWB component > TEmbeddedWB Component
FAQDonate Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
Old 09-23-2009, 06:57 PM   #1
Pete Jones
Junior Member
 
Join Date: Apr 2009
Posts: 10
MessageDlg function

Found a strange error using this with d2009 + TEmbeddedWB.
Steps to reproduce:
  • Start a new project.
  • Add TEmbeddedWB to main form
  • Add a button and i the OnClick event call MessageDlg('test', mtError, [mbOK], 0);
This raises an AV. Using any other TMsgDlgType is OK.
The error does away if TEmbeddedWB is deleted.

Pete
Pete Jones is offline   Reply With Quote
Old 09-26-2009, 09:29 AM   #2
smot
Main Developer
 
smot's Avatar
 
Join Date: May 2006
Posts: 937
Change the code in EmbeddedWB.pas:

Code:
    if ((DlgClss = '#32770') or (DlgClss = 'Internet Explorer_TridentDlgFrame')) and
      (GetWinClass(Windows.GetParent(PopHandle)) <> 'TApplication') then
to

Code:
 
       DlgClss := GetWinClass(PopHandle);
    if (DlgClss = 'Internet Explorer_TridentDlgFrame') or ((DlgClss = '#32770') and
      ((GetWinClass(Windows.GetParent(PopHandle)) <> 'TApplication') and
      (FindControl(Windows.GetParent(PopHandle)) = nil))) then
(not fully tested, might change it a little but should at least fix the bug)
smot is offline   Reply With Quote
Old 09-26-2009, 12:32 PM   #3
Pete Jones
Junior Member
 
Join Date: Apr 2009
Posts: 10
Thanks for that. It seems to have fixed the error

Pete
Pete Jones is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT +3. The time now is 04:46 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
bsalsa@gmail.com