|
plz can u send me code which help me as i do with this but it changes its position
and i want to move text regularly
plzzzzzzz
Please mail me
|
|
|
|
|
What do you need its not hard
whitesky
|
|
|
|
|
You can use MoveWindow() to set the coordinates of the static control
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
plz can u tel me some example of theat how it works
Please mail me
|
|
|
|
|
Suppose you have a dialog with a button on it. The dialog also has a static control with a variable associated as m_statictext. Now when you click the button the window changes its position. Say moves to (0,0) with some size.
This is only a general example. You will have to create a timer and then keep on changing the position of the window as per your requirement.(Also check for bounds)
//To test you can write this code on the click of the button and see the window changing its position
m_statictext.MoveWindow(CRect(0,0,100,100),1);
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
yes use MoveWindow or SetWindowPos
and if you need to timer in your program use SetTimer(500,1,NULL); (of course i suggest see MSDN for SetTimer)
then declare WM_TIMER message
void CAnswer::OnTimer(UINT nIDEvent)
{
}
in the end use KillTimer(500);
----------------
for static control insert one static in form and change id and declare a variable for this control
whitesky
|
|
|
|
|
Hi Friends,
I wanna some help on WinInet Programming.
I am writing a VC++ client which is supposed to communicate a web Server
written in C#.net.
I am able to send a request to Web Server but how to read the contents send by
WebServer can anybody help me in this ?
Following is my code:
HINTERNET hOpen,hConnect,hRequest;
BOOL retval;
DWORD dwErrorCode;//=12032;
CString data="cmdCreateSessionID";
hOpen=InternetOpen("HttpApp/1.0",
INTERNET_OPEN_TYPE_PRECONFIG,NULL,NULL,0);
hConnect=InternetConnect(hOpen,
SERVER_LAN_NAME,4000,
NULL,NULL,
INTERNET_SERVICE_HTTP,0,0);
CString method="POST";
CString url="index.html";
DWORD dwFlags=0;
hRequest=HttpOpenRequest(hConnect,method,url,
NULL, NULL, NULL, dwFlags, 0);
DWORD R1=GetLastError();
HttpSendRequest(hRequest,NULL,0,data.GetBuffer(),
data.GetLength());
dwErrorCode = hRequest ? ERROR_SUCCESS : GetLastError();
CString lpBuffer;
INTERNET_BUFFERS dwStruct;
DWORD dwNumberOfBytesToRead,dwNumberOfBytesRead;
dwNumberOfBytesRead=dwNumberOfBytesToRead=0;
BOOL retReadFile=InternetReadFile(hRequest,&lpBuffer,dwNumberOfBytesToRead,
&dwNumberOfBytesRead);
In the InternetReadFile function i am unable to read any buffer.
With Rgds
VC++
Girish
Software Developer
|
|
|
|
|
I want to read from Excel file. Pls provide me with any class or sample project that i can use with my application.
|
|
|
|
|
|
you can find the CRecordset in the web...
it can open the excel as database
void CExDlg::OnRead()
{
// TODO: Add your control notification handler code here
CDatabase database;
CString sDriver;
CString sDsn;
CString sFile,sPath;
//find the excel in main exe folder
GetModuleFileName(NULL,sPath.GetBufferSetLength (MAX_PATH+1),MAX_PATH);
sPath.ReleaseBuffer ();
int nPos;
nPos=sPath.ReverseFind ('\\');
sPath=sPath.Left (nPos);
sFile = sPath + "\\Demo.xls"; //name of excel
sDsn.Format("ODBC;DRIVER={%s};DSN='';DBQ=%s", sDriver, sFile);
TRY
{
database.Open(NULL, false, false, sDsn);
CRecordset recset(&database);
CString sSql;
sSql = "SELECT item FROM Regt WHERE item = 'iwant' "; //
// exe SQL
recset.Open(CRecordset::forwardOnly, sSql, CRecordset::readOnly);
BYTE line = 1;
// »ñÈ¡²éѯ½á¹û
while (!recset.IsEOF())
{
//¶ÁÈ¡ExcelÄÚ²¿ÊýÖµ
recset.GetFieldValue("item", sitem); // read out the item
line++;
//ÏÔʾ¼ÇÈ¡µÄÄÚÈÝ
m_listbox.AddString( sitem);
// ÒƵ½ÏÂÒ»ÐÐ
recset.MoveNext();
}
// close
database.Close();
}
CATCH(CDBException, e)
{
// Êý¾Ý¿â²Ù×÷²úÉúÒ쳣ʱ...
AfxMessageBox("error: " + e->m_strError);
}
END_CATCH;
}
|
|
|
|
|
Hi All,
I am unable to find which library file(.lib) need to use for this program.
Here i am including my code.
#include <stdio.h>
#include <fileref.h>
#include "tag.h"
using namespace std;
using namespace TagLib;
int main(int argc, char *argv[])
{
TagLib::FileRef f("DEV.mp3");
if(!f.isNull() && f.tag()) {
TagLib::Tag *tag = f.tag();
cout << "-- TAG --" << endl;
cout << "title - \"" << tag->title() << "\"" << endl;
cout << "artist - \"" << tag->artist() << "\"" << endl;
cout << "album - \"" << tag->album() << "\"" << endl;
cout << "year - \"" << tag->year() << "\"" << endl;
cout << "comment - \"" << tag->comment() << "\"" << endl;
cout << "track - \"" << tag->track() << "\"" << endl;
cout << "genre - \"" << tag->genre() << "\"" << endl;
}
return 0;
}
can anyone please help me for this problem.
waiting 4 ur earlier reply
bye
Trinadh
|
|
|
|
|
tag.lib?
Maybe check the documentation associated with that library and see what you're supposed to use. Is it an sdk that you need to install?
- S
50 cups of coffee and you know it's on!
|
|
|
|
|
Thanx for your response.
I have downloaded TagLib 1.4, but i couldn't found any .lib file in that. I think that i have to use tag.lib or taglib.lib file.
If u know the path where it exists can u please give me the path where it exists. I haven't used any SDK, i just used TagLib namespace.
http://developer.kde.org/~wheeler/taglib.html. I found whole documentation about TagLib in this link but It doesn't mention which .lib file i need to include.
waiting 4 ur reply.
regards
Trinadh.
|
|
|
|
|
Maybe TagLib is supplied in source files ? So, you just need to add the source files to your project and that will work (not sure if this is the case thought)
Cédric Moonen
Software developer
Charting control
|
|
|
|
|
I have supplied source files taglib.h and tag.h, i am getting linker error like this.I need to include .lib file in link part of project->settings along with including .h file.
errors:
tagreader.obj : error LNK2001: unresolved external symbol "public: virtual __thiscall TagLib::FileRef::~FileRef(void)" (??1FileRef@TagLib@@UAE@XZ)
tagreader.obj : error LNK2001: unresolved external symbol "public: virtual __thiscall TagLib::String::~String(void)" (??1String@TagLib@@UAE@XZ)
tagreader.obj : error LNK2001: unresolved external symbol "class std::basic_ostream<char,struct std::char_traits<char=""> > & __cdecl operator<<(class std::basic_ostream<char,struct std::char_traits<char=""> > &,class TagLib::String const &)" (??6@YAAAV?$
basic_ostream@DU?$char_traits@D@std@@@std@@AAV01@ABVString@TagLib@@@Z)
tagreader.obj : error LNK2001: unresolved external symbol "public: class TagLib::Tag * __thiscall TagLib::FileRef::tag(void)const " (?tag@FileRef@TagLib@@QBEPAVTag@2@XZ)
Regards
Trinadh
|
|
|
|
|
Do you have any .c or .cpp (or even .cxx) files supplied with ? If yes, you need to add these too to your project.
Cédric Moonen
Software developer
Charting control
|
|
|
|
|
yes i have tag.cpp file. I have added that file to my project. Again i am getting linker errors as previous.
like
tagreader.obj : error LNK2001: unresolved external symbol "public: virtual __thiscall TagLib::FileRef::~FileRef(void)" (??1FileRef@TagLib@@UAE@XZ)
tagreader.obj : error LNK2001: unresolved external symbol "public: virtual __thiscall TagLib::String::~String(void)" (??1String@TagLib@@UAE@XZ)
|
|
|
|
|
You need to unzip the source files in taglib-1.4.tar.gz and build the "lib" file, which looks to be targeted for *nix.
If you're targeting Windows, you might need to do some more research http://developer.kde.org/~wheeler/taglib.html#windows[^] or find another library.
- S
50 cups of coffee and you know it's on!
|
|
|
|
|
Thanx again.
I have unzipped taglib-1.4 file. As i am new to vc++ and c++, could u please tell me how to build "lib" file. I came to know that it works fine wiht Unix and Linux.
If u know any procedure to retrieve details of mp3 file in windows, please let me know.
waiting 4 ur reply
Regards
Trinadh
|
|
|
|
|
Like this http://developer.kde.org/~wheeler/taglib.html#windows[^] says, this library needs to be ported to Windows. Google didn't reveal much, except some message posts about porting, so you might be out of luck (I don't have the time to port it and I don't know of any other libraries - try google)
|
|
|
|
|
thanks for spending valuable time with me Mr.Steve.
I got so much of information from u. If u find any information regarding this please let me know.
bye
Trinadh
|
|
|
|
|
On a side note, there appear to be several articles on MP3 info reading on CP (search for MP3 at the top). Not sure if there are any C++ articles, but you might find some useful information or links in them.
|
|
|
|
|
if you have a zip file (tag) i think in this zip you can find lib file if it doesnt has lib file (i think) you can find lib file in place that you download this file
whitesky
|
|
|
|
|
Thanks whitesky,
I couldn't find any lib file (tag.lib or taglib.lib) in my system. I think i need to build "lib" file with existing files. They said to use
TagLib provides a script called taglib-config that returns the necessary compiler and linker flags, as well as the version number. To build a small sample program one would use:
g++ taglib-test.cpp `taglib-config --cflags --libs` -o taglib-test
in Unix and Linux.But i am unable to find how to build "lib" file in windows. Could u please suggest me how to build lib file.
waiting 4 ur reply
Regards
Trinadh
|
|
|
|
|