Solved

My password program.

Posted on 2001-06-22
6
184 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
Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

 
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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

In days of old, returning something by value from a function in C++ was necessarily avoided because it would, invariably, involve one or even two copies of the object being created and potentially costly calls to a copy-constructor and destructor. A…
This article will show you some of the more useful Standard Template Library (STL) algorithms through the use of working examples.  You will learn about how these algorithms fit into the STL architecture, how they work with STL containers, and why t…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
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.

808 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