Solved

My password program.

Posted on 2001-06-22
6
188 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
[Live Webinar] The Cloud Skills Gap

As Cloud technologies come of age, business leaders grapple with the impact it has on their team's skills and the gap associated with the use of a cloud platform.

Join experts from 451 Research and Concerto Cloud Services on July 27th where we will examine fact and fiction.

 
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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…
Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

626 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