Hi everybody. This is a Text Editor made by me. It's not made in MFC.
Printable View
Hi everybody. This is a Text Editor made by me. It's not made in MFC.
Any Suggestions regarding this Text Editor? This will not be the Final Release of this Editor Series:)
I would next implement loading.
Then a proper file selection mechanism (common dialogs, it's easy)
Then maybe a menu.
How to load a Common Dialog?
Also made without MFC (the MFC version took about 1/10 of the time, and has more features).
This program lets you search a word by number in a file. You supply the number (Bearbeiten->Set Highlight) and it will mark this word in the text.
I accidently posted a only half translated version.
Datei -> File
Bearbeiten -> Edit
Window -> Fenster
Can you tell me how to load a Common Dialog in VC++ Win32 Programming, please?
the header is commdlg.h
You have to declare an OPENFILENAME structure and fill it's members (see MSDN)
And you call GetOpenFileName or GetSaveFileName
Then get the information you want from the now modified ofn
then proceed as usual
this is what I used in my app
not very elgant but effective
GetProcessHeap() :)Code:HeapFree(GetProcessHeap, 0, *ppszContent);
How to create a Menu?
MSDN, and search for CreateMenu.
Sorry about this, I really got messed up... Would anyone place a code that only does the Common Dialogs part? Thanks
Here is a fregment from one of my apps.
PHP Code:OPENFILENAME ofn;
long retval;
TCHAR *szFullPathName;
szFullPathName = new TCHAR[512];
lstrcpy(szFullPathName,"");
memset(&ofn,0,sizeof(OPENFILENAME));
ofn.lStructSize = sizeof(OPENFILENAME);
ofn.hwndOwner = hDlg;
ofn.nFilterIndex = 1;
ofn.lpstrFile = szFullPathName;
ofn.nMaxFile = 512;
ofn.lpstrInitialDir = "c:\\";
ofn.lpstrFilter = "Text Files(*.txt)\0*.txt\0All Files(*.*)\0*.*\0";
ofn.lpstrDefExt = "txt";
retval = GetSaveFileName(&ofn);
if(retval!=0)
{
//do something
}
Looks like they got messed up by the parser.Quote:
Originally posted by Vlatko
PHP Code:ofn.lpstrInitialDir = "c:\\";
ofn.lpstrFilter = "Text Files(*.txt)\0*.txt\0All Files(*.*)\0*.*\0";
ofn.lpstrInitialDir = "c:\\";
ofn.lpstrFilter = "Text Files(*.txt)\0*.txt\0All Files(*.*)\0*.*\0";Code:ofn.lpstrInitialDir = "c:\\";
ofn.lpstrFilter = "Text Files(*.txt)\0*.txt\0All Files(*.*)\0*.*\0";
What a nice, sexy clean UI. :rolleyes: :pQuote:
Originally posted by prog_tom
Hi everybody. This is a Text Editor made by me. It's not made in MFC.
You are wrong Furby:D Everybody should leave MS, Corel or any other best know text editors, and use this oneQuote:
Originally posted by filburt1
What a nice, sexy clean UI. :rolleyes: :p
:D;) :p :rolleyes:
That is the most *****ed up text editor I have EVER seen
Come on guys. I'm waiting for my damn Flight(#NW070) from Northwest Airlines... Orgin: Shanghai, Destination: Little Rock. Connect in Detroit. So I can't mess around with you guys much. Damn. Can't believe they destroyed the great World Trade Center!!! And the Pentagon!@!!@$#
Are you alone on the flight(without your parents)?:D
That's right:) All alone. Without my parents:) But due to the incident in the US. All planes to the US will be cancelled. Well they say it's going to be open on the 15th...
So I'm damn tired here in Shanghai.
You are only 12...right?
You are kind of right:) Try this code:
Ha ha:)VB Code:
Dim i as Long Dim myname as String Dim yours as String Dim yourage as Long Private Sub Form_Load() i=13 myname="Tom Zhang" yours="Abdul" yourage="234078324" MsgBox "Hi, I'm " & myname & " and you are " & yours & " you are " & yourage & " years old. and I'm " & i & " age old." End Sub
Damn NWA!