Home » Community » Newbie corner » Get volume name of shares ... (Try to get a shares volume name)
Re: Get volume name of shares ... [message #56210 is a reply to message #56207] |
Mon, 08 February 2021 23:18   |
dschoni
Messages: 15 Registered: January 2021 Location: Switzerland
|
Promising Member |
|
|
I'm using a tree and some modifications on the library files:
----------------------------------------------------------------------------------------
used mods
----------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------
FileSel.h: adding
----------------------------------------------------------------------------------------
Image GetDirIcon(const String& s);
----------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------
CtrlLib.h:
----------------------------------------------------------------------------------------
#define NEWSTYLE
----------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------
TreeCtrl.cpp:1023
----------------------------------------------------------------------------------------
if(yh >= 0 && yl < sz.cy) {
int x = levelcx + levelcx * l.level + levelcx2 - org.x;
#ifdef NEWSTYLE
#else
w.DrawRect(x, yl, 1, yh - yl, SColorShadow);
#endif
}
TreeCtrl.cpp:1051
if(w.IsPainting(0, y, sz.cx, msz.cy) && msz.cy > 0) {
if (multiroot) {
if(m.canopen || m.child.GetCount()) {
#ifdef NEWSTYLE
Image im = m.isopen ? CtrlImg::SmallDown() : CtrlImg::SmallRight();
#else
Image im = m.isopen ? CtrlImg::treeminus() : CtrlImg::treeplus();
#endif
op -= CtrlImg::cross().GetSize() / 2;
w.DrawImage(op.x, op.y, imgEmpty);
}
}
else {
#ifdef NEWSTYLE
#else
w.DrawRect(op.x, op.y, levelcx2, 1, SColorShadow);
#endif
if(m.canopen || m.child.GetCount()) {
#ifdef NEWSTYLE
Image im = m.isopen ? CtrlImg::SmallDown() : CtrlImg::SmallRight();
#else
Image im = m.isopen ? CtrlImg::treeminus() : CtrlImg::treeplus();
#endif
op -= im.GetSize() / 2;
w.DrawImage(op.x, op.y, im);
}
}
w.DrawImage(x, y + (msz.cy - isz.cy) / 2, m.image);
x += isz.cx;
Color fg, bg;
dword st;
Size csz = m.GetCtrlSize();
if(m.ctrl && !highlight_ctrl) // 2008-04-08 mrjt
x += csz.cx;
if(x < sz.cx) {
const Display *d = GetStyle(i, fg, bg, st);
int ctx = highlight_ctrl * csz.cx;
Rect br = RectC(x, y, vsz.cx + 2 * m.margin + ctx, msz.cy);
if(!IsNull(m.value) || m.ctrl && highlight_ctrl) {
#ifdef NEWSTYLE
#else
w.DrawRect(br, bg);
#endif
Rect r = RectC(x + ctx + m.margin, y + (msz.cy - vsz.cy) / 2, vsz.cx, vsz.cy);
w.Clip(r);
d->Paint(w, r, m.value, fg, bg, st);
w.End();
}
if(i == cursor && !nocursor && multiselect && GetSelectCount() != 1 && HasFocus()
&& !IsDragAndDropTarget())
DrawFocus(w, br, st & Display::SELECT ? SColorPaper() : SColorText());
}
}
----------------------------------------------------------------------------------------
If there is an easier way to modify the tree, I would be glad to hear.
Best Regards, Daniel
[Updated on: Mon, 08 February 2021 23:19] Report message to a moderator
|
|
|
 |
|
Get volume name of shares ...
By: dschoni on Mon, 08 February 2021 22:11
|
 |
|
Re: Get volume name of shares ...
By: dschoni on Mon, 08 February 2021 22:31
|
 |
|
Re: Get volume name of shares ...
By: dschoni on Mon, 08 February 2021 23:18
|
 |
|
Re: Get volume name of shares ...
By: koldo on Tue, 09 February 2021 22:00
|
 |
|
Re: Get volume name of shares ...
By: dschoni on Wed, 10 February 2021 16:44
|
 |
|
Re: Get volume name of shares ...
By: koldo on Wed, 10 February 2021 20:33
|
 |
|
Re: Get volume name of shares ...
By: koldo on Thu, 11 February 2021 08:39
|
 |
|
Re: Get volume name of shares ...
By: dschoni on Sun, 14 February 2021 13:52
|
 |
|
Re: Get volume name of shares ...
By: koldo on Mon, 15 February 2021 08:18
|
 |
|
Re: Get volume name of shares ...
By: mirek on Mon, 15 February 2021 11:21
|
 |
|
Re: Get volume name of shares ...
By: mirek on Wed, 10 February 2021 15:22
|
 |
|
Re: Get volume name of shares ...
By: dschoni on Wed, 10 February 2021 18:08
|
 |
|
Re: Get volume name of shares ...
By: mirek on Wed, 10 February 2021 21:01
|
 |
|
Re: Get volume name of shares ...
By: dschoni on Sun, 14 February 2021 14:21
|
Goto Forum:
Current Time: Sun Aug 31 06:15:12 CEST 2025
Total time taken to generate the page: 0.03236 seconds
|