Click here to Skip to main content
15,899,314 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Loading MFC controls from xml file Pin
ThatsAlok8-Jun-06 19:44
ThatsAlok8-Jun-06 19:44 
QuestionCTabCtrl Drawing problem Pin
Sarath C8-Jun-06 2:27
Sarath C8-Jun-06 2:27 
AnswerRe: CTabCtrl Drawing problem Pin
Viorel.8-Jun-06 2:38
Viorel.8-Jun-06 2:38 
GeneralRe: CTabCtrl Drawing problem Pin
Sarath C8-Jun-06 3:15
Sarath C8-Jun-06 3:15 
GeneralRe: CTabCtrl Drawing problem Pin
Viorel.8-Jun-06 3:57
Viorel.8-Jun-06 3:57 
Questionimage processing using VC++ Pin
gentleguy8-Jun-06 1:53
gentleguy8-Jun-06 1:53 
AnswerRe: image processing using VC++ Pin
ThatsAlok9-Jun-06 1:21
ThatsAlok9-Jun-06 1:21 
QuestionLogin program problem Pin
yogendra kaushik8-Jun-06 1:31
yogendra kaushik8-Jun-06 1:31 
Hello
all of you
i am trying to make a login program in VC++ but, i don't know where i am wrong here
i am writing some of my code below:
Please any one tell me how i make correct my problem

Very Imp:" Actually it's contain two phase for one user name and password
open one form and for another user name and password open another form "
i this code it open only one form call by Admin.DoMolal in between

Code ===
int i, j, k;
MYSQL * Conn ;
MYSQL_RES * res , *res1;
MYSQL_ROW row ,row1;
CString sStr, sPwd,sQry;



GetDlgItem(IDC_LOGIN)->EnableWindow(FALSE);
SetDlgItemText(IDC_STATIC_LOGIN_MSG, "Logging in. Please wait...");


if ( (Conn = mysql_init((MYSQL*) 0)) &&

mysql_real_connect( Conn, "localhost", " ", NULL, NULL, NULL, NULL, CLIENT_MULTI_STATEMENTS ) )
{
if ( mysql_select_db( Conn, "login") < 0 )
{
SetDlgItemText(IDC_STATIC_LOGIN_MSG, "Can't select the database !\nTry later.") ;
goto exit_here;
}
}
else
{
SetDlgItemText(IDC_STATIC_LOGIN_MSG, "Can't connect to the mysql server !\nPlease try later.") ;
goto exit_here;
}

sStr.Empty();
GetDlgItemText(IDC_USERNAME, sStr);
GetDlgItemText(IDC_PASSWORD, sPwd);

sQry="SELECT userid FROM users WHERE 1";
if ( ! mysql_query( Conn, sQry) )
{
res = mysql_store_result( Conn );
i = (int) mysql_num_rows( res );
}

sQry.Empty();
sQry="SELECT password FROM users WHERE 1";
if ( ! mysql_query( Conn,sQry) )
{
res1 = mysql_store_result( Conn );
j = (int) mysql_num_rows( res1 );
}
while((row=mysql_fetch_row(res)) && (row1=mysql_fetch_row(res1)))
{
if((!strcmp(sStr,rowk)) && (!strcmp(sPwd,row1k)))
{
SetDlgItemText(IDC_STATIC_LOGIN_MSG, "Login Successful.") ;
// m_project.DoModal();
m_Admin.DoModal();
break;
}
else
mysql_free_result( res ) ;
mysql_free_result( res1 ) ;
goto exit_here;
}
}

here according my requirment i want that after chack UN & Pass it also open the another form for another use.

Please mail me
AnswerRe: Login program problem Pin
David Crow8-Jun-06 2:58
David Crow8-Jun-06 2:58 
QuestionSetting Rich edit control's width dynamically to fit entire text Pin
Muhammad Azam8-Jun-06 1:16
Muhammad Azam8-Jun-06 1:16 
AnswerRe: Setting Rich edit control's width dynamically to fit entire text Pin
Viorel.8-Jun-06 2:03
Viorel.8-Jun-06 2:03 
GeneralRe: Setting Rich edit control's width dynamically to fit entire text Pin
Muhammad Azam8-Jun-06 2:52
Muhammad Azam8-Jun-06 2:52 
Questionhow to get hard disk id/ serial no Pin
cancerion8-Jun-06 1:13
cancerion8-Jun-06 1:13 
AnswerRe: how to get hard disk id/ serial no Pin
Nishad S8-Jun-06 1:26
Nishad S8-Jun-06 1:26 
AnswerRe: how to get hard disk id/ serial no Pin
_AnsHUMAN_ 8-Jun-06 1:27
_AnsHUMAN_ 8-Jun-06 1:27 
AnswerRe: how to get hard disk id/ serial no [modified] Pin
Mila0258-Jun-06 6:03
Mila0258-Jun-06 6:03 
Questionimage processing using VC++ Pin
gentleguy8-Jun-06 1:12
gentleguy8-Jun-06 1:12 
AnswerRe: image processing using VC++ Pin
Cedric Moonen8-Jun-06 1:16
Cedric Moonen8-Jun-06 1:16 
GeneralRe: image processing using VC++ Pin
kakan8-Jun-06 2:39
professionalkakan8-Jun-06 2:39 
AnswerRe: image processing using VC++ [modified] Pin
Muhammad Azam8-Jun-06 1:27
Muhammad Azam8-Jun-06 1:27 
QuestionIs it possible to store a file, in BLOG datatype column in Oracle Pin
maharaja pandian8-Jun-06 1:04
maharaja pandian8-Jun-06 1:04 
QuestionAbout MFC Pin
Aqueel8-Jun-06 0:48
Aqueel8-Jun-06 0:48 
AnswerRe: About MFC Pin
Sarath C8-Jun-06 0:55
Sarath C8-Jun-06 0:55 
GeneralRe: About MFC Pin
Aqueel8-Jun-06 1:10
Aqueel8-Jun-06 1:10 
GeneralRe: About MFC Pin
Sarath C8-Jun-06 2:11
Sarath C8-Jun-06 2:11 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.