Restored from previous forum. Originally posted by MrVainSCL.
Hi @ all
Is there any way in PB (maybe with API), to add/create ProgressBar stuff (graphic) to a ListViewColumn like in eDonkey or some other comercial programs?
Me is very interested in both versions of following screenshots...
The comlumn of both screenshots should be resizeable in width and not fixed! Many thanks in advance...
PIII450, 256MB Ram, 6GB HD, RivaTNT, DirectX8.1, SB AWE64, Win2000 + all Updates...
greetz
MrVainSCL! aka Thorsten
How to add a ProgressBar to a ListViewColumn?
-
BackupUser
- PureBasic Guru

- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
-
BackupUser
- PureBasic Guru

- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by MrVainSCL.
Hi @ all
Now i have some more infos about how to add/write graphics in ListViews! Its only possible it the propertiy of OwnerDraw is set to true!
After this, you can using the events OnDrawItem (and maybe OnCustomDrawItem) for drawing or write any text outout direct to the entries.
With pure API this should be possible with the messages WM_DRAWITEM and WM_MEASUREITEM
If someone could help me with a small example, it woult be really great! Many thanks in advance...
PIII450, 256MB Ram, 6GB HD, RivaTNT, DirectX8.1, SB AWE64, Win2000 + all Updates...
greetz
MrVainSCL! aka Thorsten
Hi @ all
Now i have some more infos about how to add/write graphics in ListViews! Its only possible it the propertiy of OwnerDraw is set to true!
After this, you can using the events OnDrawItem (and maybe OnCustomDrawItem) for drawing or write any text outout direct to the entries.
With pure API this should be possible with the messages WM_DRAWITEM and WM_MEASUREITEM
If someone could help me with a small example, it woult be really great! Many thanks in advance...
PIII450, 256MB Ram, 6GB HD, RivaTNT, DirectX8.1, SB AWE64, Win2000 + all Updates...
greetz
MrVainSCL! aka Thorsten
-
BackupUser
- PureBasic Guru

- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by Justin.
I never played with ownnerdrawn controls this could be totally wrong and be a waste of time:
set the extended lv style to LVS_OWNERDRAWFIXED (maybe create your own lv control)
set a window callback, process NMLVCUSTOMDRAW msg, it contains a handle to the control device context a rect structure of the area being drawn and item number, try to use the api gdi functions to draw to the rect structure when the CDDS_ITEMPREPAINT notification is sent.
Again this is just a thought, i'll try it by myself if i have time. Maybe your suggested msgs could be the right way, i don't know. It seems that a lot of experimentation is required to do this if you don't know what you are doing.
Here is an example in VC that puts a progress bar control inside a listview instead of drawing:
http://www.codeguru.com/listview/ProgressList.html
Also read:
http://msdn.microsoft.com/library/en-us ... stdraw.asp
I never played with ownnerdrawn controls this could be totally wrong and be a waste of time:
set the extended lv style to LVS_OWNERDRAWFIXED (maybe create your own lv control)
set a window callback, process NMLVCUSTOMDRAW msg, it contains a handle to the control device context a rect structure of the area being drawn and item number, try to use the api gdi functions to draw to the rect structure when the CDDS_ITEMPREPAINT notification is sent.
Again this is just a thought, i'll try it by myself if i have time. Maybe your suggested msgs could be the right way, i don't know. It seems that a lot of experimentation is required to do this if you don't know what you are doing.
Here is an example in VC that puts a progress bar control inside a listview instead of drawing:
http://www.codeguru.com/listview/ProgressList.html
Also read:
http://msdn.microsoft.com/library/en-us ... stdraw.asp
-
BackupUser
- PureBasic Guru

- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm