prototype void kernel32.RtlMoveMemory(pointer,pointer,long); prototype NUMBER KERNEL.LocalAlloc ( NUMBER, NUMBER ); prototype NUMBER KERNEL.LocalFree(NUMBER); prototype SetText(HWND,LIST); function SetText(hWnd,lsStrBuff) string szText; pointer buff,buffTmp; begin if(ListCount(lsStrBuff) < 1) then return; endif; buff = LocalAlloc(LPTR, ListCount(lsStrBuff) * MAX_PATH); buffTmp = buff; ListGetFirstString(lsStrBuff,szText); szText = szText + "\n"; RtlMoveMemory(buffTmp,&szText,StrLength(szText)); buffTmp += StrLength(szText); szText = ""; while(!ListGetNextString(lsStrBuff,szText)) szText = szText + "\n"; RtlMoveMemory(buffTmp,&szText,StrLength(szText)); buffTmp += StrLength(szText); szText = ""; endwhile; SendMessage(hWnd,WM_SETTEXT,0,buff); LocalFree(buff); end; //////////////////////////////////////// ///dialog message loop////// case DIALOG_INIT: szText = "??????????????????????????????????????"; lst = ListCreate(STRINGLIST); ListAddString(lst,szText,AFTER); ListAddString(lst,szText,AFTER); ListAddString(lst,szText,AFTER); hStatic = GetDlgItem(hwndDlg,STATIC_TEXT_CTRL_ID); SetText(hStatic,lst);