You are not logged in. You can browse in the PowerBASIC Community, but you must click Login (top right) before you can post. If this is your first visit, check out the FAQ or Sign Up.
So, can i use CONTROL ADD ... and all the other functions to use on Windows created by the Windows APi (with CreateWindowEx etc ... ) or are there rules agianst it ? How about embedding a DDT form on a CreateWindow window ?
Cheers
Steven
So here we are, this is the end.
But all that dies, is born again.
- From The Ashes (In This Moment)
Well, you may do as you please, but 'DDT' syntax is only supported on windows created with the DIALOG NEW or CONTROL ADD statements in the same code module.
Lots of DDT statements will "work" when passed a handle to a non-DDT window or control, but that would officially be neophyte's serendipity.
I would not see a problem making a DDT dialog a child window , but then again I am not a 'DDT Guy' so I would actually have to try it.
My impression is that DDT commands should really only be used for DDT apps.
DDT controls depend upon being on a DDT Dialog, since the DDT engine likely processes a number of messages (ie. color messages) for the controls in a unique way.
Now it may be possible to use Modal DDT based dialogs in an SDK app, since the modal dialogs uses a modal message loop and don't require you use a DDT style message loop. Beyond that I wouldn't mix DDT controls (as children of) with SDK style windows.
While DDT is a set of wrappers over the Windows Dialog API, it does do some internal processing of its own, so it is more like an independent GUI engine. Before mixing DDT with SDK style apps, one must examine it carefully. Do tests to see the results of mixing them.
I was thinking more like modeless dialog, with SDK message loop including IsDialogMessage() in lieu of 'DDT' message loop?
I don't believe you can constrain the size/location of the modeless dialog to the client area of the "master" window simply with Window styles, but you should be able to move it yourself when you get WM_SIZE on that master window.
Actually, DDT controls were never, ever designed nor intended for use with non-DDT windows and dialogs.
If you break "the rules", you are guaranteed to have a problem at some point.
There has been "no change" in this regard, so PowerBASIC recommends that you consider it carefully.
Conversely, the opposite is perfectly acceptable.
Once you have a Windows Handle from a DDT operation, you are encouraged to use it in WinAPI functions
like GetWindowLong(), etc. This expands your capabilities a great deal, with very little "risk".
We process personal data about users of our site, through the use of cookies and other technologies, to deliver our services, and to analyze site activity. For additional details, refer to our Privacy Policy.
By clicking "I AGREE" below, you agree to our Privacy Policy and our personal data processing and cookie practices as described therein. You also acknowledge that this forum may be hosted outside your country and you consent to the collection, storage, and processing of your data in the country where this forum is hosted.
Comment