|
-
Sep 4th, 2001, 09:53 AM
#1
Thread Starter
Fanatic Member
This CODE is...
PHP Code:
//Sviesoft Corporation(r)
//Copyright(c) 1999 - 2001
//All Rights Reserved
//
//Thanks to God, my Mom and the people
//that have supported me all these years
//
//God Bless you all, Amen
//////////////////////////////////////////////////
//MONEY DISTRIBUTOR DATABASE FOR CHRISTIAN CAMP//
////////////////////////////////////////////////
//PROVIDED BY TOM ZHANG
#include <windows.h>
#include <iostream>
#include <fstream>
using namespace std;
const char tzID[]="myWindowClass";
char distributoR[MAX_PATH];
char datA[MAX_PATH];
HINSTANCE hInst;
HWND LABEL1;
#define BUT1 1
#define TEX1 2
LRESULT CALLBACK WndProc(HWND hwnd,UINT msg,WPARAM wParam,LPARAM lParam){
ofstream PO("distributor.dis");
ifstream PP("distributor.dis");
switch(msg){
case WM_SHOWWINDOW:
CHECKDATA:if(!PP.is_open()){MessageBox(hwnd,"Error while trying to get the DataBase file","",0);exit (1);}while(!PP.eof()){PP.getline(datA,MAX_PATH);}
break;
case WM_CREATE:
LABEL1=CreateWindow("Static","Please Enter your name, Distributor",WS_CHILD|WS_VISIBLE,0,0,400,30,hwnd,NULL,hInst,NULL);
CreateWindowEx(NULL,"button","Distribute",WS_CHILD|WS_VISIBLE,190,100,110,20,hwnd,(HMENU)BUT1,hInst,NULL);
CreateWindowEx(NULL,"edit","",WS_CHILD|WS_VISIBLE,10,100,170,20,hwnd,(HMENU)TEX1,hInst,NULL);
break;
case WM_CLOSE:
DestroyWindow(hwnd);
break;
case WM_DESTROY:
PostQuitMessage(0);
break;
case WM_COMMAND:
switch(LOWORD(wParam)){
case BUT1:
GetDlgItemText(hwnd,TEX1,distributoR,GetWindowTextLength(GetDlgItem(hwnd,TEX1))+1);
return 0;
break;
case TEX1:
return 0;
break;
default:
return 0;
}
default:
THANKS:if(PO.is_open()){PO<<distributoR<<endl;PO.close();}
return DefWindowProc(hwnd,msg,wParam,lParam);
}
return 0;
}
int WINAPI WinMain(HINSTANCE hInstance,HINSTANCE hPrevInstance,LPSTR lpCmdLine,int nCmdShow){
WNDCLASSEX tz;
HWND hwnd;
MSG Msg;
tz.cbSize=sizeof(WNDCLASSEX);
tz.style=0;
tz.lpfnWndProc=WndProc;
tz.cbClsExtra=0;
tz.cbWndExtra=0;
tz.hInstance=hInstance;
tz.hIcon=LoadIcon(NULL,IDI_APPLICATION);
tz.hCursor=LoadCursor(NULL,IDC_ARROW);
tz.hbrBackground=(HBRUSH)(COLOR_WINDOW+8);
tz.lpszClassName=tzID;
tz.lpszMenuName=NULL;
tz.hIconSm=LoadIcon(NULL,IDI_APPLICATION);
if(!RegisterClassEx(&tz)){
MessageBox(hwnd,"An Error Occur while Registering this Program, you can contact the programmer at: [email][email protected][/email]","GOD BLESS YOU",2);
return 0;
}
hwnd=CreateWindowEx(WS_EX_CLIENTEDGE,tzID,"God loves you",WS_OVERLAPPEDWINDOW,CW_USEDEFAULT,CW_USEDEFAULT,300,200,NULL,NULL,hInstance,NULL);
if(hwnd==NULL){
MessageBox(hwnd,"An Error Occur while Creating the Windows, contact the programmer at: [email][email protected][/email]","God Bless You",4);
return 0;
}
ShowWindow(hwnd,nCmdShow);
UpdateWindow(hwnd);
while(GetMessage(&Msg,NULL,0,0)){
TranslateMessage(&Msg);
DispatchMessage(&Msg);
}
return Msg.wParam;
}

prog_tom
JOIN THE REVOLUTION!!!! Dual T3 backedup science community.
http://physics.sviesoft.com/forum
-
Sep 4th, 2001, 09:54 AM
#2
Thread Starter
Fanatic Member
How?
How to read from that file? I mean it doesn't work...

prog_tom
JOIN THE REVOLUTION!!!! Dual T3 backedup science community.
http://physics.sviesoft.com/forum
-
Sep 4th, 2001, 10:20 AM
#3
Frenzied Member
um doesn't your html code squeezer thing already do this? You told me you made it in C++.....
-
Sep 4th, 2001, 04:12 PM
#4
Monday Morning Lunatic
One thing. Don't have any references to any deities (and especially not god) in your code and definitely not in the user interface.
That's one thing which WILL make me hunt you down and torture you until you become an atheist
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
Sep 5th, 2001, 03:52 PM
#5
What is it that you need help on?
-
Sep 5th, 2001, 03:57 PM
#6
Oh, and just another comment about professional documentation.
Try to avoid excessive expression of feelings, and gear towards technical writing instead (e.g: the same style as owner manuals).
Code:
//Sviesoft Corporation(r)
//Copyright(c) 1999 - 2001
//All Rights Reserved
//
// Acknowledgements:
// - God
// - John Doe
// - John Smith
//
There might be some really religious people that want to publically thank god, but generally (from a professional prespective) it's not a good idea to include it within the source code.
-
Sep 8th, 2001, 02:38 PM
#7
PowerPoster
Originally posted by Megatron
Oh, and just another comment about professional documentation.
Try to avoid excessive expression of feelings, and gear towards technical writing instead (e.g: the same style as owner manuals).
Code:
//Sviesoft Corporation(r)
//Copyright(c) 1999 - 2001
//All Rights Reserved
//
// Acknowledgements:
// - God
// - John Doe
// - John Smith
//
There might be some really religious people that want to publically thank god, but generally (from a professional prespective) it's not a good idea to include it within the source code.
hahah It is still a good thing you always thank God on whatever good thing happens..like you learn some programming. Instead of thanking God in your code, you can do something like this:
Code:
//Sviesoft Corporation(r)
//Copyright(c) 1999 - 2001
//All Rights Reserved
//
// Acknowledgements:
// - My Grandfather's grandfather
// - My Grandmother's grandmother
// _Email me to know about more people:D
-
Sep 8th, 2001, 03:22 PM
#8
Lively Member
And ...you place your company name on top of God ?
-
Sep 8th, 2001, 03:50 PM
#9
-
Sep 8th, 2001, 03:52 PM
#10
Monday Morning Lunatic
And they didn't even make it - Microsoft did
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
Sep 8th, 2001, 03:59 PM
#11
PowerPoster
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|