Go Back   Winamp Forums > Developer Center > Winamp Development

Reply
Thread Tools Search this Thread Display Modes
Old 21st January 2011, 15:37   #1
assualt
Junior Member
 
Join Date: Sep 2010
Posts: 25
Passing value to dialog content

I tried search for user interface but I still cannot get what I were looking for.
Can anyone show me how to display via dialog?

I mean that I don't know how to pass value to Editbox.
Need some codes for guide.


please ignore my bad English.
Thx
assualt is offline   Reply With Quote
Old 21st January 2011, 18:18   #2
assualt
Junior Member
 
Join Date: Sep 2010
Posts: 25
2 more error

I guess there must be stupid question to ask.

But I got this error

Error 1 error C2440: '=' : cannot convert from 'wchar_t *' to 'wchar_t' c:\Documents and Settings\indamoodz\My Documents\Visual Studio 2005\Projects\gen_searchandplay\gen_searchandplay\gen_searchandplay.cpp 77

Error 2 error C2664: 'errno_t wcscpy_s(wchar_t *,rsize_t,const wchar_t *)' : cannot convert parameter 1 from 'wchar_t' to 'wchar_t *' c:\Documents and Settings\indamoodz\My Documents\Visual Studio 2005\Projects\gen_searchandplay\gen_searchandplay\gen_searchandplay.cpp 89


code:
{
int plength=SendMessage(plugin.hwndParent,WM_WA_IPC,0,IPC_GETLISTLENGTH);
int i=0;
wchar_t* filename;
wchar_t msg[255];

playlist *Ptrpl;
Ptrpl=new playlist[plength];

//for(i=1;i<=plength;i++)
//{

filename=(wchar_t*)SendMessage(plugin.hwndParent,WM_WA_IPC,i,IPC_GETPLAYLISTFILE);
Ptrpl[i].index=i;
Ptrpl[i].filename=filename; //for error 1
wchar_t value[512];



extendedFileInfoStructW efs;
efs.filename=(wchar_t*)filename;
efs.metadata=L"BPM";
efs.ret=value;
efs.retlen=512;

SendMessage(plugin.hwndParent,WM_WA_IPC,(WPARAM)&efs,IPC_GET_EXTENDED_FILE_INFOW);
wcscpy_s(Ptrpl[i].bpm,512,value); //for error2

wsprintf(msg,L"filename: %s",Ptrpl[i].bpm);
MessageBox(plugin.hwndParent,msg,L"TEST", MB_OK);
//}
}

assualt is offline   Reply With Quote
Old 21st January 2011, 19:28   #3
DrO
-
 
DrO's Avatar
 
Join Date: Sep 2003
Location: UK
Posts: 22,469
1) all depends on the framework you're going to or trying to use as to how to do that. either way i'd look at msdn and the control reference documentation there.

2) you're mixing up characters and string pointers like with the second error where you're trying to set the whole string into one character space. you need to review what you're trying to store strings in (whatever the 'playlist' object is) and make sure that you've either allocated the memory for a string array or define one specifically. the error code is pretty clear it's a mis-match - i'd suggest you read up on the different variable types and how to use them.

-daz
DrO is offline   Reply With Quote
Old 22nd January 2011, 15:40   #4
assualt
Junior Member
 
Join Date: Sep 2010
Posts: 25
What should I replace them with?

to get all info I need from all the song in playlist.
assualt is offline   Reply With Quote
Reply
Go Back   Winamp Forums > Developer Center > Winamp Development

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump