Solved

My password program.

Posted on 2001-06-22
6
182 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
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
This article shows you how to optimize memory allocations in C++ using placement new. Applicable especially to usecases dealing with creation of large number of objects. A brief on problem: Lets take example problem for simplicity: - I have a G…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
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.

707 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

15 Experts available now in Live!

Get 1:1 Help Now