|
I suppose "char * Name " field of all of your sIPlaylist objects keeps a pointer to a string which is build by gTrackName function. This string is overwritten by each execution of gTrackName function, that’s why you only see the last value.
A solution is to keep the name inside the sIPlaylist structure. You can first define it as
struct sIPlaylist
{
char Name[100];
int Position;
}; and then use string-copy function:
strcpy(tmp.Name, gTrackName(i));
In more elaborated program, you should use dynamic allocation, or better get the assistance of std::string class from STL. In MFC projects, you can use CString class.
I hope it helps.
|
|
|
|
|
Thank you thats what i was doing wrong! i can now call back all the information thank you!
|
|
|
|
|
i put the popup menu when we right click the listbox item.
by doing this follwing things.
1.i create a new class CMyList derived from CListBox
2. in that class i overwrite the COntext menu()
by following code
HMENU hmenu,hmenuPopup;
hmenu = LoadMenu(AfxGetApp()->m_hInstance,(LPCTSTR) IDR_MENU4);
hmenuPopup = GetSubMenu(hmenu, 0);
TrackPopupMenu(hmenuPopup, TPM_LEFTALIGN | TPM_LEFTBUTTON|TPM_RIGHTBUTTON,point.x,point.y, 0,m_hWnd, NULL);
.
now how can i handle this events.
|
|
|
|
|
if you write this code now what do you need i think you declare contextmenu
whitesky
|
|
|
|
|
|
I think you can add the TPM_RETURNCMD flag to the second parameter of TrackPopupMenu function. In this case the function will return the ID of the clicked menu item, or zero otherwise. Then do the action according to received ID.
|
|
|
|
|
hi,
I have one clarification, I just want to know how to call stored
procedures in CDaoDatabase.
After the submit button I need to call one stored procedure by name
STORE_PROCEDURE1 with input parameters as
name,no,mark1,mark2
By using ADO I think we can use like this below. I just want to know how
to use in DAO.
With AdoComm
.CommandText = "{call PROEX.KPP_LFE.PPP_INSTPP_EMBARQUE_AUX(?)}"
.CommandType = adCmdStoredProc
Set AdoParamRet = .CreateParameter("Retorno", adBSTR, adParamInputOutput,
, vfRsEmb)
Call .Parameters.Append(AdoParamRet)
.Properties("PLSQLRSet") = True
Set vfRsEmbRet = .Execute
i want to do the same thing in DAO using CDaoDatabse
Try again and again,
At last you will say
I don't know the meaning for impossible.,.
|
|
|
|
|
When you send a "New Message" we can see it and you don't need to send a new thread
whitesky
|
|
|
|
|
|
in Richedit i insert table than i need to set cursor position inside the table but i get it after table last row
chetan
|
|
|
|
|
how did you insert the table in the edit
ajeeshcv
|
|
|
|
|
in MFC control rich edit, i insert bitmap and table and save in file through streamout of msdn fun as .rtf file it save perfectly but when same file try to lode in richedit it load only table or text not bitmap , i use the class streamin for load in richedit of msdn
chetan Sheladiya
|
|
|
|
|
hi,
I have one clarification, I just want to know how to call stored
procedures in CDaoDatabase.
After the submit button I need to call one stored procedure by name STORE_PROCEDURE1 with input parameters as name,no,id,mark1,mark2
By using ADO, I think we can use like this below. I just want to know how to use in DAO.
With AdoComm
.CommandText = "{call PROEX.KPP_LFE.PPP_INSTPP_EMBARQUE_AUX(?)}"
.CommandType = adCmdStoredProc
Set AdoParamRet =.CreateParameter("Retorno", adBSTR, adParamInputOutput,
,vfRsEmb)
Call .Parameters.Append(AdoParamRet)
.Properties("PLSQLRSet") = True
Set vfRsEmbRet = .Execute
reply early
Try again and again,
At last you will say
I don't know the meaning for impossible.,.
|
|
|
|
|
hi plz tell me
in sdi application how we can go from one form to another form
as i dialog based we use domodal()
but we can use in sdi from one form to another
Ashish Dogra
MCA
Noida
|
|
|
|
|
Create your sdi application with a form view
|
|
|
|
|
yes sir i create it with form view but then i create a second form whose base class is CMDIChildWnd wher split window is created .
now i want to go from first forms menu to second form .
Ashish Dogra
MCA
Noida
|
|
|
|
|
Your second form should also be derived from CFormView. Use SetActiveView() of your mainframe window to switch between your forms.
|
|
|
|
|
Do you need to call one dialog
whitesky
|
|
|
|
|
sir i need to call a form
on which split window is shown
Ashish Dogra
MCA
Noida
|
|
|
|
|
Hope I understood your question
if you want to call dialog you can use from a variable from your dialog and use m_dialog.Create(ID_DIALOG) in your program and use m_dialog.Show(1);
whitesky
|
|
|
|
|
hi sir plz solve my problem
Ashish Dogra
MCA
Noida
|
|
|
|
|
Hi guys this is rocky.
I got stuck in a problem plz help me.
I want to read a text file which is having unciode charachters in C/C++.
i m using normaal fopen function but can't get the result fine..
here is the small peace of codeee
if ((fp = fopen("d:/GRCasual.txt", CFile::modeRead|CFile::typeBinary)) == NULL)
{
return 0;
}
while(!feof(fp))
{
/*fseek(fp,sizeof(char),SEEK_CUR); */
retbuf = fgets(buf, 200, fp);
}
thnx in advance guys ............
i m waitin for ur replies..........
Best Regards
Rocky
|
|
|
|
|
Declare the "buf" parameter in fgets(buf, 200, fp) as wchar_t type.
Jubin Chawda
braindrain1@rediffmail.com
-----------------------------
Come online at:-
fitiyal@yahoo.com
|
|
|
|
|
i m gettin an exception that
error C2664: 'fgets' : cannot convert parameter 1 from 'wchar_t *' to 'char *'
what abt this
thnx in advance
Best Regards
Rocky
|
|
|
|
|
Try fgetws instead of fgets .
(However it is unlikely that your second parameter of fopen will work).
|
|
|
|