//------------------------------+ // DispWindow constructor | //------------------------------+ DispWindow::DispWindow( IWindow* dw) : IMultiCellCanvas( idwin,dw,dw) { IPresSpaceHandle hps; hps = IPresSpaceHandle(); ICommandHandler::handleEventsFor( this ); IMouseClickHandler::handleEventsFor( this ); setColor(IColor(IColor::cyan)); output = new IStaticText(DSP_ID,this,this); output->setText("OPENDOC+ICLUI"); IFont tempFont; tempFont.setOutline(true); tempFont.setPointSize(15); tempFont.setName("Helv"); output->setFont(tempFont); output->setAlignment(IStaticText::centerRight); addToCell(output,1,1); setRowHeight(1,5,true); setColumnWidth(1,10,true); output->setAutoDeleteObject(); setAutoDeleteObject(); }
void ICLSetOutput(HWND hwnd, char* pstr) { DispWindow* DpInstance; long x; Boolean flag; ISize tempSize; IFont tempFont; IPresSpaceHandle hps; DpInstance =(DispWindow*)IWindow::windowWithHandle(hwnd); if(DpInstance) { if(pstr) { hps=DpInstance->presSpace(); tempSize=DpInstance->size(); x=tempSize.height(); tempSize.setWidth(x); tempFont.setName("Helv"); tempFont.setPointSize(x/2); tempFont.setOutline(true); tempFont.beginUsingFont(hps); DpInstance->output->setFont(tempFont); DpInstance->output->setText(pstr); DpInstance->refresh(true); } } }