You can subscribe to this list here.
| 2004 |
Jan
|
Feb
|
Mar
(31) |
Apr
|
May
(17) |
Jun
(45) |
Jul
(8) |
Aug
(35) |
Sep
|
Oct
|
Nov
|
Dec
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(14) |
Dec
|
|
From: Anthony W. <fo...@us...> - 2005-11-11 03:28:27
|
Update of /cvsroot/notepro/pete/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9643/src Added Files: main.cpp npfile.cpp npwindow.cpp Log Message: --- NEW FILE: main.cpp --- #include "npwindow.h" CNPWindow *window = 0; LRESULT CALLBACK WndProc(HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam) { switch (nMsg) { case WM_SIZE: { window->onSize(lParam); } break; case WM_COMMAND: { window->onMenuCmd(wParam); } break; case WM_CLOSE: { DestroyWindow(hWnd); } break; case WM_DESTROY: { PostQuitMessage(0); } break; case WM_NOTIFY: { switch (HIWORD(wParam)) { case TCN_SELCHANGE: { window->setActiveTab(TabCtrl_GetCurSel(window->getTabWnd())); MessageBox(0, (char *)TabCtrl_GetCurSel(window->getTabWnd()), 0, 0); } break; } } break; default: return DefWindowProc(hWnd, nMsg, wParam, lParam); } return 0; } int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd) { window = new CNPWindow(hInstance); if (!window->createWindow(800, 600, WndProc)) return -1; window->enterLoop(); return 0; } --- NEW FILE: npwindow.cpp --- #include "npwindow.h" CNPWindow *_window = 0; CNPWindow::CNPWindow(HINSTANCE hInstance) { _hInstance = hInstance; _file = new CNPFile(); } bool CNPWindow::createWindow(int width, int height, LRESULT (CALLBACK *WndProc)(HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam)) { _width = width; _height = height; WNDCLASSEX wc; wc.cbClsExtra = 0; wc.cbSize = sizeof(WNDCLASSEX); wc.cbWndExtra = 0; wc.hbrBackground = (HBRUSH)GetStockObject(LTGRAY_BRUSH); wc.hCursor = LoadCursor(NULL, IDC_ARROW); wc.hIcon = LoadIcon(NULL, IDI_APPLICATION); wc.hIconSm = LoadIcon(NULL, IDI_APPLICATION); wc.hInstance = _hInstance; wc.lpfnWndProc = WndProc; wc.lpszClassName = "notepro"; wc.lpszMenuName = MAKEINTRESOURCE(IDR_MAIN_MENU); wc.style = NULL; if (!RegisterClassEx(&wc)) return false; _hWnd = CreateWindowEx(WS_EX_APPWINDOW, "notepro", "PETE [Untitled]", WS_OVERLAPPEDWINDOW | WS_CLIPCHILDREN, CW_USEDEFAULT, CW_USEDEFAULT, _width, _height, NULL, NULL, _hInstance, NULL); if (!_hWnd) return false; RECT rcWnd; TCITEM tci; GetClientRect(_hWnd, &rcWnd); _hTabWnd = CreateWindow(WC_TABCONTROL, "", WS_CHILD | WS_CLIPSIBLINGS | WS_VISIBLE, 0, 0, rcWnd.right, rcWnd.bottom, _hWnd, NULL, _hInstance, NULL); if (!_hTabWnd) return false; tci.mask = TCIF_TEXT; tci.pszText = "Untitled"; _curTab = 0; TabCtrl_InsertItem(_hTabWnd, 0, &tci); _hScinInst = LoadLibrary("SciLexer.dll"); if (!_hScinInst) MessageBox(NULL, "Failed to load Scintilla library", "Initialization Error!", MB_ICONERROR | MB_OK); HWND hScinWndTmp = CreateWindowEx(0, "Scintilla", "", WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_HSCROLL | WS_VSCROLL, 111, 111, _width - 9, _height - 27, _hTabWnd, 0, _hInstance, NULL); if (!hScinWndTmp) MessageBox(NULL, "Failed to create Scintilla window", "Initializatiob Error!", MB_ICONERROR | MB_OK); _hScinWnd.push_back(hScinWndTmp); ShowWindow(_hWnd, SW_SHOW); UpdateWindow(_hWnd); _file->setScinWnd(_hScinWnd[0]); _hAccel = LoadAccelerators(_hInstance, MAKEINTRESOURCE(IDR_NP_ACCEL)); SendMessage(_hScinWnd[0], SCI_STYLESETFONT, 0, (LPARAM)"Lucida Console"); SendMessage(_hScinWnd[0], SCI_STYLESETSIZE, 0, 10); strcpy(_logFont.lfFaceName, "Lucida Console"); _logFont.lfHeight = 0; _logFont.lfWidth = 0; _hMenu = GetMenu(_hWnd); SendMessage(_hScinWnd[0], SCI_SETWRAPMODE, 1, 0); return true; } void CNPWindow::enterLoop() { MSG msg; while (GetMessage(&msg, NULL, 0, 0)) { if (TranslateAccelerator(_hWnd, _hAccel, &msg) == 0) { TranslateMessage(&msg); DispatchMessage(&msg); } } } void CNPWindow::open() { char file[MAX_PATH]; OPENFILENAME ofn; ::ZeroMemory(&ofn, sizeof(ofn)); ofn.lStructSize = sizeof(ofn); ofn.hwndOwner = _hWnd; ofn.lpstrInitialDir = "C:\\"; ofn.lpstrFilter = NP_FILE_FILTER; ofn.lpstrTitle = "Open File"; ofn.Flags = OFN_CREATEPROMPT; ofn.nFilterIndex = 1; ofn.lpstrFile = file; ofn.lpstrFile[0] = '\0'; ofn.nMaxFile = MAX_PATH; if (GetOpenFileName(&ofn)) { SendMessage(_hScinWnd[0], SCI_CLEARALL, 0, 0); _file->loadFile((char*)ofn.lpstrFile); char msg[MAX_PATH + 100]; sprintf(msg, "PETE [%s]", file); SetWindowText(_hWnd, msg); } } void CNPWindow::save() { if (_file->getFilename() == 0) { saveAs(); } else { _file->writeFile(); } } void CNPWindow::saveAs() { char file[MAX_PATH]; OPENFILENAME ofn; ::ZeroMemory(&ofn, sizeof(ofn)); ofn.lStructSize = sizeof(ofn); ofn.hwndOwner = _hWnd; ofn.lpstrFilter = NP_FILE_FILTER; ofn.lpstrInitialDir = "C:\\"; ofn.lpstrTitle = "Open File"; ofn.Flags = OFN_CREATEPROMPT; ofn.lpstrFile = file; ofn.lpstrFile[0] = '\0'; ofn.nFilterIndex = 1; ofn.nMaxFile = MAX_PATH; if (GetSaveFileName(&ofn)) { _file->setFilename((char*)ofn.lpstrFile); _file->writeFile(); char msg[MAX_PATH + 100]; sprintf(msg, "PETE [%s]", file); SetWindowText(_hWnd, msg); } } void CNPWindow::chooseFont() { CHOOSEFONT cf; ::ZeroMemory(&cf, sizeof(cf)); cf.hwndOwner = _hWnd; cf.lpLogFont = &_logFont; cf.lStructSize = sizeof(CHOOSEFONT); cf.Flags = CF_SCREENFONTS | CF_INITTOLOGFONTSTRUCT; if (ChooseFont(&cf)) { SendMessage(_hScinWnd[0], SCI_STYLESETFONT, 0, (LPARAM)_logFont.lfFaceName); SendMessage(_hScinWnd[0], SCI_STYLESETSIZE, 0, cf.iPointSize / 10); if (cf.nFontType & BOLD_FONTTYPE) SendMessage(_hScinWnd[0], SCI_STYLESETBOLD, 0, true); else SendMessage(_hScinWnd[0], SCI_STYLESETBOLD, 0, false); if (cf.nFontType & ITALIC_FONTTYPE) SendMessage(_hScinWnd[0], SCI_STYLESETITALIC, 0, true); else SendMessage(_hScinWnd[0], SCI_STYLESETITALIC, 0, false); } } // MESSAGE HANDLERS void CNPWindow::onSize(LPARAM lParam) { _width = (int)LOWORD(lParam); _height = (int)HIWORD(lParam); MoveWindow(_hTabWnd, 0, 0, _width, _height, TRUE); MoveWindow(_hScinWnd[0], 5, 25, _width - 10, _height - 30, TRUE); } void CNPWindow::onMenuCmd(WPARAM wParam) { switch (LOWORD(wParam)) { case IDM_FORMAT_WORDWRAP: { if (GetMenuState(_hMenu, IDM_FORMAT_WORDWRAP, MF_BYCOMMAND) & MF_CHECKED) { SendMessage(_hScinWnd[0], SCI_SETWRAPMODE, 0, 0); CheckMenuItem(_hMenu, IDM_FORMAT_WORDWRAP, MF_UNCHECKED); } else { SendMessage(_hScinWnd[0], SCI_SETWRAPMODE, 1, 0); CheckMenuItem(_hMenu, IDM_FORMAT_WORDWRAP, MF_CHECKED); } } break; case IDM_FORMAT_FONT: { chooseFont(); } break; case IDM_EDIT_CUT: { SendMessage(_hScinWnd[_curTab], SCI_CUT, 0, 0); } break; case IDM_EDIT_COPY: { SendMessage(_hScinWnd[_curTab], SCI_COPY, 0, 0); } break; case IDM_EDIT_PASTE: { SendMessage(_hScinWnd[_curTab], SCI_PASTE, 0, 0); } break; case IDM_EDIT_UNDO: { SendMessage(_hScinWnd[_curTab], SCI_UNDO, 0, 0); } break; case IDM_EDIT_REDO: { SendMessage(_hScinWnd[_curTab], SCI_REDO, 0, 0); } break; case IDM_EDIT_FIND_NP: { _window = this; DialogBox(_hInstance, MAKEINTRESOURCE(IDD_FIND_REPLACE), _hWnd, (DLGPROC)FindReplaceDlgProc); } break; case ID_NEW_CURRENTTAB: { SendMessage(_hScinWnd[_curTab], SCI_CLEARALL, 0, 0); SetWindowText(_hWnd, "PETE [Untitled]"); _file->setFilename(0); } break; case ID_NEW_NEWTAB: { TCITEM tci; tci.mask = TCIF_TEXT; char tmp[80]; sprintf(tmp, "Untitled %d", TabCtrl_GetItemCount(_hTabWnd) + 1); tci.pszText = tmp; TabCtrl_InsertItem(_hTabWnd, TabCtrl_GetItemCount(_hTabWnd) + 1, &tci); HWND hScinWndTmp = CreateWindowEx(0, "Scintilla", "", WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_HSCROLL | WS_VSCROLL, 111, 111, _width - 9, _height - 27, _hTabWnd, 0, _hInstance, NULL); _hScinWnd.push_back(hScinWndTmp); } break; case IDM_FILE_SAVE: { save(); } break; case IDM_FILE_SAVEAS: { saveAs(); } break; case IDM_FILE_OPEN: { open(); } break; case IDM_FILE_EXIT: { DestroyWindow(_hWnd); } break; case IDM_HELP_ABOUT: { DialogBox(_hInstance, MAKEINTRESOURCE(IDD_ABOUT_NP), _hWnd, (DLGPROC)AboutDlgProc); } break; } } // Tab Control void CNPWindow::setActiveTab(int tab) { _curTab = tab; } // DIALOG PROCEDURES BOOL CALLBACK AboutDlgProc(HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam) { switch (nMsg) { case WM_INITDIALOG: { char msg[1024]; strcpy(msg, "PETE version 0.6\r\n"); strcat(msg, " Featuring Scintilla text editing\r\n\r\n"); strcat(msg, "Written By:\r\n"); strcat(msg, " Anthony White (foo-bar)\r\n"); strcat(msg, " foo...@co...\r\n"); strcat(msg, " Paul Sullivan (paullyo)"); SetDlgItemText(hWnd, IDC_ABOUT_NP, msg); } case WM_COMMAND: { if (LOWORD(wParam) == IDOK) EndDialog(hWnd, 0); } break; default: return FALSE; } return TRUE; } BOOL CALLBACK FindReplaceDlgProc(HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam) { static WPARAM targetStart; WPARAM start; LPARAM end; switch (nMsg) { case WM_INITDIALOG: { targetStart = 0; SetFocus(GetDlgItem(hWnd, IDC_FIND_TEXT)); } break; case WM_COMMAND: { switch (LOWORD(wParam)) { case IDC_FIND_NEXT: { char str[80]; GetDlgItemText(hWnd, IDC_FIND_TEXT, str, 80); HWND hScinWnd = _window->getScinWnd(); SendMessage(hScinWnd, SCI_SETTARGETSTART, targetStart, 0); SendMessage(hScinWnd, SCI_SETTARGETEND, (WPARAM)SendMessage(hScinWnd, SCI_GETLENGTH, 0, 0), 0); if ((int)SendMessage(hScinWnd, SCI_SEARCHINTARGET, (WPARAM)strlen(str), (LPARAM)str) == -1) { targetStart = 0; end = (LPARAM)SendMessage(hScinWnd, SCI_GETLENGTH, 0, 0); SendMessage(hScinWnd, SCI_SETTARGETSTART, targetStart, 0); SendMessage(hScinWnd, SCI_SETTARGETEND, end, 0); } else { start = (WPARAM)SendMessage(hScinWnd, SCI_GETTARGETSTART, 0, 0); end = (LPARAM)SendMessage(hScinWnd, SCI_GETTARGETEND, 0, 0); SendMessage(hScinWnd, SCI_SETSEL, start, end); targetStart = (WPARAM)end; } } break; case IDC_REPLACE: { char str[80]; char rep[80]; GetDlgItemText(hWnd, IDC_FIND_TEXT, str, 80); GetDlgItemText(hWnd, IDC_REPLACE_TEXT, rep, 80); HWND hScinWnd = _window->getScinWnd(); SendMessage(hScinWnd, SCI_SETTARGETSTART, targetStart, 0); SendMessage(hScinWnd, SCI_SETTARGETEND, (WPARAM)SendMessage(hScinWnd, SCI_GETLENGTH, 0, 0), 0); if ((int)SendMessage(hScinWnd, SCI_SEARCHINTARGET, (WPARAM)strlen(str), (LPARAM)str) == -1) { targetStart = 0; end = (LPARAM)SendMessage(hScinWnd, SCI_GETLENGTH, 0, 0); SendMessage(hScinWnd, SCI_SETTARGETSTART, targetStart, 0); SendMessage(hScinWnd, SCI_SETTARGETEND, end, 0); } else { start = SendMessage(hScinWnd, SCI_GETTARGETSTART, 0, 0); end = SendMessage(hScinWnd, SCI_GETTARGETEND, 0, 0); SendMessage(hScinWnd, SCI_SETSEL, start, end); targetStart = (WPARAM)end; SendMessage(hScinWnd, SCI_REPLACETARGET, (WPARAM)strlen(rep), (LPARAM)rep); } } break; case IDC_REPLACE_ALL: { char str[80]; char rep[80]; GetDlgItemText(hWnd, IDC_FIND_TEXT, str, 80); GetDlgItemText(hWnd, IDC_REPLACE_TEXT, rep, 80); HWND hScinWnd = _window->getScinWnd(); SendMessage(hScinWnd, SCI_SETTARGETSTART, 0, 0); SendMessage(hScinWnd, SCI_SETTARGETEND, (WPARAM)SendMessage(hScinWnd, SCI_GETLENGTH, 0, 0), 0); while (true) { if (SendMessage(hScinWnd, SCI_SEARCHINTARGET, (WPARAM)strlen(str), (LPARAM)str) == -1) break; SendMessage(hScinWnd, SCI_REPLACETARGET, (WPARAM)strlen(rep), (LPARAM)rep); SendMessage(hScinWnd, SCI_SETTARGETSTART, 0, 0); SendMessage(hScinWnd, SCI_SETTARGETEND, (WPARAM)SendMessage(hScinWnd, SCI_GETLENGTH, 0, 0), 0); } } break; case IDC_CLOSE: { EndDialog(hWnd, 0); } } } break; case WM_DESTROY: { EndDialog(hWnd, 0); } break; default: return FALSE; } return TRUE; } --- NEW FILE: npfile.cpp --- #include "npfile.h" CNPFile::CNPFile() { _filename = 0; } void CNPFile::loadFile(char *filename) { _filename = filename; FILE *fp = fopen(_filename, "rb"); char data[BLOCKSIZE]; int lenFile = (int)fread(data, 1, sizeof(data), fp); while (lenFile > 0) { SendMessage(_hScinWnd, SCI_ADDTEXT, lenFile, reinterpret_cast<LPARAM>(static_cast<char*>(data))); lenFile = (int)fread(data, 1, sizeof(data), fp); } fclose(fp); SendMessage(_hScinWnd, SCI_SETSAVEPOINT, 0, 0); } void CNPFile::writeFile() { FILE *fp = fopen(_filename, "wb"); if (fp) { char data[BLOCKSIZE + 1]; int lenDoc = (int)SendMessage(_hScinWnd, SCI_GETLENGTH, 0, 0); for (int i = 0; i < lenDoc; i += BLOCKSIZE) { int grabSize = lenDoc - i; if (grabSize > BLOCKSIZE) grabSize = BLOCKSIZE; TEXTRANGE tr; tr.chrg.cpMin = i; tr.chrg.cpMax = i + grabSize; tr.lpstrText = data; SendMessage(_hScinWnd, EM_GETTEXTRANGE, 0, reinterpret_cast<LPARAM>(&tr)); fwrite(data, grabSize, 1, fp); } fclose(fp); } } |
|
From: Anthony W. <fo...@us...> - 2005-11-11 03:28:27
|
Update of /cvsroot/notepro/pete/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9643/include Added Files: npfile.h npwindow.h pete.aps pete.rc resource.h Log Message: --- NEW FILE: pete.rc --- // Microsoft Visual C++ generated resource script. // #include "resource.h" #define APSTUDIO_READONLY_SYMBOLS ///////////////////////////////////////////////////////////////////////////// // // Generated from the TEXTINCLUDE 2 resource. // #include "afxres.h" ///////////////////////////////////////////////////////////////////////////// #undef APSTUDIO_READONLY_SYMBOLS ///////////////////////////////////////////////////////////////////////////// // English (U.S.) resources #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) #ifdef _WIN32 LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US #pragma code_page(1252) #endif //_WIN32 #ifdef APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// // // TEXTINCLUDE // 1 TEXTINCLUDE BEGIN "resource.h\0" END 2 TEXTINCLUDE BEGIN "#include ""afxres.h""\r\n" "\0" END 3 TEXTINCLUDE BEGIN "\r\n" "\0" END #endif // APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// // // Menu // IDR_MAIN_MENU MENU BEGIN POPUP "&File" BEGIN POPUP "&New" BEGIN MENUITEM "Current Tab\tCtrl + N", ID_NEW_CURRENTTAB MENUITEM "New Tab\tCtrl + T", ID_NEW_NEWTAB END MENUITEM SEPARATOR MENUITEM "&Open\tCtrl + O", IDM_FILE_OPEN MENUITEM "&Save\tCtrl + S", IDM_FILE_SAVE MENUITEM "Save &As", IDM_FILE_SAVEAS MENUITEM SEPARATOR MENUITEM "E&xit", IDM_FILE_EXIT END POPUP "&Edit" BEGIN MENUITEM "C&ut\tCtrl + X", IDM_EDIT_CUT MENUITEM "&Copy\tCtrl + C", IDM_EDIT_COPY MENUITEM "&Paste\tCtrl + V", IDM_EDIT_PASTE MENUITEM SEPARATOR MENUITEM "U&ndo\tCtrl + Z", IDM_EDIT_UNDO MENUITEM "&Redo\tCtrl + R", IDM_EDIT_REDO MENUITEM SEPARATOR MENUITEM "&Find\tCtrl + F", IDM_EDIT_FIND_NP END POPUP "F&ormat" BEGIN MENUITEM "&Word Wrap", IDM_FORMAT_WORDWRAP, CHECKED MENUITEM "&Font", IDM_FORMAT_FONT END POPUP "&Help" BEGIN MENUITEM "&About", IDM_HELP_ABOUT END END ///////////////////////////////////////////////////////////////////////////// // // Dialog // IDD_ABOUT_NP DIALOGEX 0, 0, 165, 95 STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "About Notepro" FONT 8, "Verdana", 400, 0, 0x0 BEGIN DEFPUSHBUTTON "OK",IDOK,57,74,50,14 EDITTEXT IDC_ABOUT_NP,7,7,151,64,ES_MULTILINE | ES_AUTOVSCROLL | ES_READONLY | NOT WS_BORDER | WS_VSCROLL END IDD_FIND_REPLACE DIALOGEX 0, 0, 286, 95 STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Find and Replace" FONT 8, "MS Shell Dlg", 400, 0, 0x1 BEGIN LTEXT "Find What:",IDC_STATIC,7,7,37,8 LTEXT "Replace With:",IDC_STATIC,7,28,46,8 DEFPUSHBUTTON "Find Next",IDC_FIND_NEXT,188,7,91,14 EDITTEXT IDC_FIND_TEXT,58,7,124,14,ES_AUTOHSCROLL EDITTEXT IDC_REPLACE_TEXT,58,26,124,14,ES_AUTOHSCROLL PUSHBUTTON "Replace",IDC_REPLACE,188,25,91,14 PUSHBUTTON "Replace All",IDC_REPLACE_ALL,188,44,91,14 PUSHBUTTON "Close",IDC_CLOSE,188,63,91,14 END ///////////////////////////////////////////////////////////////////////////// // // DESIGNINFO // #ifdef APSTUDIO_INVOKED GUIDELINES DESIGNINFO BEGIN IDD_ABOUT_NP, DIALOG BEGIN LEFTMARGIN, 7 RIGHTMARGIN, 158 TOPMARGIN, 7 BOTTOMMARGIN, 88 END IDD_FIND_REPLACE, DIALOG BEGIN LEFTMARGIN, 7 RIGHTMARGIN, 279 TOPMARGIN, 7 BOTTOMMARGIN, 88 END END #endif // APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// // // Accelerator // IDR_NP_ACCEL ACCELERATORS BEGIN "C", IDM_EDIT_COPY, VIRTKEY, CONTROL, NOINVERT "X", IDM_EDIT_CUT, VIRTKEY, CONTROL, NOINVERT "F", IDM_EDIT_FIND_NP, VIRTKEY, CONTROL, NOINVERT "V", IDM_EDIT_PASTE, VIRTKEY, CONTROL, NOINVERT "Y", IDM_EDIT_REDO, VIRTKEY, CONTROL, NOINVERT "Z", IDM_EDIT_UNDO, VIRTKEY, CONTROL, NOINVERT "N", ID_NEW_CURRENTTAB, VIRTKEY, CONTROL, NOINVERT "O", IDM_FILE_OPEN, VIRTKEY, CONTROL, NOINVERT "S", IDM_FILE_SAVE, VIRTKEY, CONTROL, NOINVERT "T", ID_NEW_NEWTAB, VIRTKEY, CONTROL, NOINVERT END #endif // English (U.S.) resources ///////////////////////////////////////////////////////////////////////////// #ifndef APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// // // Generated from the TEXTINCLUDE 3 resource. // ///////////////////////////////////////////////////////////////////////////// #endif // not APSTUDIO_INVOKED --- NEW FILE: pete.aps --- (This appears to be a binary file; contents omitted.) --- NEW FILE: npfile.h --- #ifndef _NPFILE_H #define _NPFILE_H #include <windows.h> #include <richedit.h> #include <cstdio> #include <string> #include "scintilla.h" using namespace std; #define BLOCKSIZE 128 * 1024 class CNPFile { HWND _hScinWnd; char *_filename; public: CNPFile(); void setScinWnd(HWND hScinWnd) { _hScinWnd = hScinWnd; } char *getFilename() { return _filename; } void setFilename(char *filename) { _filename = filename; } void loadFile(char *filename); void writeFile(); }; #endif --- NEW FILE: resource.h --- //{{NO_DEPENDENCIES}} // Microsoft Visual C++ generated include file. // Used by npresource.rc // #define IDR_MAIN_MENU 101 #define IDM_FILE_EXIT 102 #define IDM_HELP_ABOUT 103 #define IDD_ABOUT_NP 104 #define IDM_FILE_OPEN 105 #define IDM_FILE_NEW 106 #define IDM_FILE_SAVE 107 #define IDM_FILE_SAVEAS 108 #define IDR_NP_ACCEL 109 #define IDM_EDIT_CUT 110 #define IDM_EDIT_COPY 111 #define IDM_EDIT_PASTE 112 #define IDM_EDIT_UNDO 113 #define IDM_EDIT_REDO 114 #define IDM_FORMAT_FONT 115 #define IDM_FORMAT_WORDWRAP 116 #define ID_EDIT_FIND117 117 #define IDD_FIND_REPLACE 118 #define ID_NEW_CURRENTTAB 119 #define ID_NEW_NEWTAB 120 #define IDC_ABOUT_NP 1002 #define IDC_FIND_NEXT 1003 #define IDC_FIND_TEXT 1004 #define IDC_REPLACE_TEXT 1005 #define IDC_REPLACE 1006 #define IDC_REPLACE_ALL 1007 #define IDC_CLOSE 1008 #define IDM_EDIT_FIND_NP 57638 // Next default values for new objects // #ifdef APSTUDIO_INVOKED #ifndef APSTUDIO_READONLY_SYMBOLS #define _APS_NEXT_RESOURCE_VALUE 121 #define _APS_NEXT_COMMAND_VALUE 40017 #define _APS_NEXT_CONTROL_VALUE 1009 #define _APS_NEXT_SYMED_VALUE 101 #endif #endif --- NEW FILE: npwindow.h --- #ifndef _NPWINDOW_H #define _NPWINDOW_H #include <windows.h> #include <commctrl.h> #include <vector> using namespace std; #include "scintilla.h" #include "resource.h" #include "npfile.h" #define NP_FILE_FILTER "Text Files (*.txt)\0*.txt;*.log\0All Files (*.*)\0*.*\0" class CNPWindow { HWND _hWnd; HINSTANCE _hInstance; HACCEL _hAccel; HMENU _hMenu; HMODULE _hScinInst; vector<HWND> _hScinWnd; HWND _hTabWnd; LOGFONT _logFont; CNPFile *_file; int _width, _height, _curTab; LRESULT (CALLBACK *WndProc)(HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam); public: CNPWindow() {} CNPWindow(HINSTANCE hInstance); HWND getScinWnd() { return _hScinWnd[_curTab]; } HWND getTabWnd() { return _hTabWnd; } bool createWindow(int width, int height, LRESULT (CALLBACK *WndProc)(HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam)); void enterLoop(); void open(); void save(); void saveAs(); void chooseFont(); // Message Handlers void onSize(LPARAM lParam); void onMenuCmd(WPARAM wParam); // Tab control void setActiveTab(int tab); }; BOOL CALLBACK AboutDlgProc(HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam); BOOL CALLBACK FindReplaceDlgProc(HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam); #endif |
|
From: Anthony W. <fo...@us...> - 2005-11-11 03:28:27
|
Update of /cvsroot/notepro/pete/lib/scintilla In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9643/lib/scintilla Added Files: SciLexer.dll SciLexer.lib Log Message: --- NEW FILE: SciLexer.lib --- (This appears to be a binary file; contents omitted.) --- NEW FILE: SciLexer.dll --- (This appears to be a binary file; contents omitted.) |
|
From: Anthony W. <fo...@us...> - 2005-11-11 03:28:26
|
Update of /cvsroot/notepro/pete/vcproj In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9643/vcproj Modified Files: pete.vcproj Log Message: Index: pete.vcproj =================================================================== RCS file: /cvsroot/notepro/pete/vcproj/pete.vcproj,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** pete.vcproj 10 Nov 2005 22:22:54 -0000 1.1 --- pete.vcproj 11 Nov 2005 03:28:19 -0000 1.2 *************** *** 138,144 **** </File> <File - RelativePath="..\include\npresource.rc"> - </File> - <File RelativePath="..\include\npwindow.h"> </File> --- 138,141 ---- *************** *** 146,180 **** RelativePath="..\include\resource.h"> </File> - <Filter - Name="Scintilla" - Filter=""> - <File - RelativePath="..\include\scintilla\Accessor.h"> - </File> - <File - RelativePath="..\include\scintilla\KeyWords.h"> - </File> - <File - RelativePath="..\include\scintilla\Platform.h"> - </File> - <File - RelativePath="..\include\scintilla\PropSet.h"> - </File> - <File - RelativePath="..\include\scintilla\SciLexer.h"> - </File> - <File - RelativePath="..\include\scintilla\Scintilla.h"> - </File> - <File - RelativePath="..\include\scintilla\ScintillaWidget.h"> - </File> - <File - RelativePath="..\include\scintilla\SString.h"> - </File> - <File - RelativePath="..\include\scintilla\WindowAccessor.h"> - </File> - </Filter> </Filter> <Filter --- 143,146 ---- *************** *** 182,185 **** --- 148,154 ---- Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx" UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"> + <File + RelativePath="..\include\pete.rc"> + </File> </Filter> </Files> |
|
From: Anthony W. <fo...@us...> - 2005-11-11 03:27:19
|
Update of /cvsroot/notepro/pete/lib/scintilla In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9502/scintilla Log Message: Directory /cvsroot/notepro/pete/lib/scintilla added to the repository |
|
From: Anthony W. <fo...@us...> - 2005-11-11 03:27:08
|
Update of /cvsroot/notepro/pete/include/scintilla In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9423/scintilla Log Message: Directory /cvsroot/notepro/pete/include/scintilla added to the repository |
|
From: Anthony W. <fo...@us...> - 2005-11-11 03:27:01
|
Update of /cvsroot/notepro/pete/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9384/lib Log Message: Directory /cvsroot/notepro/pete/lib added to the repository |
|
From: Anthony W. <fo...@us...> - 2005-11-11 03:27:01
|
Update of /cvsroot/notepro/pete/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9384/src Log Message: Directory /cvsroot/notepro/pete/src added to the repository |
|
From: Anthony W. <fo...@us...> - 2005-11-11 03:27:01
|
Update of /cvsroot/notepro/pete/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9384/include Log Message: Directory /cvsroot/notepro/pete/include added to the repository |
|
From: Anthony W. <fo...@us...> - 2005-11-10 22:23:47
|
Update of /cvsroot/notepro/pete In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7098 Added Files: .cvsignore Log Message: --- NEW FILE: .cvsignore --- bin obj |
|
From: Anthony W. <fo...@us...> - 2005-11-10 22:23:30
|
Update of /cvsroot/notepro/pete/vcproj In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7026/vcproj Added Files: .cvsignore Log Message: --- NEW FILE: .cvsignore --- pete.ncb |
|
From: Anthony W. <fo...@us...> - 2005-11-10 22:23:03
|
Update of /cvsroot/notepro/pete/vcproj In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6800/vcproj Added Files: pete.sln pete.vcproj Log Message: new PETE repository --- NEW FILE: pete.vcproj --- <?xml version="1.0" encoding="Windows-1252"?> <VisualStudioProject ProjectType="Visual C++" Version="7.10" Name="pete" ProjectGUID="{8740BFD6-FF06-49BB-9ED7-09E989A72923}" RootNamespace="pete" Keyword="Win32Proj"> <Platforms> <Platform Name="Win32"/> </Platforms> <Configurations> <Configuration Name="Debug|Win32" OutputDirectory="../bin/$(ConfigurationName)" IntermediateDirectory="../obj/$(ConfigurationName)" ConfigurationType="1" CharacterSet="2"> <Tool Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="../include;../include/scintilla" PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS" MinimalRebuild="TRUE" BasicRuntimeChecks="3" RuntimeLibrary="5" UsePrecompiledHeader="0" WarningLevel="3" Detect64BitPortabilityProblems="TRUE" DebugInformationFormat="4"/> <Tool Name="VCCustomBuildTool"/> <Tool Name="VCLinkerTool" AdditionalDependencies="SciLexer.lib" OutputFile="$(OutDir)/pete.exe" LinkIncremental="2" AdditionalLibraryDirectories="../lib/scintilla" GenerateDebugInformation="TRUE" ProgramDatabaseFile="$(OutDir)/pete.pdb" SubSystem="2" TargetMachine="1"/> <Tool Name="VCMIDLTool"/> <Tool Name="VCPostBuildEventTool"/> <Tool Name="VCPreBuildEventTool"/> <Tool Name="VCPreLinkEventTool"/> <Tool Name="VCResourceCompilerTool"/> <Tool Name="VCWebServiceProxyGeneratorTool"/> <Tool Name="VCXMLDataGeneratorTool"/> <Tool Name="VCWebDeploymentTool"/> <Tool Name="VCManagedWrapperGeneratorTool"/> <Tool Name="VCAuxiliaryManagedWrapperGeneratorTool"/> </Configuration> <Configuration Name="Release|Win32" OutputDirectory="../bin/$(ConfigurationName)" IntermediateDirectory="../obj/$(ConfigurationName)" ConfigurationType="1" CharacterSet="2"> <Tool Name="VCCLCompilerTool" AdditionalIncludeDirectories="../include;../include/scintilla" PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS" RuntimeLibrary="4" UsePrecompiledHeader="0" WarningLevel="3" Detect64BitPortabilityProblems="TRUE" DebugInformationFormat="3"/> <Tool Name="VCCustomBuildTool"/> <Tool Name="VCLinkerTool" AdditionalDependencies="SciLexer.lib" OutputFile="$(OutDir)/pete.exe" LinkIncremental="1" AdditionalLibraryDirectories="../lib/scintilla" GenerateDebugInformation="TRUE" SubSystem="2" OptimizeReferences="2" EnableCOMDATFolding="2" TargetMachine="1"/> <Tool Name="VCMIDLTool"/> <Tool Name="VCPostBuildEventTool"/> <Tool Name="VCPreBuildEventTool"/> <Tool Name="VCPreLinkEventTool"/> <Tool Name="VCResourceCompilerTool"/> <Tool Name="VCWebServiceProxyGeneratorTool"/> <Tool Name="VCXMLDataGeneratorTool"/> <Tool Name="VCWebDeploymentTool"/> <Tool Name="VCManagedWrapperGeneratorTool"/> <Tool Name="VCAuxiliaryManagedWrapperGeneratorTool"/> </Configuration> </Configurations> <References> </References> <Files> <Filter Name="Source Files" Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx" UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"> <File RelativePath="..\src\main.cpp"> </File> <File RelativePath="..\src\npfile.cpp"> </File> <File RelativePath="..\src\npwindow.cpp"> </File> </Filter> <Filter Name="Header Files" Filter="h;hpp;hxx;hm;inl;inc;xsd" UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"> <File RelativePath="..\include\npfile.h"> </File> <File RelativePath="..\include\npresource.rc"> </File> <File RelativePath="..\include\npwindow.h"> </File> <File RelativePath="..\include\resource.h"> </File> <Filter Name="Scintilla" Filter=""> <File RelativePath="..\include\scintilla\Accessor.h"> </File> <File RelativePath="..\include\scintilla\KeyWords.h"> </File> <File RelativePath="..\include\scintilla\Platform.h"> </File> <File RelativePath="..\include\scintilla\PropSet.h"> </File> <File RelativePath="..\include\scintilla\SciLexer.h"> </File> <File RelativePath="..\include\scintilla\Scintilla.h"> </File> <File RelativePath="..\include\scintilla\ScintillaWidget.h"> </File> <File RelativePath="..\include\scintilla\SString.h"> </File> <File RelativePath="..\include\scintilla\WindowAccessor.h"> </File> </Filter> </Filter> <Filter Name="Resource Files" Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx" UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"> </Filter> </Files> <Globals> </Globals> </VisualStudioProject> --- NEW FILE: pete.sln --- Microsoft Visual Studio Solution File, Format Version 8.00 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pete", "pete.vcproj", "{8740BFD6-FF06-49BB-9ED7-09E989A72923}" ProjectSection(ProjectDependencies) = postProject EndProjectSection EndProject Global GlobalSection(SolutionConfiguration) = preSolution Debug = Debug Release = Release EndGlobalSection GlobalSection(ProjectConfiguration) = postSolution {8740BFD6-FF06-49BB-9ED7-09E989A72923}.Debug.ActiveCfg = Debug|Win32 {8740BFD6-FF06-49BB-9ED7-09E989A72923}.Debug.Build.0 = Debug|Win32 {8740BFD6-FF06-49BB-9ED7-09E989A72923}.Release.ActiveCfg = Release|Win32 {8740BFD6-FF06-49BB-9ED7-09E989A72923}.Release.Build.0 = Release|Win32 EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution EndGlobalSection GlobalSection(ExtensibilityAddIns) = postSolution EndGlobalSection EndGlobal |
|
From: Anthony W. <fo...@us...> - 2005-11-10 22:23:02
|
Update of /cvsroot/notepro/notepro-current/lib/scintilla In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6800/lib/scintilla Modified Files: SciLexer.dll SciLexer.lib Log Message: new PETE repository Index: SciLexer.lib =================================================================== RCS file: /cvsroot/notepro/notepro-current/lib/scintilla/SciLexer.lib,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 Binary files /tmp/cvsOcNuBS and /tmp/cvsWqteHu differ Index: SciLexer.dll =================================================================== RCS file: /cvsroot/notepro/notepro-current/lib/scintilla/SciLexer.dll,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 Binary files /tmp/cvsgfMYpW and /tmp/cvspRTLEy differ |
|
From: Anthony W. <fo...@us...> - 2005-11-10 22:12:50
|
Update of /cvsroot/notepro/pete/vcproj In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4127/vcproj Log Message: Directory /cvsroot/notepro/pete/vcproj added to the repository |
|
From: EviLToYLeT <evi...@us...> - 2004-08-29 19:06:08
|
Update of /cvsroot/notepro/pete-current/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16644/src Modified Files: main.cpp Log Message: Index: main.cpp =================================================================== RCS file: /cvsroot/notepro/pete-current/src/main.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** main.cpp 29 Aug 2004 06:44:57 -0000 1.5 --- main.cpp 29 Aug 2004 19:05:56 -0000 1.6 *************** *** 1,3 **** --- 1,4 ---- #include <windows.h> //include the windows header files + #include "splash.h" #define WIN32_LEAN_AND_MEAN //reduce unnecessary windows controls *************** *** 27,30 **** --- 28,37 ---- wc.style = CS_HREDRAW|CS_VREDRAW; + //Display the splash screen and do some other stuff + { + CSplash showSplash(hInstance); + ::Sleep(1000); //We'll use a delay for now + } + //Regsiter the window class if(!::RegisterClassEx(&wc)){ |
|
From: EviLToYLeT <evi...@us...> - 2004-08-29 18:59:09
|
Update of /cvsroot/notepro/pete-current/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15036/src Added Files: splash.cpp splash.h Log Message: --- NEW FILE: splash.cpp --- #include <windows.h> #include "splash.h" CSplash::CSplash(HINSTANCE hInstance){ _hInstance = hInstance; WNDCLASSEX wc; ::ZeroMemory(&wc, sizeof(WNDCLASSEX)); wc.cbClsExtra = 0; wc.cbSize = sizeof(WNDCLASSEX); wc.cbWndExtra = 0; wc.hbrBackground = (HBRUSH) GetStockObject(WHITE_BRUSH); wc.hCursor = NULL; wc.hIcon = NULL; wc.hIconSm = NULL; wc.hInstance = hInstance; wc.lpfnWndProc = SplashWndProc; wc.lpszClassName = szSplashName; wc.lpszMenuName = NULL; wc.style = CS_NOCLOSE; if(!::RegisterClassEx(&wc)){ MessageBox(0,"Could not register splash screen", "Attention", 0); } _hWnd = ::CreateWindow(szSplashName,"PETE", WS_POPUPWINDOW, 500, 300, 300, 400, NULL, NULL, hInstance, NULL); ShowWindow(_hWnd,SW_SHOW); UpdateWindow(_hWnd); } CSplash::~CSplash(){ ::MessageBox(0,"Splash screen was just destructed", "Attention",NULL); ::DestroyWindow(_hWnd); ::UnregisterClass(szSplashName,_hInstance); } LRESULT CALLBACK SplashWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam){ return DefWindowProc(hWnd,msg,wParam,lParam); } --- NEW FILE: splash.h --- #ifndef _SPLASH #define _SPLASH static TCHAR szSplashName[] = "CSplash"; class CSplash{ public: CSplash(HINSTANCE); //Initialize and show the splash screen ~CSplash(); //Kill the splash screen when you're done private: HWND _hWnd; //Handle to our splash window HINSTANCE _hInstance; //Current instance }; LRESULT CALLBACK SplashWndProc(HWND, UINT, WPARAM, LPARAM); //Splash screen window procedure #endif |
|
From: EviLToYLeT <evi...@us...> - 2004-08-29 18:58:31
|
Update of /cvsroot/notepro/pete-current/vcproj In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14945/vcproj Modified Files: pete-current.vcproj Log Message: Put in some beginning splash code. still need to do screen metrics. Index: pete-current.vcproj =================================================================== RCS file: /cvsroot/notepro/pete-current/vcproj/pete-current.vcproj,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** pete-current.vcproj 29 Aug 2004 06:45:44 -0000 1.4 --- pete-current.vcproj 29 Aug 2004 18:58:18 -0000 1.5 *************** *** 185,188 **** --- 185,192 ---- > </File> + <File + RelativePath="..\src\splash.cpp" + > + </File> </Filter> <Filter *************** *** 191,194 **** --- 195,202 ---- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" > + <File + RelativePath="..\src\splash.h" + > + </File> </Filter> <Filter |
|
From: EviLToYLeT <evi...@us...> - 2004-08-29 06:45:55
|
Update of /cvsroot/notepro/pete-current/vcproj In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24932/vcproj Modified Files: pete-current.vcproj Log Message: Optimized the project. Will do more of that when the code is in a more mature stage. Get in to the code here and start doing your magic :D Index: pete-current.vcproj =================================================================== RCS file: /cvsroot/notepro/pete-current/vcproj/pete-current.vcproj,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** pete-current.vcproj 28 Aug 2004 18:45:39 -0000 1.3 --- pete-current.vcproj 29 Aug 2004 06:45:44 -0000 1.4 *************** *** 21,24 **** --- 21,25 ---- ConfigurationType="1" CharacterSet="2" + WholeProgramOptimization="1" > <Tool *************** *** 40,45 **** --- 41,50 ---- Name="VCCLCompilerTool" Optimization="0" + GlobalOptimizations="FALSE" + FavorSizeOrSpeed="0" + WholeProgramOptimization="FALSE" PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS" MinimalRebuild="TRUE" + ExceptionHandling="1" BasicRuntimeChecks="3" RuntimeLibrary="1" *************** *** 95,98 **** --- 100,104 ---- ConfigurationType="1" CharacterSet="2" + WholeProgramOptimization="1" > <Tool *************** *** 114,122 **** Name="VCCLCompilerTool" Optimization="3" PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS" UsePrecompiledHeader="0" WarningLevel="3" Detect64BitPortabilityProblems="TRUE" ! DebugInformationFormat="3" /> <Tool --- 120,133 ---- Name="VCCLCompilerTool" Optimization="3" + GlobalOptimizations="TRUE" + FavorSizeOrSpeed="2" + OmitFramePointers="TRUE" + WholeProgramOptimization="TRUE" PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS" + ExceptionHandling="0" UsePrecompiledHeader="0" WarningLevel="3" Detect64BitPortabilityProblems="TRUE" ! DebugInformationFormat="0" /> <Tool |
|
From: EviLToYLeT <evi...@us...> - 2004-08-29 06:45:07
|
Update of /cvsroot/notepro/pete-current/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24784/src Modified Files: main.cpp Log Message: Index: main.cpp =================================================================== RCS file: /cvsroot/notepro/pete-current/src/main.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** main.cpp 29 Aug 2004 01:15:46 -0000 1.4 --- main.cpp 29 Aug 2004 06:44:57 -0000 1.5 *************** *** 58,65 **** LRESULT CALLBACK WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam){ switch(msg){ case WM_DESTROY: PostQuitMessage(0); return 0; ! break; } //Let windows handle the processing --- 58,68 ---- LRESULT CALLBACK WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam){ switch(msg){ + case WM_CREATE: + MessageBox(hWnd,"Anthony -- messed around with the compiler and all. Tried to optimize code generation so that the releases are small. Only did it for release. Debug was kept as default","Attention",0); + break; case WM_DESTROY: PostQuitMessage(0); return 0; ! break; } //Let windows handle the processing |
|
From: Anthony W. <fo...@us...> - 2004-08-29 01:15:57
|
Update of /cvsroot/notepro/pete-current/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17233/src Modified Files: main.cpp Log Message: Index: main.cpp =================================================================== RCS file: /cvsroot/notepro/pete-current/src/main.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** main.cpp 28 Aug 2004 19:56:26 -0000 1.3 --- main.cpp 29 Aug 2004 01:15:46 -0000 1.4 *************** *** 53,57 **** ::DispatchMessage(&msg); } ! return msg.wParam; } --- 53,57 ---- ::DispatchMessage(&msg); } ! return (int)msg.wParam; } |
|
From: EviLToYLeT <evi...@us...> - 2004-08-28 19:56:36
|
Update of /cvsroot/notepro/pete-current/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2518/src Modified Files: main.cpp Log Message: Index: main.cpp =================================================================== RCS file: /cvsroot/notepro/pete-current/src/main.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** main.cpp 28 Aug 2004 19:13:37 -0000 1.2 --- main.cpp 28 Aug 2004 19:56:26 -0000 1.3 *************** *** 8,17 **** INT WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd){ static TCHAR szAppName[] = "PETE"; //Application name ! HWND hWnd; //Handle to main window WNDCLASSEX wc; //Default window class MSG msg; //Procedure messages ! ZeroMemory(&wc,sizeof(WNDCLASSEX)); //Clear the window structure ! //Setting up our window structure wc.cbClsExtra = 0; --- 8,16 ---- INT WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd){ static TCHAR szAppName[] = "PETE"; //Application name ! HWND hWnd,hToolbar; //Handle to main window WNDCLASSEX wc; //Default window class MSG msg; //Procedure messages ! ::ZeroMemory(&wc,sizeof(WNDCLASSEX)); //Clear the window structure //Setting up our window structure wc.cbClsExtra = 0; *************** *** 29,50 **** //Regsiter the window class ! if(!RegisterClassEx(&wc)){ ! MessageBox(0,"Error registering the window","Fatal Error", MB_ICONERROR); } //Create the window ! hWnd = CreateWindow(szAppName,szAppName,WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, NULL, NULL, hInstance, NULL); if(!hWnd){ ! MessageBox(0,"Error creating the window", "Fatal Error", MB_ICONERROR); } //Display and update the window ! ShowWindow(hWnd,nShowCmd); ! UpdateWindow(hWnd); //Enter the message pump ! while(GetMessage(&msg,NULL,0,0)){ ! TranslateMessage(&msg); ! DispatchMessage(&msg); } return msg.wParam; --- 28,55 ---- //Regsiter the window class ! if(!::RegisterClassEx(&wc)){ ! ::MessageBox(0,"Error registering the window","Fatal Error", MB_ICONERROR); } //Create the window ! hWnd = ::CreateWindow(szAppName,szAppName,WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, NULL, NULL, hInstance, NULL); if(!hWnd){ ! ::MessageBox(0,"Error creating the window", "Fatal Error", MB_ICONERROR); } + //Testing out toolbars + hToolbar = ::CreateWindowEx(WS_EX_TOOLWINDOW,szAppName,"Toolbar using same window proc", WS_POPUP| WS_SYSMENU | WS_THICKFRAME | WS_CAPTION,200,200,400,64,hWnd,NULL, GetModuleHandle(0),NULL); + //Display and update the window ! ::ShowWindow(hWnd,nShowCmd); ! ::UpdateWindow(hWnd); ! ! ::ShowWindow(hToolbar,nShowCmd); ! ::UpdateWindow(hToolbar); //Enter the message pump ! while(::GetMessage(&msg,NULL,0,0)){ ! ::TranslateMessage(&msg); ! ::DispatchMessage(&msg); } return msg.wParam; *************** *** 53,59 **** LRESULT CALLBACK WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam){ switch(msg){ - case WM_CREATE: - MessageBox(hWnd, "hello", "hello", 0); - break; case WM_DESTROY: PostQuitMessage(0); --- 58,61 ---- *************** *** 62,65 **** } //Let windows handle the processing ! return DefWindowProc(hWnd,msg,wParam,lParam); } --- 64,67 ---- } //Let windows handle the processing ! return ::DefWindowProc(hWnd,msg,wParam,lParam); } |
|
From: EviLToYLeT <evi...@us...> - 2004-08-28 19:13:46
|
Update of /cvsroot/notepro/pete-current/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28441/src Modified Files: main.cpp Log Message: Index: main.cpp =================================================================== RCS file: /cvsroot/notepro/pete-current/src/main.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** main.cpp 28 Aug 2004 18:38:15 -0000 1.1 --- main.cpp 28 Aug 2004 19:13:37 -0000 1.2 *************** *** 1,16 **** ! #include <windows.h> //include the windows header files ! #define WIN32_LEAN_AND_MEAN //reduce unnecessary windows controls ! LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam); //Program entrance point INT WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd){ ! MessageBox(0,"Let's get this show on the road!", "Testing this",0); } ! LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam){ switch(msg){ ! default: ! return DefWindowProc(hwnd,msg,wParam,lParam); } } --- 1,65 ---- ! #include <windows.h> //include the windows header files ! #define WIN32_LEAN_AND_MEAN //reduce unnecessary windows controls ! //Window callback procedure ! LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM); //Program entrance point INT WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd){ ! static TCHAR szAppName[] = "PETE"; //Application name ! HWND hWnd; //Handle to main window ! WNDCLASSEX wc; //Default window class ! MSG msg; //Procedure messages ! ! ZeroMemory(&wc,sizeof(WNDCLASSEX)); //Clear the window structure ! ! //Setting up our window structure ! wc.cbClsExtra = 0; ! wc.cbSize = sizeof(WNDCLASSEX); ! wc.cbWndExtra = 0; ! wc.hbrBackground = (HBRUSH) GetStockObject(WHITE_BRUSH); ! wc.hCursor = NULL; ! wc.hIcon = NULL; ! wc.hIconSm = NULL; ! wc.hInstance = hInstance; ! wc.lpfnWndProc = WndProc; ! wc.lpszClassName = szAppName; ! wc.lpszMenuName = NULL; ! wc.style = CS_HREDRAW|CS_VREDRAW; ! ! //Regsiter the window class ! if(!RegisterClassEx(&wc)){ ! MessageBox(0,"Error registering the window","Fatal Error", MB_ICONERROR); ! } ! ! //Create the window ! hWnd = CreateWindow(szAppName,szAppName,WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, NULL, NULL, hInstance, NULL); ! if(!hWnd){ ! MessageBox(0,"Error creating the window", "Fatal Error", MB_ICONERROR); ! } ! ! //Display and update the window ! ShowWindow(hWnd,nShowCmd); ! UpdateWindow(hWnd); ! ! //Enter the message pump ! while(GetMessage(&msg,NULL,0,0)){ ! TranslateMessage(&msg); ! DispatchMessage(&msg); ! } ! return msg.wParam; } ! LRESULT CALLBACK WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam){ switch(msg){ ! case WM_CREATE: ! MessageBox(hWnd, "hello", "hello", 0); ! break; ! case WM_DESTROY: ! PostQuitMessage(0); ! return 0; ! break; } + //Let windows handle the processing + return DefWindowProc(hWnd,msg,wParam,lParam); } |
|
From: EviLToYLeT <evi...@us...> - 2004-08-28 18:45:50
|
Update of /cvsroot/notepro/pete-current/vcproj In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23920/vcproj Modified Files: pete-current.vcproj Log Message: Index: pete-current.vcproj =================================================================== RCS file: /cvsroot/notepro/pete-current/vcproj/pete-current.vcproj,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** pete-current.vcproj 28 Aug 2004 18:35:41 -0000 1.2 --- pete-current.vcproj 28 Aug 2004 18:45:39 -0000 1.3 *************** *** 170,173 **** --- 170,177 ---- UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" > + <File + RelativePath="..\src\main.cpp" + > + </File> </Filter> <Filter |
|
From: EviLToYLeT <evi...@us...> - 2004-08-28 18:38:24
|
Update of /cvsroot/notepro/pete-current/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22877/src Added Files: main.cpp Log Message: --- NEW FILE: main.cpp --- #include <windows.h> //include the windows header files #define WIN32_LEAN_AND_MEAN //reduce unnecessary windows controls LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam); //Program entrance point INT WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd){ MessageBox(0,"Let's get this show on the road!", "Testing this",0); } LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam){ switch(msg){ default: return DefWindowProc(hwnd,msg,wParam,lParam); } } |
|
From: Anthony W. <fo...@us...> - 2004-08-28 18:35:50
|
Update of /cvsroot/notepro/pete-current/vcproj In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22614/vcproj Modified Files: pete-current.sln pete-current.vcproj Log Message: Index: pete-current.sln =================================================================== RCS file: /cvsroot/notepro/pete-current/vcproj/pete-current.sln,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** pete-current.sln 28 Aug 2004 18:18:03 -0000 1.1 --- pete-current.sln 28 Aug 2004 18:35:41 -0000 1.2 *************** *** 2,6 **** Microsoft Visual Studio Solution File, Format Version 9.00 # Visual C++ Express 2005 ! Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pete-current", "pete-current\pete-current.vcproj", "{258DDC3E-C018-470B-B434-FD049A42B858}" EndProject Global --- 2,6 ---- Microsoft Visual Studio Solution File, Format Version 9.00 # Visual C++ Express 2005 ! Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pete-current", "pete-current.vcproj", "{258DDC3E-C018-470B-B434-FD049A42B858}" EndProject Global Index: pete-current.vcproj =================================================================== RCS file: /cvsroot/notepro/pete-current/vcproj/pete-current.vcproj,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** pete-current.vcproj 28 Aug 2004 18:18:03 -0000 1.1 --- pete-current.vcproj 28 Aug 2004 18:35:41 -0000 1.2 *************** *** 17,22 **** <Configuration Name="Debug|Win32" ! OutputDirectory="Debug" ! IntermediateDirectory="Debug" ConfigurationType="1" CharacterSet="2" --- 17,22 ---- <Configuration Name="Debug|Win32" ! OutputDirectory="../bin/debug" ! IntermediateDirectory="../obj/debug" ConfigurationType="1" CharacterSet="2" *************** *** 91,96 **** <Configuration Name="Release|Win32" ! OutputDirectory="Release" ! IntermediateDirectory="Release" ConfigurationType="1" CharacterSet="2" --- 91,96 ---- <Configuration Name="Release|Win32" ! OutputDirectory="../bin/release" ! IntermediateDirectory="../obj/release" ConfigurationType="1" CharacterSet="2" |