forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Help set up this api

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
Garrett
Moderator Team


Joined: 04 Oct 2001
Posts: 2149
Location: A House

PostPosted: Tue Mar 10, 2009 8:39 pm    Post subject: Help set up this api Reply with quote

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
View user's profile Send private message
SnarlingSheep
Professional Member
Professional Member


Joined: 13 Mar 2001
Posts: 759
Location: Michigan

PostPosted: Wed Mar 11, 2009 8:52 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
Garrett
Moderator Team


Joined: 04 Oct 2001
Posts: 2149
Location: A House

PostPosted: Wed Mar 11, 2009 5:38 pm    Post subject: Reply with quote

Thanks a bunch, I'll give it a try and find out. Smile
_________________
'What you do not want done to yourself, do not do to others.' - Confucius (550 b.c. to 479 b.c.)
Back to top
View user's profile Send private message
vdsalchemist
Admin Team


Joined: 23 Oct 2001
Posts: 1448
Location: Florida, USA

PostPosted: Thu Mar 12, 2009 3:07 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Garrett
Moderator Team


Joined: 04 Oct 2001
Posts: 2149
Location: A House

PostPosted: Thu Mar 12, 2009 6:28 pm    Post subject: Reply with quote

Well.... Mmmmm.... Eeee... It could be that I didn't know about that. Sad But now I do! Smile So I'll take a looksie at that too Smile
_________________
'What you do not want done to yourself, do not do to others.' - Confucius (550 b.c. to 479 b.c.)
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Page 1 of 1

 
Jump to:  
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

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group