|
What context are you using the binary tree in? Is it STL or raw C++?
|
|
|
|
|
I have two simple CEdit for recevie input and display output.
1. In the output I can't use \n for new line,what the instruction for take new line?
2. In the input I need to receive the enter key but I can't.
Please tell the way to solve two problem.
Thank you
|
|
|
|
|
1. Try \r\n
2. There should be a property for CEdit called "Want Return" or "Want Enter" that you can set in the dialog editor that will enable multiline.
Pssst. You see that little light on your monitor? That's actually a government installed spy camera. Smile and wave to big brother!
|
|
|
|
|
Hi,
In the styles page of Edit Ctrl enable multiline and use "\r\n"
Sujan
|
|
|
|
|
\r\n so work!!!
Thank you.
|
|
|
|
|
Has anybody herad about Reverse Engenieering Software?I know that there are programs that hep you to view the source code of an exe.I'm interested in learning and not in stealig source code.I have searched Google but i did't find anything interesting.Can anyone help me?Thanks a lot.
|
|
|
|
|
|
Disassemblers are used to show the machinecode of any programmers language. This machinecode is called Assembler, or short: ASM.
Debuggers are used to trace the whole code at runtime. I think you know that from VC++ debugger. But the difference to other debuggers is: You trace, again, machincode, so ASM.
Good debuggers: OllyDbg, Sice (softice)
Good Disassembler: IDA, w32Dasm
DKT
|
|
|
|
|
Not all disassemblers go directly to ASM ...
I have used several in the past that disassemble to C, C++, and even VB (back when VB was interperted) ...
While it is true that most will only output to ASM, others do exist (although reading the code is still difficult when all of the variables and methods are genericly renamed to things like fun003 and var001)
qcha0s
|
|
|
|
|
Before I start, what is your goal? In most cases there are better ways to achive your goals than reverse engineering.
If you want to become a better programer, reverse engineering isn't the best way to start. (a little is good, but after you have an idea of what you are doing there are better ways improve)
If you want to know how a program works, you will learn best by getting books on the topic, and then writing a clone of it. (check open source for clones that you can read the commented soruce code, then contribute to them)
If you want to make your program compatable with some file or network protocol, then you start with very simple, and slowly add complexity while watching what changes. Start by saving an empty document. Then add a single letter and see how the file changes. So on until you understand it.
If you want to write a virus checker, or just have fun, then read on.
That covered, onto reverse engineering
Basicly it is detective work. You guess what is going on, then figure out how to check your guess.
I have not found programs to view source code very useful, too often code and data is messed up, and then the output is meaningless. I've always found a good book showing all the instructions the CPU supports, in hex, useful.
One of the more useful tools is to trace the system calls the program makes. For unix systems see truss . For Windows system install linux + wine, which has a good debugger.
In the end though it is detective work. Your success mostly depends on your willingness to spend a lot of time getting down and dirty with the code, watching what is going on.
I find that reverse engineering works best in small groups. There are often too many details for one person to keep track of, and it helps to bounce ideas off other people around you. So try not to do it alone.
|
|
|
|
|
Two points:
1. It often makes sense to analyze your app. For example, it can be used to optimize your code. You often see stupid behaviours of the compilers. I once saw a command by a delphi compiler: add ebx, 0
Hey wow, that is usefull...
2. Why not a one man show? I always do the work alone. And I analyzed alot hard algos. For me its just fun. Nothing more, but for others it may be usefull.
DKT
|
|
|
|
|
I want to know how NetSnippets was done ( netsnippets.com).
|
|
|
|
|
I want to invoke the format command of OS(XP) im my C# code:
string VolumeName = "UDISK";
string FormatW2K = "CMD.EXE";
string FormatW2KParam = string.Format("/C \"format.com {0}:/q/x/V:{1}\"",driverletter,VolumeName);
Win32.ShellExecute((IntPtr)0,"open", FormatW2K, FormatW2KParam, string.Empty, Win32.SW_SHOW);
I have got two problems:
1,the format function always compels me to click the Enter key to go on the format operation.I want to my code can do it for me.So,my program will invoke the Format command and do format operation automatically and never bother me.Then how to realize my dream?
2,When the Format command has been invoked,my program automatically perform the following code no matter if the format operation finished or not.But I hope that the following code should be perform as long as the format operation finished.So,how to settle this problem?
Thanks!
|
|
|
|
|
How to integrate SDK program with VC++ in MFC????
TQ!
|
|
|
|
|
Hi,
Using SDK is quiet straight forward.Create a MFC Application, add the necessary libraries to the library path and use the SDK, code. What sort of SDK are you using ?. What is the problem which you are facing ?.
Sujan
|
|
|
|
|
Is there a way to figure out what pages a user wants to print out from the PrintDlg function?
For example if the user enters "1,4,5-10" in the Pages edit box. Is the only solution to get that data to add custom hooks to the dialog proc?
Thanks
Jim
¡El diablo está en mis pantalones! ¡Mire, mire!
Real Mentats use only 100% pure, unfooled around with Sapho Juice(tm)!
SELECT * FROM User WHERE Clue > 0
0 rows returned
|
|
|
|
|
Hi! I appreciate you spend your time to read my question.
I wrote a class which is called Student.
I don't know why I got fatal error C1010 when I compile my Class.
Can anyone tell me why? Thank you.
I past my code below.
//file name:student.h
class student
{
public:
void set_lastname(std::string );
void set_firstname(std::string );
void set_ssn(std::string );
void set_age(int);
void set_phone(std::string );
string show_lastname();
string show_firstname();
string show_ssn();
int show_age();
string show_phone();
private:
string lastname;
string firstname;
string ssn;
int age;
string phone;
};
//filename:student.cpp
#include <iostream>
#include <string>
#include "student.h"
using namespace std;
//--------------------------------------------------------------------------------
// The following functions declare for the class of student.
//--------------------------------------------------------------------------------
string student::show_lastname()
{
return lastname;
}
string student::show_firstname()
{
return firstname;
}
string student::show_ssn()
{
return ssn;
}
int student::show_age()
{
return age;
}
string student::show_phone()
{
return phone;
}
void student::set_lastname(std::string text)
{
lastname=text;
}
void student::set_firstname(std::string text)
{
firstname=text;
}
void student::set_ssn(std::string text)
{
ssn=text;
}
void student::set_age(int number)
{
age=number;
}
void student::set_phone(std::string text)
{
phone=text;
}
|
|
|
|
|
The compiler is looking for precompiled header, ie, most probably stdafx.h.
Project Properties->(select student.cpp from left list)C/C++->Category->Precompiled Headers->Select Not Using Precompiled Headers.
There is no spoon.
suhredayan
|
|
|
|
|
Hi, I am a new comer of MFC, and here is my question:
I created a child window on the top of its parent window so its parent window is covered(both are derived from Cwnd). I wish I could bring the parent window to be visible any time by a button click even when the child window is still active. I tried to call:
parentwindow->BringWindowToTop();
but it does not work.
I am wondering maybe I just can't do so when its child window is still shown or not hiden. Anybody has any idea about this? Thanks in advance!
carl
|
|
|
|
|
1.The child window can't use DoModal(),you can use Create().
2.You can show child window hide,then the parent show all.
|
|
|
|
|
Thanks very much for the reply! But I am just wondering should i have to hide the child window first in order to show parent window? I have tried it and it seem it is the case! I wish I could make the parent window visible even without having to hide the child window because you may not know which child window is showing.
|
|
|
|
|
I am trying to have a thread constantly update data in a dialog box, nothing is working! How do you constantly update data in a dialog box as other processes are running?
DAVID
|
|
|
|
|
Add control type var,use SetWindowText() to change update data.
|
|
|
|
|
How are you trying to update the dialog data from another thread.
The suggested way is to post user defined messages with the parameter as new data to the dialog window, and write the message handler to update the dialog data itself.
There is no spoon.
suhredayan
|
|
|
|
|
I am attempting to post GPS coordinates from the GPS to the dialog box real time. A thread reads the GPS coordinates from the GPS unit and updates the current values in memory. Somehow I need to get those values to appear realtime in a dialog box!!!
|
|
|
|