| View previous topic :: View next topic |
| Author |
Message |
Garrett Moderator Team
Joined: 04 Oct 2001 Posts: 2149 Location: A House
|
Posted: Tue Mar 10, 2009 8:39 pm Post subject: Help set up this api |
|
|
I'm trying to find a better way to set the views in the TABLE element. The table dsu from Codescript doesn't seem to give me reliable results when changing the views. I found this info on MSDN, but am not sure how to arrange this in the form of VDS syntax. Can someone help me out?
Thanks,
~Garrett
| Code: |
LVM_SETVIEW Message
Sets the view of a list-view control.
Syntax
To send this message, call the SendMessage function as follows.
lResult = SendMessage(
// returns int in lResult
(HWND) hWndControl,
// handle to destination control
(UINT) LVM_SETVIEW,
// message ID
(WPARAM) wParam,
// = (WPARAM) (DWORD) iView;
(LPARAM) lParam
// = 0; not used, must be zero
);
Parameters
iView
DWORD that specifies the view.
lParam
Must be zero.
Return Value
Remarks
Following are the values for views.
LV_VIEW_DETAILS
LV_VIEW_ICON
LV_VIEW_LIST
LV_VIEW_SMALLICON
LV_VIEW_TILE
Note To use this API, you must provide a manifest specifying Comclt32.dll version 6.0. For more information on manifests, see Enabling Visual Styles.
Message Information
Header commctrl.h
Minimum operating systems Windows XP
|
_________________ 'What you do not want done to yourself, do not do to others.' - Confucius (550 b.c. to 479 b.c.) |
|
| Back to top |
|
 |
SnarlingSheep Professional Member


Joined: 13 Mar 2001 Posts: 759 Location: Michigan
|
Posted: Wed Mar 11, 2009 8:52 am Post subject: |
|
|
This should be the VDS code, but I don't think it will work unless it is compiled and has a manifest file specifying Comclt32.dll version 6.0 like it says.
It may not work at all with VDS.. who knows.
| Code: |
REM LVM_SETVIEW = $1142
REM LV_VIEW_DETAILS = $01
REM LV_VIEW_ICON = $00
REM LV_VIEW_LIST = $03
REM LV_VIEW_SMALLICON = $02
REM LV_VIEW_TILE = $04
DIALOG CREATE,New Dialog,-1,0,491,157
DIALOG ADD,TABLE,TABLE1,6,16,342,144,Column 1[80]|Column 2[80]|Column 3[80]
DIALOG ADD,RADIO,RADIO1,4,366,109,145,Views,Details|Icon|Small Icon|List|Tile,Details,,CLICK
DIALOG SHOW
list add,table1,Item 1A@tab()Item 1B@tab()Item 1C
list add,table1,Item 2
%%hwnd = @strdel(@winexists(~table1),1,1)
loadlib user32.dll
loadlib comctl32.dll
REM Registers and initializes the common control window classes.
%p = @lib(comctl32,InitCommonControls,NIL:,NIL:)
:Evloop
wait event
goto @event()
:RADIO1CLICK
if @equal(@dlgtext(radio1),Details)
%%view = $01
end
if @equal(@dlgtext(radio1),Icon)
%%view = $00
end
if @equal(@dlgtext(radio1),Small Icon)
%%view = $02
end
if @equal(@dlgtext(radio1),List)
%%view = $03
end
if @equal(@dlgtext(radio1),Tile)
%%view = $04
end
%p = @lib(user32,SendMessageA,INT:,INT:%%hwnd,INT:$1142,INT:%%view,INT:0)
if @equal(%p,-1)
WARN SendMessage Failed.
end
goto evloop
:Close
exit
|
_________________ -Sheep
My pockets hurt... |
|
| Back to top |
|
 |
Garrett Moderator Team
Joined: 04 Oct 2001 Posts: 2149 Location: A House
|
Posted: Wed Mar 11, 2009 5:38 pm Post subject: |
|
|
Thanks a bunch, I'll give it a try and find out.  _________________ 'What you do not want done to yourself, do not do to others.' - Confucius (550 b.c. to 479 b.c.) |
|
| Back to top |
|
 |
vdsalchemist Admin Team

Joined: 23 Oct 2001 Posts: 1448 Location: Florida, USA
|
Posted: Thu Mar 12, 2009 3:07 pm Post subject: |
|
|
Garrett,
Why not just use my utils.dsc for changing the table element. Actually it can do quite abit of stuff with the table. Also I think that Aslan has an enhanced version of this DSU that he may share with you. Below is the link to the post about this DSU.
http://forum.vdsworld.com/viewtopic.php?t=4367 _________________ Home of
Give VDS a new purpose!
 |
|
| Back to top |
|
 |
Garrett Moderator Team
Joined: 04 Oct 2001 Posts: 2149 Location: A House
|
Posted: Thu Mar 12, 2009 6:28 pm Post subject: |
|
|
Well.... Mmmmm.... Eeee... It could be that I didn't know about that. But now I do! So I'll take a looksie at that too  _________________ 'What you do not want done to yourself, do not do to others.' - Confucius (550 b.c. to 479 b.c.) |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|