Solved

My password program.

Posted on 2001-06-22
6
183 Views
Last Modified: 2010-04-02
When I using C programming to do the program for my customers. My customers ask me to do the password program for him. At the same times, they want me to do my password program in special features.
The special feature they want are the password program can come out with different module when they key in different password.

For example:When they key in cyber,the module come out in popup menu are purchase menu and Inventory menu.But they key in ADCS, the screen will come out accounting menu in popup menu.

I just want some coding in C programming and I do no want the explaination.

Thank you very much
daniel  
0
Comment
Question by:daniel_9167
6 Comments
 
LVL 30

Expert Comment

by:Axter
ID: 6218719
Please respond to previous comments posted on your other question before posting a new question.
0
 
LVL 7

Expert Comment

by:KangaRoo
ID: 6221503
The other question is quit different and asked only 10 minutes before this one, which is asked 10 minutes before the first comment appeared in the other question and less than an hour before your comment here, Axter. Not everyone is constantly online.
0
 
LVL 30

Expert Comment

by:Axter
ID: 6221539
I did not realize that.  I apologize for my previous post.
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 1

Accepted Solution

by:
ua1zcl earned 50 total points
ID: 6222233
daniel_9167, you asked an example?

//password.cpp     win32
#include <windows.h>
#include <stdio.h>
#include "password.rh"

//password dialog box with password style edit & button IDOK
bool CALLBACK Dlg1Proc(HWND hwnd1,UINT msg,WPARAM wParam,LPARAM lParam)
{
 if(msg==WM_COMMAND)
 {
  if(LOWORD(wParam)!= IDOK)return 0;
  char str[128]; int i; // password is 123
  char szPassword[]="321";
  GetWindowText(GetDlgItem(hwnd1,IDC_EDIT1),str,sizeof str);
  if(strcmp(strrev(szPassword),str)==0)i=777;
  else i=0;
  EndDialog(hwnd1,i);
 }
 if(msg==WM_CLOSE){ EndDialog(hwnd1,0);}
 UNREFERENCED_PARAMETER(lParam);
 return 0;
}
//programm dialog box
bool CALLBACK Dlg2Proc(HWND hwnd2,UINT msg,WPARAM wParam,LPARAM lParam)
{
 if(msg==WM_CLOSE){ EndDialog(hwnd2,0);}
 UNREFERENCED_PARAMETER(lParam); UNREFERENCED_PARAMETER(wParam);
 return 0;
}
// winmain
int WINAPI WinMain (HINSTANCE hInst,HINSTANCE hPInst,PSTR szArgs,int iMode)
{ iMode; szArgs; hPInst;
 start:
 if( DialogBox(hInst,MAKEINTRESOURCE(IDD_DIALOG1),0,(DLGPROC)Dlg1Proc)!=777)
 { MessageBeep(0);
     if(MessageBox(0,"Password not correct.\n  Try again?","Enter password",
     MB_YESNO|MB_ICONQUESTION|MB_SYSTEMMODAL)==IDNO)return 0;
     goto start;
 }
 DialogBox(hInst,MAKEINTRESOURCE(IDD_DIALOG2),0,(DLGPROC)Dlg2Proc);
 return 0;
}
// endof password.cpp

//password.rh
#define IDD_DIALOG2     2
#define IDC_STATICTEXT1     101
#define IDD_DIALOG1     1
#define IDC_EDIT1     101
// endof password.rh

//password.rc
#include <windows.h>
#include "password.rh"

IDD_DIALOG1 DIALOG 140, 96, 95, 67
EXSTYLE WS_EX_DLGMODALFRAME | WS_EX_TOPMOST
STYLE DS_SYSMODAL | DS_MODALFRAME | DS_3DLOOK | WS_POPUP | WS_VISIBLE | WS_CAPTION
CAPTION "    Enter password"
FONT 8, "MS Sans Serif"
{
 CONTROL "", IDC_EDIT1, "edit", ES_LEFT | ES_PASSWORD | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_TABSTOP, 10, 12, 76, 14
 CONTROL "OK", IDOK, "BUTTON", BS_DEFPUSHBUTTON | BS_CENTER | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 24, 44, 50, 14
}

IDD_DIALOG2 DIALOG 80, 50, 139, 46
EXSTYLE WS_EX_DLGMODALFRAME | WS_EX_TOPMOST
STYLE DS_SYSMODAL | DS_MODALFRAME | DS_3DLOOK | WS_OVERLAPPED | WS_VISIBLE | WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX
CAPTION "Secret programm"
FONT 10, "MS Sans Serif"
{
 CONTROL "You passed to secret programm !", IDC_STATICTEXT1, "static", SS_LEFT | WS_CHILD | WS_VISIBLE, 18, 6, 120, 12
}
// endof password.rc
0
 
LVL 11

Expert Comment

by:griessh
ID: 6820041
I think you forgot this question. I will ask Community Support to close it unless you finalize it within 7 days. Unless there is objection or further activity,  I will suggest to accept "ua1czl" comment(s) as an answer.

If you think your question was not answered at all, you can post a request in Community support (please include this link) to refund your points.
The link to the Community Support area is: http://www.experts-exchange.com/jsp/qList.jsp?ta=commspt

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
======
Werner

0
 

Expert Comment

by:ComTech
ID: 6837701
Answer accepted by:

ComTech
Community Support Admin
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
What does std::atomic give me? 7 114
IdTelnet1DataAvailable handler freezes the Application 4 68
Grammars for C C++ and java 1 114
convert char array to number in c 5 83
When writing generic code, using template meta-programming techniques, it is sometimes useful to know if a type is convertible to another type. A good example of when this might be is if you are writing diagnostic instrumentation for code to generat…
Errors will happen. It is a fact of life for the programmer. How and when errors are detected have a great impact on quality and cost of a product. It is better to detect errors at compile time, when possible and practical. Errors that make their wa…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now