i use the RichViewEdit controller in my application¡£
i use ctrl + c in word(*.docx 2007) file, ctrl + v to rve, rve can accept the TRVMarkerItemInfo item£¬
i use the following code convert TRVMarkerItemInfo to TRVTextItemInfo£¬but it result WideString is null
Code: Select all
s = "";
this->rve->GetListMarkerInfo(i, listNo, level, startFrom, useStartFrom);
if (listNo >= this->rve->Style->ListStyles->Count) {
listNo = this->rve->Style->ListStyles->Count - 1;
}
if (listNo >= 0) {
listStyle = this->rve->Style->ListStyles->Items[listNo];
if (level >= listStyle->Levels->Count) {
level = listStyle->Levels->Count - 1;
}
if (level >= 0) {
if (listStyle->Levels->Items[level]->ListType == rvlstUnicodeBullet) {
s = listStyle->Levels->Items[level]->FormatStringW;
} else {
//use debug, run in here
s = WideString(TRVMarkerItemInfo(this->rve->GetItem(i)).DisplayString);
}
}
}
// result: s is ""
2. i want iterator all items in rve and get image size:
Code: Select all
TCustomRVItemInfo *curItemInfo = NULL;
for (int i=0; i< this->rve->ItemCounts; i++) {
curItemInfo = this->rve->GetItem(i);
printf("WxH: %dx%d.\n", curItemInfo->GetImageWidth(), curItemInfo->GetImageHeight());
}
WxH: 0x0.
can you tell me, how to get to the item image size? thanks.
note: i use RichView 14.12.6 version.
thank you very much¡£