首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > C++ Builder >

誰有 c++ builder 根據 OpenDialog得到文件路徑后保存 文件的代碼啊解决方案

2012-03-21 
誰有 c++ builder根據 OpenDialog得到文件路徑后保存 文件的代碼啊誰有發來看一下啊 呵呵呵[解决办法]C/C+

誰有 c++ builder 根據 OpenDialog得到文件路徑后保存 文件的代碼啊
誰有發來看一下啊 呵呵呵

[解决办法]

C/C++ code
        PostStream = new TIdMultiPartFormDataStream();        MS = new TMemoryStream();        if (tFORM->PicOpenDialog->ProcessP(SI->PI->FilePath, SI->PI->FileName,            NULL, tFORM->Res.ToInt(), BMP, TBMP, JPG, i, -1))        {            tFORM->LS->Caption = L"旋转图片";            tFORM->PicOpenDialog->Turn(TBMP, BMP, SI->PI->Turn);            tFORM->Image1->CleanupInstance();            //tFORM->Image1->Picture->Graphic = NULL;            tFORM->Image1->Picture->Assign(TBMP);            tFORM->LS->Caption = L"压缩图片";            JPG->Assign(TBMP);            JPG->CompressionQuality = JPG_QUALITY;            JPG->Compress();            tFORM->LS->Caption = L"准备上传";            JPG->SaveToStream(MS);            MS->Seek(0,soFromBeginning);            //这里加入大小检测,在没有gif之前可以不做            PostStream->AddFormField(L"AlbumID", tFORM->Aid);            PostStream->AddObject(L"UpName", L"image/JPEG", MS, SI->PI->FileName + L".jpg");            //tFORM->IdHTTP1->CleanupInstance();            try            {                Result = tFORM->IdHTTP1->Post(UPLOAD_PAGE, PostStream);  //需要加检测            }            catch(Exception &e)            {            }        }
[解决办法]
探讨
C/C++ code
PostStream = new TIdMultiPartFormDataStream();
MS = new TMemoryStream();
if (tFORM->PicOpenDialog->ProcessP(SI->PI->FilePath, SI->PI->FileName,
NULL, tFORM->Res.ToInt(), BMP, TBMP, JPG, i, -1))
{
tFORM->LS->Caption = L"旋转图片";
tFORM->PicOpenDialog->Turn(TBMP, BMP, SI->PI->Turn);
tFORM->Image1->C…

热点排行