From: Chris Doran [chris_doran@postmaster.co.uk] Sent: Thursday, December 19, 2002 5:05 AM To: Info-VAX@Mvb.Saic.Com Subject: Re: Prob with smg$create_pasteboard taupin974@hotmail.com (taupin974) wrote in message news:... > but the id of the pasteboard is 0 !! It's not created i think !! 0 is a valid pasteboard value. Some of the pasteboard/display/keyboard identifiers are addresses of structs, some are just indexes. > so, how do you create a pasteboard and parse it well ? I'm not sure what you mean by "parse" in this context, but to help, here is another example, in C: #include #include #include /* Colours (DECterm only):- */ #define SMGX_M_BLACK SMG$M_USER1 #define SMGX_M_BLUE SMG$M_USER2 #define SMGX_M_CYAN SMG$M_USER3 #define SMGX_M_GREEN SMG$M_USER4 #define SMGX_M_MAGENTA SMG$M_USER5 #define SMGX_M_ORANGE SMG$M_USER6 #define SMGX_M_WHITE SMG$M_USER7 #define SMGX_M_YELLOW SMG$M_USER8 /* Static descriptors:- */ static $DESCRIPTOR(labdes, "SMG EXAMPLE"); static $DESCRIPTOR(mes1des, "Normal text: abcdefghijklmnopqrstuvwxyz"); static $DESCRIPTOR(mes2des, "Text with CR: \r, LF: \n, VT: \v, FF: \f"); main() { int display, pasteboard; struct dsc$descriptor_s byedes; SMG$CREATE_PASTEBOARD(&pasteboard); SMG$CREATE_VIRTUAL_DISPLAY(&6, &40, &display, &(SMG$M_BLOCK_BORDER|SMG$M_DISPLAY_CONTROLS)); SMG$PASTE_VIRTUAL_DISPLAY(&display, &pasteboard, &2, &2); SMG$LABEL_BORDER(&display, &labdes, &SMG$K_TOP, NULL, &SMGX_M_YELLOW); SMG$PUT_LINE(&display, &mes1des, NULL, &SMGX_M_GREEN); SMG$PUT_LINE(&display, &mes2des, NULL, &SMGX_M_BLUE); /* Build descriptor at run-time */ byedes.dsc$w_length = 3; byedes.dsc$b_dtype = DSC$K_DTYPE_T; byedes.dsc$b_class = DSC$K_CLASS_S; byedes.dsc$a_pointer = "Bye"; SMG$PUT_CHARS_WIDE(&display, &byedes, &3, &8, &(SMG$M_BLINK|SMGX_M_YELLOW)); /* Re-use by changing length and pointer (only):- */ byedes.dsc$w_length = 4; byedes.dsc$a_pointer = "-bye"; SMG$PUT_CHARS_HIGHWIDE(&display, &byedes, &4, &11, &(SMG$M_BLINK|SMG$M_BOLD|SMGX_M_CYAN)); SMG$SET_CURSOR_ABS(&display, &6, &1); } > Didier Morandi wrote in message news:<3DFE51C6.86BE4C4E@Free.fr>... > > When you create a pasteboard, operation that you need to perform only > > once, you get back from the call as a return argument an internal > > identifier, which is actually the pasteboard id. Then you need to use > > this pasteboard id to perform all further operations: paste unpaste etc. > > > > You cannot do any operation to a given pasteboard that you did not > > create by yourself first. > > > > (this brings me 15 years in the past...) > > > > D. > > > > taupin974 wrote: > > > > > > I've a problem with this function : smg$create_pasteboard and i begin > > > with smg. > > > When i examine the return value of the pasteboard creation, i seem > > > that the a pasteboard already exist !! > > > How can i get the id of the existing pasteboard or force the creation > > > a the pasteboard !!