Welcome! Log In Create A New Profile

Advanced

Update table in another mdi window

Posted by John Marrone 
John Marrone
Update table in another mdi window
October 02, 2008 11:49AM
Hi
I have an MDI app and I have a table on the mdi parent window. I have made the mdi control or area, what ever you call it about the half the size as normal. Now when the user selects a row in the table on the mdi parent window I want to update the table in the mdi child window. Here's my code.


App.Race_Id = tblRaces.race_id
sAliasName is string = Win.QuickCaps
IF WinStatus(sAliasName)<>NotFound THEN
HCancelDeclaration(qryEntries)
HExecuteQuery(qryEntries, hQueryDefault + hModifyFile ,App.Race_Id)
TableDisplay(QuickCaps.tblEntries)
FileToScreen(QuickCaps)
END


I get the error that QuicCaps doesn't exist. Windows are not global to the app? I can use QuickCaps.tblEntries and it still errors out as you can see. How can I update a table on another window???? Much thanks for any help...

Jimbo
Re: Update table in another mdi window
October 02, 2008 03:25PM
Hi John, an MDI application is pretty different to an SDI one. Though I believe that your idea just has a quirk and should work fine after a fix, there are some peculiarities in the interaction of windows in MDI which do not exist in SDI. E. g. in WD12 it does not work anymore to open a connection from an MDI-child. Up to WD11 the connection had been global and did not terminate when closing the window. Now, the connection is local to the MDI-child and will dissappear as soon as it is closed, the connection is hidden from the other windows. Everything in spite of a global connection variable!

Let's do a test project in order to verify this. Still WD11/US in use?

Regards,
Guenter
John Marrone
Re: Update table in another mdi window
October 02, 2008 04:31PM
Hope you can help. Yes I am still using WD11. And Guenter I don't close the mdi window. Its just that in the mdi parent window I resize the mdi container to half the screen and when I open the mdi child it fits in only half the screen. Sort of like a internal window. I could use planes to accomplish what I need to do, but I would have a lot of them and it would take the window forever to load. But even if I used internal windows I would have the same problem.
Let me know what to do if you can help. Thanks so much.
BLS.pcs.crosspost
Re: Update table in another mdi window
October 02, 2008 05:07PM
John Marrone schrieb:
> Hi
> I have an MDI app and I have a table on the mdi parent window. I have made the mdi control or area, what ever you call it about the half the size as normal. Now when the user selects a row in the table on the mdi parent window I want to update the table in the mdi child window. Here's my code.
>
> App.Race_Id = tblRaces.race_id
> sAliasName is string = Win.QuickCaps
> IF WinStatus(sAliasName)NotFound THEN
> HCancelDeclaration(qryEntries)
> HExecuteQuery(qryEntries, hQueryDefault + hModifyFile ,App.Race_Id)
> TableDisplay(QuickCaps.tblEntries)
> FileToScreen(QuickCaps)
> END
>
> I get the error that QuicCaps doesn't exist. Windows are not global to the app? I can use QuickCaps.tblEntries and it still errors out as you can see. How can I update a table on another window???? Much thanks for any help...
>
>
Hm, I am still using WD11;
However, you should be able to post a message using a user-defined
message (WM_USER +1) from your MDI parent window to MDI child window(s).

PostMessage(hwndMDIChild, WM_USER +1, CurrentID, 0)

MDI child win. can process the msg. as follows :
hEvt is int = Event("UpdateTable", "*.", WM-USER+1)

Where UpdateTable should be defined like :
procedure UpdateTable(_message, wParam, lParam)
// wParam contains "in this case" CurrentID

HTH Bjoern
Message forwarded from pcsoft.us.windev
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: