<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.2912" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>I was on the wrong track. Someone has put me
on the right track now, but I'm not sure how best to implement it.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I can now get DLL forms to handle tabs!!! But
this requires taking over the processing of all windows messages for the
application. I put this in the Application.OnIdle event.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>
<DIV><FONT face=Arial size=2>Handle := FindWindow(...); // handle to DLL
dialog</FONT></DIV></FONT></DIV>
<DIV><FONT face=Arial size=2>...</FONT></DIV>
<DIV><FONT face=Arial size=2>var </FONT></DIV>
<DIV><FONT face=Arial size=2> LMsg: TMsg;</FONT></DIV>
<DIV><FONT face=Arial size=2>begin</FONT></DIV>
<DIV><FONT face=Arial size=2> while </FONT><FONT face=Arial
size=2>GetMessage(LMsg, 0, 0, 0) do</FONT></DIV>
<DIV><FONT face=Arial size=2> begin<BR> if not
IsDialogMessage(Handle,LMsg) then</FONT></DIV>
<DIV><FONT face=Arial size=2>
begin<BR>
TranslateMessage(LMsg);<BR>
DispatchMessage(LMsg);<BR> end;<BR>
end;<BR>end;</DIV></FONT>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>This works great for the DLL window, but the
main application now does not process any windows messages. </FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Is there a better way? I don't understand why
it will not process window messages for the main app. I thought
it should be similar to doing an Application.ProcessMessages.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Thoughts?</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Thanks,</FONT></DIV>
<DIV><FONT face=Arial size=2>Ross.</FONT></DIV>
<BLOCKQUOTE dir=ltr
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A title=ross@stationplaylist.com href="mailto:ross@stationplaylist.com">Ross
Levis</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A title=delphi@ns3.123.co.nz
href="mailto:delphi@ns3.123.co.nz">NZ Borland Developers Group - Delphi
List</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Saturday, August 05, 2006 8:03
PM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> Re: [DUG] DLL Forms</DIV>
<DIV><BR></DIV>
<DIV><FONT face=Arial size=2>I meant WS_TABSTOP.</FONT></DIV>
<BLOCKQUOTE dir=ltr
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A title=ross@stationplaylist.com
href="mailto:ross@stationplaylist.com">Ross Levis</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A title=delphi@ns3.123.co.nz
href="mailto:delphi@ns3.123.co.nz">NZ Borland Developers Group - Delphi
List</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Saturday, August 05, 2006 7:37
PM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> Re: [DUG] DLL Forms</DIV>
<DIV><BR></DIV>
<DIV><FONT face=Arial size=2>Ok, I think I'm on to something.
</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I believe the DLL windows use the same window
styles as defined in the parent window. The Parent in this case is a
window handle that my app creates with </FONT><FONT face=Arial
size=2>AllocateHWnd which does not have any styles as such. I think
this is the problem.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Is there a way to apply a style such as
WM_TABSTOP to a window created with AllocateHWnd? Or would I need to
use CreateWindow and never make the window visible?</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>The reason for using AllocateHWnd is because it
is a separate component which loads the DLL's and it does not have a window
itself, so this window is created to handle some WM_USER messages that need
to be processed.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Thanks,</FONT></DIV>
<DIV><FONT face=Arial
size=2>Ross.</FONT></DIV></BLOCKQUOTE></BLOCKQUOTE></BODY></HTML>