|
i will tell my requirement.one u keep the mouse pointer on the listbox item i will show all the information of that item one's we remove mouse pointer it should close.but not using tooltips
|
|
|
|
|
there is a fuction called ItemFromPoint() for CListBox. so in the mouse move call this function to get the item below the mouse point...
nave
|
|
|
|
|
any examples in our code project.do u know skype.
-- modified at 2:43 Thursday 8th June, 2006
|
|
|
|
|
void ListBoxEx::OnMouseMove( UINT uFlags_i, CPoint point_i )
{
BOOL bOutSide;
int nItem = ItemFromPoint( point_i, bOutSide );
if( FALSE == bOutSide )
{
CString csText;
CListBox::GetText( nItem, csText );
AfxMessageBox( csText );
}
CListBox::OnMouseMove( uFlags_i, point_i);
}
nave
|
|
|
|
|
sorry for disturbing u.
i will tell my problem in the easy way.
in our forum when u we click that question we get the entire information down.
that's way when we click the item in listbox we get the entire information of the item in down only.just like our code project forum.
really sorry for disturbing u.
because it is urgent to me.
tomorrow is my ddead line
|
|
|
|
|
i think u should use CTreeCtrl instead of CListbox to satisfy ur requirment..
nave
|
|
|
|
|
iam also searching this type of code .
so please tell me where i find that code.
vasu
|
|
|
|
|
how do i open a pdf or doc file from VC++ say on a button click.I want to give HELP to my program in the form of a pdf or doc file and want to be able to open it from my application itself.
|
|
|
|
|
Use ShellExecute or ShellExecuteEx
Appu..
"If you judge people, you have no time to love them."
|
|
|
|
|
|
thanks appu... it worked...
"Never Judge a book by its cover.. So you can only judge those u love"
|
|
|
|
|
like this
<br />
::ShellExecute(NULL, "open", "iexplore.exe", "1.htm", NULL, NULL, SW_SHOWNORMAL);
whitesky
|
|
|
|
|
when i enter usename and password it will give that incorrect usename and password plz try later option
even that username and password are in the mysql table users
plz tel me or send me any working code
i make a dialob box in mfc which contain two edit controls one for usename and other for password and a button for login
now i made a table users in mysql which contain user names and passwords
now i want when i click on login button the usename and passwrd conformation is made from mysql table and it then login else not
i use this code but ot not works for me plz tel me the code:::
void CPasswordDlg::OnLog()
{
int i, j, k;
MYSQL * myDB ;
MYSQL_RES * res,*res1;
MYSQL_ROW row,row1;
CString sStr, sPwd;
GetDlgItem(IDC_LOG)->EnableWindow(FALSE);
SetDlgItemText(IDC_STATIC, "Logging in. Please wait...");
if ( (myDB = mysql_init((MYSQL*) 0)) &&
mysql_real_connect( myDB, "localhost", "root", NULL, NULL, MYSQL_PORT, NULL, CLIENT_MULTI_STATEMENTS ) )
{
if ( mysql_select_db( myDB, "gourav") < 0 )
{
SetDlgItemText(IDC_STATIC, "Can't select the database !\nTry later.") ;
goto exit_here;
}
}
else
{
SetDlgItemText(IDC_STATIC, "Can't connect to the mysql server !\nPlease try later.") ;
goto exit_here;
}
GetDlgItemText(IDC_USER, sStr);
GetDlgItemText(IDC_PASS, sPwd);
sStr = "SELECT * FROM Users WHERE UserID=\'" + sStr + "\'";
if ( ! mysql_query( myDB, sStr) )
{
res = mysql_store_result( myDB ) ;
i = (int) mysql_num_rows( res );
if (i != 1)
{
SetDlgItemText(IDC_STATIC, "Incorrect User Name / Password. Please try again.");
mysql_free_result( res ) ;
goto exit_here;
}
if ( (row = mysql_fetch_row( res )) )
{
sStr.Empty();
j = mysql_num_fields( res ) ;
//for ( k = 0 ; k < j ; k++ )
// sStr += (((row[k]==NULL)||(!strlen(row[k])))?"NULL":row[k]) ;
sPwd = (((row[3]==NULL)||(!strlen(row[3])))?"NULL":row[3]);
GetDlgItemText(IDC_PASS, sStr);
sStr = "SELECT PASSWORD(\'" + sStr + "\')";
if ( ! mysql_query( myDB, sStr) )
{
res1 = mysql_store_result( myDB ) ;
if ( (row1 = mysql_fetch_row( res1 )) )
{
sStr = (((row1[0]==NULL)||(!strlen(row1[0])))?"NULL":row1[0]);
if (sStr == sPwd)
{
SetDlgItemText(IDC_STATIC, "Login Successful.");
}
else
SetDlgItemText(IDC_STATIC, "Incorrect User Name / Password. Please try again.");
}
mysql_free_result( res1 ) ;
}
else
SetDlgItemText(IDC_STATIC, "Could not execute query01 on server.") ;
}
mysql_free_result( res ) ;
}
else
SetDlgItemText(IDC_STATIC, "Could not execute query on server.") ;
exit_here:
GetDlgItem(IDC_LOG)->EnableWindow(TRUE);
mysql_close( myDB );
}
hi
-- modified at 2:13 Thursday 8th June, 2006
|
|
|
|
|
I see your code but whats error you said not work but where?
whitesky
|
|
|
|
|
i send modified code that gine incorrect username and password even username and passwrd r in the mysql, table now wat should i do
if u hav code that do this work then tel me
hi
|
|
|
|
|
Why don't you do a debug session and single-step the code?
Then you will know exactly what's going on, and find out where the problem is.
|
|
|
|
|
I DONT FIND THE PROBLEM IN THAT
hi
|
|
|
|
|
your problem is in VC or Sql
whitesky
|
|
|
|
|
iam using MFC(VC++) anmd backend is mysql
hi
|
|
|
|
|
Then please tell us this:
What is your specific problem? What's not working?
What statement dosen't work?
You can't expect anyone to copy your code, clone your database e.t.c. and then come up with a solution.
|
|
|
|
|
i make a dialog box in mfc which contain two edit controls one for usename and other for password and a button for login
now i made a table users in mysql which contain user names and passwords
now i want when i click on login button the usename and passwrd conformation is made from mysql table and it then login else give incorrect
tel me the code
hi
|
|
|
|
|
HI,
I am using a class derived from CSocket in my application. As when the Socket is sending or reciveing a data and the data not came then it gets blocked. There is a CancelBlocking method in the CSocket.
But how can I programaticaly handle it, when one of the application Client or Server stops sending or recieving dta then other application should not gets blocked.
any idea / link
Thanks
Regards.
|
|
|
|
|
zahid_ash wrote: when one of the application Client or Server stops sending or recieving dta then other application should not gets blocked.
Try the CAsyncSocket Class.
Knock out 't' from can't,
You can if you think you can
|
|
|
|
|
I have already used CSocket in my project.
Should I replace CSocket word with CAsyncSocket , woiuld it not disturb the project.
or how can I handle this with CSocket?
Regards.
|
|
|
|
|
zahid_ash wrote: I have already used CSocket in my project.
Should I replace CSocket word with CAsyncSocket , woiuld it not disturb the project.
or how can I handle this with CSocket?
Try it..
As the CSocket is derived from CAsyncSocket class
Knock out 't' from can't,
You can if you think you can
|
|
|
|