Solved

My password program.

Posted on 2001-06-22
6
185 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
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
C++ standard library based binary archive format 6 104
is twain_32.dll cmpatible with windows 10 ? 10 184
I could not build boost code, 10 94
Safe conversion? 4 72
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…
Many modern programming languages support the concept of a property -- a class member that combines characteristics of both a data member and a method.  These are sometimes called "smart fields" because you can add logic that is applied automaticall…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

840 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