Dual Display

Question 1:

I would like to run two monitors off of the same PC, each of which
displaying different information.
With a setup like this, is it possible for a single application to write
to both displays, or is it
necessary to run different apps on each?

Qestion 2:

I have a dialog box which I populate with controls dynamically.
Specifically I place about 20 buttons on a pane. For each button
I have been able to attach a callback, but I also want to open another
dialog box on each of these buttons activate event. How do you do this
in code? An short example would be appreciated. I have temporarily
solved the problem by opening the dialog box and unrealizing it until
the
button is pressed - then the callback realizes it.



Thanks,
Ian Todd.

Hello Ian,


Ian Todd wrote:

Question 1:

I would like to run two monitors off of the same PC, each of which
displaying different information.
With a setup like this, is it possible for a single application to write
to both displays, or is it
necessary to run different apps on each?

Yes you can do this only you are going to be interested in location
you´re doing your drawing. For info on setting up your dual monitor
system take a look at the following knowledge base entry.
http://qdn.qnx.com/support/bok/solution.qnx?9490


Qestion 2:

I have a dialog box which I populate with controls dynamically.
Specifically I place about 20 buttons on a pane. For each button
I have been able to attach a callback, but I also want to open another
dialog box on each of these buttons activate event. How do you do this
in code? An short example would be appreciated. I have temporarily
solved the problem by opening the dialog box and unrealizing it until
the
button is pressed - then the callback realizes it.

I think what you’re looking for here is the PtAddCallbacks(). This lets
you add as many callbacks as you want to your widget.
For example:
{
PtWidget_t *button;
int push_button_cb( PtWidget_t *, void *,
PtCallbackInfo_t *);
PtCallback_t callbacks[] = { {push_button_cb, NULL} };

button = PtCreateWidget(PtButton, window, 0, NULL);
PtAddCallbacks(button, Pt_CB_ACTIVATE, callbacks, 1);
}


I hope this helps.

Regards,
Dave B.

Thanks,
Ian Todd.

Apps <apps@qnx.com> wrote:
: I think what you’re looking for here is the PtAddCallbacks(). This lets
: you add as many callbacks as you want to your widget.
: For example:
: {
: PtWidget_t *button;
: int push_button_cb( PtWidget_t *, void *,
: PtCallbackInfo_t *);
: PtCallback_t callbacks[] = { {push_button_cb, NULL} };

: …

: button = PtCreateWidget(PtButton, window, 0, NULL);
: PtAddCallbacks(button, Pt_CB_ACTIVATE, callbacks, 1);
: }

See also the Creating Widgets in Application Code chapter of the Photon
Programmer’s Guide.


Steve Reid stever@qnx.com
TechPubs (Technical Publications)
QNX Software Systems