OWL Dialog transfer buffer

OWL Dialog transfer buffer

Post by moo.. » Mon, 11 Oct 1993 04:02:09

I am working on a project(TC++ OWL) and have designed
a dialog box with several options("radio" buttons) and am
trying to get it to change the Transfer Buffer so the main
program can know what buttons were selected and what ones
were not.

So far I have:

 - defined a transfer struct to be for the buffer

 - in the constructor of the main window I have set the buffer
   using the memset function:  memset(&TranStruct, 0, sizeof TransStruct)

-  in the dialog class that I made I have set the transfer buffer(in
   the constructor) as
    TransferBuffer = (void far *)&(((TMyWindow *)Parent)->TransferStruct);

(I think that was it.  Since I am working with a modal dialog there
is not much that needs to be done...I guess.  Also, if I am right, by using
the transfer buffer I can pre-set which buttons in the groups are set
when the dialog box is executed)

Anyway, If anyone can help I would appreciate it.

-Shawn N. Moore


1. -> [BC/OWL] Transfer buffer problem ?!! <-

I have the following problem using Borland C++ 4.5 and OWL 2.x transfer mechanism.
My transfer buffer, called channelParamData contains 3 comboboxes and 1
check box and is of type:

struct channelParamXfer {
   TComboBox*   firstChannel ;
   TComboBox*   secondChannel ;
   TCheckBox*   setBoth ;

The problem is that I want to set that buffer to default values when
initializing (in the SetupWindow function).

So, I can do
        channelParamData.setBoth = BF_CHECKED ;
what works correctly.

I have read that, since it is not possible to directly assign combobox
values to a transfer buffer, one should use the Transfer() function.

So, after inserting my strings into firstChannel, I use
   firstChannel->Transfer( &channelParamData, tdGetData ) ;

This works, because it copies the data of firstChannel at the very begining
of the channelParamData buffer.
Then, of course, I initialize secondChannel with the strings I want it to
display, and also want to store these values.

A  secondChannel->Transfer( &channelParamData, tdGetData ) ; won't work,
since here again it copies everything at the beginning of the buffer, and
NOT at the secondChannel position in the buffer.
I have tried to add the size returned by the first transfer (the size of
the information passed) to the address of channelParamData, but I always
get stuck with that, generating a GPF.

How does one initialize more than 1 combobox and pass the info to a
transfer buffer?
How does one initialize a combobox when it is not at the first position
in the buffer?

If I don't do this, the first time I open my dialog box, the info is ok.
If I press ESC or click the CANCEL button, that info is NOT copied to the
buffer, leading the dialog box not to display nothing in the comboboxes
the next time it is opened.
A click on OK copies correctly the information.

Thanks for any help.

Steve Jordi
| Dpt of Geophysics       | Voice: + 41 22 702-6627                       |
| University of Geneva    | Fax:   + 41 22 320-5732                       |

| Switzerland             |       Compuserve:    70143,3056 (once a week) |
|                         |        WWW: http://www.unige.ch/hazards/jordi |
| Volcanoes? Disasters? Now also on this WWW: http://www.unige.ch/hazards |

2. Javabeans support for the AS/400 ?

3. OWL 2.0 transfer buffer bug ???

4. Alpha TeX editor - some problems.

5. TPW : Using Transfer Buffers for Dialog Boxes

6. Cipher tape drive help

7. TPW : Dialogs and Transfer Buffers

8. Is it possible?

9. Turbo Pascal: Dialogs and transfer buffers

10. OWL: Using Transfer Structures with Dialog Boxes


12. bmp, transfer buffer to window

13. User buffers for 1394 isoch transfers