![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Newbie
Join Date: Apr 2005
Posts: 4
Rep Power: 0
![]() |
Help! I have a problem
im using bloodshed as my ide and i keep and getting errors can someone please fix them as i need a stable base to build my app on. im using the wx windows libary and i used wxhatch to make this. also you will need 3 devpacks wx-windows,wx-windows contrib and imagelib-2
Winop.cpp [code] //Default frame.cpp for wxHatch // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" #ifdef __BORLANDC__ #pragma hdrstop #endif #ifndef WX_PRECOMP #include "wx/wx.h" #endif #include <wx/image.h> #include <wx/filename.h> #include <wx/listctrl.h> class MyFrame ; #include "canvas.h" #include "Winop.h" BEGIN_EVENT_TABLE(MyFrame, wxFrame) EVT_MENU ( wxH_HELPABOUT, MyFrame::OnHelpAbout) EVT_MENU ( wxH_HELPMANUAL, MyFrame::OnHelpManual) EVT_MENU ( wxH_MISCELLANEOUSWINDOWS_UPDATE, MyFrame::OnMiscellaneousWindows_Update) EVT_MENU ( wxH_MISCELLANEOUSSYSTEM_FILE_CHECKER, MyFrame::OnMiscellaneousSystem_File_Checker) EVT_MENU ( wxH_MISCELLANEOUSDEFRAGMENT, MyFrame::OnMiscellaneousDefragment) EVT_MENU ( wxH_MISCELLANEOUSCHECK_DISK, MyFrame::OnMiscellaneousCheck_disk) EVT_MENU ( wxH_SERVICESNONE_YET, MyFrame::OnServicesNone_yet) EVT_MENU ( wxH_INTERNETDNS_CACHE, MyFrame::OnInternetDNS_Cache) EVT_MENU ( wxH_INTERNETIP_SETTINGS, MyFrame::OnInternetIP_settings) EVT_MENU ( wxH_HARDWARENONE_YET, MyFrame::OnHardwareNone_Yet) EVT_MENU ( wxH_MEMORYULTRA_FAST_BOOTING, MyFrame::OnMemoryUltra_Fast_Booting) EVT_MENU ( wxH_MEMORYDISABLE_ZIP_FOLDERS, MyFrame::OnMemoryDisable_zip_Folders) EVT_MENU ( wxH_MEMORYDEFRAG_BOOT_FILES, MyFrame::OnMemoryDefrag_Boot_Files) EVT_MENU ( wxH_MEMORYINCREASE_NTFS_PERFORMANCE, MyFrame::OnMemoryIncrease_NTFS_performance) EVT_MENU ( wxH_MEMORYFILE_ALOCATION_SIZE_TWEAK, MyFrame::OnMemoryFile_Alocation_size_Tweak) EVT_MENU ( wxH_MEMORYFASTER_SHUTDOWN, MyFrame::OnMemoryFaster_shutdown) EVT_MENU ( wxH_MEMORYCLEAR_PAGEFILE_ON_SHUTDOWN, MyFrame::OnMemoryClear_Pagefile_on_Shutdown) EVT_MENU ( wxH_MEMORYACCELERATE_DLL_UNLOADING_, MyFrame::OnMemoryAccelerate_DLL_unloading_) EVT_MENU ( wxH_FILEEXIT, MyFrame::OnFileExit) EVT_CLOSE(MyFrame::OnClose) END_EVENT_TABLE() IMPLEMENT_APP(MyApp) bool MyApp::OnInit() { MyFrame *frame = new MyFrame (wxT("Winop: Built with wxHatch"), wxPoint(20,20), wxSize(600,450)); frame->Show (TRUE); ::wxInitAllImageHandlers(); wxIcon myIcon ; wxFileName fn ( argv[0] ); myIcon.CopyFromBitmap(wxBitmap(wxImage(fn.GetPathWithSep() + wxT("Winop.ico")))); frame->SetIcon(myIcon); SetTopWindow (frame); return TRUE; } MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size) : wxFrame((wxFrame *)NULL, -1, title, pos, size) { // create a child control here canvas = new MyCanvas(this); // menu setup goes here wxMenu * Help_menu = new wxMenu ; wxMenu * Miscellaneous_menu = new wxMenu ; wxMenu * Services_menu = new wxMenu ; wxMenu * Internet_menu = new wxMenu ; wxMenu * Hardware_menu = new wxMenu ; wxMenu * Memory_and_File_System_menu = new wxMenu ; wxMenu * File_menu = new wxMenu ; File_menu -> Append ( wxH_FILEEXIT, wxT("&Exit"), wxT("") ); Memory_and_File_System_menu -> Append ( wxH_MEMORYACCELERATE_DLL_UNLOADING_, wxT("&Accelerate DLL unloading "), wxT("") ); Memory_and_File_System_menu -> Append ( wxH_MEMORYCLEAR_PAGEFILE_ON_SHUTDOWN, wxT("&Clear Pagefile on Shutdown"), wxT("") ); Memory_and_File_System_menu -> Append ( wxH_MEMORYFASTER_SHUTDOWN, wxT("&Faster shutdown"), wxT("") ); Memory_and_File_System_menu -> Append ( wxH_MEMORYFILE_ALOCATION_SIZE_TWEAK, wxT("&File Alocation size Tweak"), wxT("") ); Memory_and_File_System_menu -> Append ( wxH_MEMORYINCREASE_NTFS_PERFORMANCE, wxT("&Increase NTFS performance"), wxT("") ); Memory_and_File_System_menu -> Append ( wxH_MEMORYDEFRAG_BOOT_FILES, wxT("&Defrag Boot Files"), wxT("") ); Memory_and_File_System_menu -> Append ( wxH_MEMORYDISABLE_ZIP_FOLDERS, wxT("&Disable zip Folders"), wxT("") ); Memory_and_File_System_menu -> Append ( wxH_MEMORYULTRA_FAST_BOOTING, wxT("&Ultra Fast Booting"), wxT("") ); Hardware_menu -> Append ( wxH_HARDWARENONE_YET, wxT("None Yet"), wxT("") ); Internet_menu -> Append ( wxH_INTERNETIP_SETTINGS, wxT("&IP settings"), wxT("") ); Internet_menu -> Append ( wxH_INTERNETDNS_CACHE, wxT("&DNS Cache"), wxT("") ); Services_menu -> Append ( wxH_SERVICESNONE_YET, wxT("None yet"), wxT("") ); Miscellaneous_menu -> Append ( wxH_MISCELLANEOUSCHECK_DISK, wxT("&Check disk"), wxT("") ); Miscellaneous_menu -> Append ( wxH_MISCELLANEOUSDEFRAGMENT, wxT("&Defragment"), wxT("") ); Miscellaneous_menu -> Append ( wxH_MISCELLANEOUSSYSTEM_FILE_CHECKER, wxT("&System File Checker"), wxT("") ); Miscellaneous_menu -> Append ( wxH_MISCELLANEOUSWINDOWS_UPDATE, wxT("&Windows Update"), wxT("") ); Help_menu -> Append ( wxH_HELPMANUAL, wxT("&Manual"), wxT("") ); Help_menu -> Append ( wxH_HELPABOUT, wxT("&About"), wxT("") ); wxMenuBar *menuBar = new wxMenuBar; menuBar->Append (File_menu, wxT("&File") ); menuBar->Append (Memory_and_File_System_menu, wxT("&Memory and File System") ); menuBar->Append (Hardware_menu, wxT("&Hardware") ); menuBar->Append (Internet_menu, wxT("&Internet") ); menuBar->Append (Services_menu, wxT("&Services") ); menuBar->Append (Miscellaneous_menu, wxT("&Miscellaneous") ); menuBar->Append (Help_menu, wxT("&Help") ); SetMenuBar (menuBar); } void MyFrame::OnClose (wxCloseEvent& event) { event.Skip(); // or event.Veto(); } MyFrame::~MyFrame () { } void MyFrame::OnFileExit (wxCommandEvent & WXUNUSED(event)) { //Respond to menu here } void MyFrame::OnMemoryAccelerate_DLL_unloading_ (wxCommandEvent & WXUNUSED(event)) { //Respond to menu here } void MyFrame::OnMemoryClear_Pagefile_on_Shutdown (wxCommandEvent & WXUNUSED(event)) { //Respond to menu here } void MyFrame::OnMemoryFaster_shutdown (wxCommandEvent & WXUNUSED(event)) { //Respond to menu here } void MyFrame::OnMemoryFile_Alocation_size_Tweak (wxCommandEvent & WXUNUSED(event)) { //Respond to menu here } void MyFrame::OnMemoryIncrease_NTFS_performance (wxCommandEvent & WXUNUSED(event)) { //Respond to menu here } void MyFrame::OnMemoryDefrag_Boot_Files (wxCommandEvent & WXUNUSED(event)) { //Respond to menu here } void MyFrame::OnMemoryDisable_zip_Folders (wxCommandEvent & WXUNUSED(event)) { //Respond to menu here } void MyFrame::OnMemoryUltra_Fast_Booting (wxCommandEvent & WXUNUSED(event)) { //Respond to menu here } void MyFrame::OnHardwareNone_Yet (wxCommandEvent & WXUNUSED(event)) { //Respond to menu here } void MyFrame::OnInternetIP_settings (wxCommandEvent & WXUNUSED(event)) { } void MyFrame::OnInternetDNS_Cache (wxCommandEvent & WXUNUSED(event)) { //Respond to menu here } void MyFrame::OnServicesNone_yet (wxCommandEvent & WXUNUSED(event)) { //Respond to menu here } void MyFrame::OnMiscellaneousCheck_disk (wxCommandEvent & WXUNUSED(event)) { //Respond to menu here } void MyFrame::OnMiscellaneousDefragment (wxCommandEvent & WXUNUSED(event)) { //Respond to menu here } void MyFrame::OnMiscellaneousSystem_File_Checker (wxCommandEvent & WXUNUSED(event)) { //Respond to menu here } void MyFrame::OnMiscellaneousWindows_Update (wxCommandEvent & WXUNUSED(event)) { //Respond to menu here } void MyFrame::OnHelpManual (wxCommandEvent & WXUNUSED(event)) { //Respond to menu here } void MyFrame::OnHelpAbout (wxCommandEvent & WXUNUSED(event)) { wxString sTmp ; #ifdef __WXMSW__ sTmp = wxT("Usage: Winop.exe") ; #else sTmp = wxT("Usage: Winop"); #endif (void)wxMessageBox(wxT("Winop V.0.1 SAMPLE\nAuthor: Yourname here (c)22\4\05 \n") + sTmp, wxT("About Winop V.0.1 SAMPLE")); } [\code] winop.h //Default frame.h for wxHatch
#ifdef _frame_H_
#define _frame_H_
#include "wx/wxprec.h"
#ifdef __BORLANDC__
#pragma hdrstop
#endif
#ifndef WX_PRECOMP
#include "wx/wx.h"
#endif
#include <wx/image.h>
#include <wx/filename.h>
#include <wx/listctrl.h>
#include "canvas.h"
enum
{
// menu IDs these two are needed by wxHatch
wxH_FILE = 1,
wxH_FILEEXIT,
wxH_MEMORYACCELERATE_DLL_UNLOADING_,
wxH_MEMORYCLEAR_PAGEFILE_ON_SHUTDOWN,
wxH_MEMORYFASTER_SHUTDOWN,
wxH_MEMORYFILE_ALOCATION_SIZE_TWEAK,
wxH_MEMORYINCREASE_NTFS_PERFORMANCE,
wxH_MEMORYDEFRAG_BOOT_FILES,
wxH_MEMORYDISABLE_ZIP_FOLDERS,
wxH_MEMORYULTRA_FAST_BOOTING,
wxH_HARDWARENONE_YET,
wxH_INTERNETIP_SETTINGS,
wxH_INTERNETDNS_CACHE,
wxH_SERVICESNONE_YET,
wxH_MISCELLANEOUSCHECK_DISK,
wxH_MISCELLANEOUSDEFRAGMENT,
wxH_MISCELLANEOUSSYSTEM_FILE_CHECKER,
wxH_MISCELLANEOUSWINDOWS_UPDATE,
wxH_HELPMANUAL,
wxH_HELPABOUT,
wxH_QUIT
};
class MyApp: public wxApp
{
public:
virtual bool OnInit();
};
class MyFrame: public wxFrame
{
public:
MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size);
MyCanvas * canvas ;
~MyFrame ();
void OnClose (wxCloseEvent& event);
void OnFileExit (wxCommandEvent & event);
void OnMemoryAccelerate_DLL_unloading_ (wxCommandEvent & event);
void OnMemoryClear_Pagefile_on_Shutdown (wxCommandEvent & event);
void OnMemoryFaster_shutdown (wxCommandEvent & event);
void OnMemoryFile_Alocation_size_Tweak (wxCommandEvent & event);
void OnMemoryIncrease_NTFS_performance (wxCommandEvent & event);
void OnMemoryDefrag_Boot_Files (wxCommandEvent & event);
void OnMemoryDisable_zip_Folders (wxCommandEvent & event);
void OnMemoryUltra_Fast_Booting (wxCommandEvent & event);
void OnHardwareNone_Yet (wxCommandEvent & event);
void OnInternetIP_settings (wxCommandEvent & event);
void OnInternetDNS_Cache (wxCommandEvent & event);
void OnServicesNone_yet (wxCommandEvent & event);
void OnMiscellaneousCheck_disk (wxCommandEvent & event);
void OnMiscellaneousDefragment (wxCommandEvent & event);
void OnMiscellaneousSystem_File_Checker (wxCommandEvent & event);
void OnMiscellaneousWindows_Update (wxCommandEvent & event);
void OnHelpManual (wxCommandEvent & event);
void OnHelpAbout (wxCommandEvent & event);
DECLARE_EVENT_TABLE()
};
#endifcanvas.cpp [code] //Default canvas.cpp for wxHatch // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" #ifdef __BORLANDC__ #pragma hdrstop #endif #ifndef WX_PRECOMP #include "wx/wx.h" #endif class MyFrame; #include "canvas.h" #include "Winop.h" BEGIN_EVENT_TABLE(MyCanvas, wxScrolledWindow) END_EVENT_TABLE() MyCanvas::MyCanvas(MyFrame* parent): wxScrolledWindow((wxWindow*)parent, -1) { pFrame = parent ; SetVirtualSize (800, 1000); // width and height SetScrollRate(20,20); // scroll x and y SetBackgroundColour (wxColour (255,255,196)); } MyCanvas::~MyCanvas () { } [\code] canvas.h //Default canvas.h for wxHatch
#ifndef _canvas_h
#define _canvas_h
class MyCanvas: public wxScrolledWindow
{
public:
MyCanvas(MyFrame * parent);
MyFrame * pFrame ;
~MyCanvas ();
DECLARE_EVENT_TABLE()
};
#endif |
|
|
|
|
|
#2 |
|
Professional Programmer
|
Tell me what errors you get.
__________________
% rc4 hexkey < input > output
#define S ,t=s[i],s[i]=s[j],s[j]=t /* rc4 hexkey <file */
unsigned char k[256],s[256],i,j,t;main(c,v,e)char**v;{++v;while(++i)s[
i]=i;for(c=0;*(*v)++;k[c++]=e)sscanf((*v)++-1,"%2x",&e);while(j+=s[i]
+k[i%c]S,++i);for(j=0;c=~getchar();putchar(~c^s[t+=s[i]]))j+=s[++i]S;} |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|