Text Viewer
-
You should get him to add file/open functionality instead of just drag/drop. The Express Edition of C# is, however, free.
Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
Christian Graus wrote:
You should get him to add file/open functionality instead of just drag/drop.
Yes, that's well spotted. However for the purpose I want to use it, I would pass the File Open info through the 'Environment', and default to an error screen, if someone just doubleclicked on it in windows explorer, they should get an eror message stating that is NOT a Stand Alone Application.
Christian Graus wrote:
The Express Edition of C# is, however, free.
When we started writing in 1995, MFC was Free. The MFC 4.2 Compiler is still our weapon of choice, and has not failed us sofar. :)
Bram van Kampen
-
less file.txt
Robert Surtees wrote:
less file.txt
???? :)
Bram van Kampen
-
Christian Graus wrote:
You should get him to add file/open functionality instead of just drag/drop.
Yes, that's well spotted. However for the purpose I want to use it, I would pass the File Open info through the 'Environment', and default to an error screen, if someone just doubleclicked on it in windows explorer, they should get an eror message stating that is NOT a Stand Alone Application.
Christian Graus wrote:
The Express Edition of C# is, however, free.
When we started writing in 1995, MFC was Free. The MFC 4.2 Compiler is still our weapon of choice, and has not failed us sofar. :)
Bram van Kampen
*grin* yes, I am just saying that the tool to compile the code he gave you, is quite free for you to download and thus make the app work as you want.
Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
-
A TextBox??? Geez! That's limited to 64 KB or around that. Can't believe you didn't use a RichTextBox. Shame on you. Now you'll get featured in the Coding Horrors forum ;P
Regards, Nish
Nish’s thoughts on MFC, C++/CLI and .NET (my blog)
My latest book : C++/CLI in Action / Amazon.com linkMSDN:
Windows NT 4.0, Windows 2000, Windows 2000 Professional, Windows 2000 Server, Windows 2000 Advanced Server, Windows XP Home Edition, Windows XP Professional x64 Edition, Windows Server 2003 Platform Note: For single line text box controls, if the MaxLength property is set to 0, the maximum number of characters the user can enter is 2147483646 or an amount based on available memory, whichever is smaller. For multiline text box controls, the maximum number of characters the user can enter is 4294967295 or an amount based on available memory, whichever is smaller. Windows Millennium Edition Platform Note: For single line text box controls, if the MaxLength property is set to 0, the maximum number of characters the user can enter is 32,766 or an amount based on available memory, whichever is smaller. For multiline text box controls, the maximum number of characters the user can enter is 65,535 or an amount based on available memory, whichever is smaller.
Windows ME has a limit of 64K. For others, the limit is 4GB. Since nobody uses ME, I'd say the real limit is 4GB. :)
-
Robert Surtees wrote:
less file.txt
???? :)
Bram van Kampen
Bram van Kampen wrote:
????
It's a better version of more. Been around since the beginning of time. Wiki[^] A windows version[^]
-
You can use a rich text control and make it read only. It can display really large text files (once you get too large it will be very slow).
Regards, Nish
Nish’s thoughts on MFC, C++/CLI and .NET (my blog)
My latest book : C++/CLI in Action / Amazon.com linkYes, for the number of lines he's talking about, I think a smarter solution is needed than to just put it all into a RTB.
Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
-
Christian Graus wrote:
Is the 32757 line limit a major issue ? Because the rest seems easy to deal with. Just don't make it read only, but write code to reject all keypresses.
Yes, it is! We have Basic Log Files, which record transactions in ASCII, and which would cover up to six years of trading. The biggest sofar contans 425,000 lines. it is not accessed very frequently, but, the concern is that we have no tool to access it which disallows modification. Notepad loads it Sofar No Problems, it Takes a Long Time, No Problem, but it facilitates modification.
Bram van Kampen
Bram van Kampen wrote:
Notepad loads it Sofar No Problems, it Takes a Long Time
FYI, if you turn off Word Wrap, it will load faster. And I think Word Pad will load any text file instantly. Though, like you say, it facilitates modification. Perhaps you could experiment with setting the files as readonly?
-
MSDN:
Windows NT 4.0, Windows 2000, Windows 2000 Professional, Windows 2000 Server, Windows 2000 Advanced Server, Windows XP Home Edition, Windows XP Professional x64 Edition, Windows Server 2003 Platform Note: For single line text box controls, if the MaxLength property is set to 0, the maximum number of characters the user can enter is 2147483646 or an amount based on available memory, whichever is smaller. For multiline text box controls, the maximum number of characters the user can enter is 4294967295 or an amount based on available memory, whichever is smaller. Windows Millennium Edition Platform Note: For single line text box controls, if the MaxLength property is set to 0, the maximum number of characters the user can enter is 32,766 or an amount based on available memory, whichever is smaller. For multiline text box controls, the maximum number of characters the user can enter is 65,535 or an amount based on available memory, whichever is smaller.
Windows ME has a limit of 64K. For others, the limit is 4GB. Since nobody uses ME, I'd say the real limit is 4GB. :)
aspdotnetdev wrote:
Since nobody uses ME, I'd say the real limit is 4GB.
Touche! :)
Regards, Nish
Nish’s thoughts on MFC, C++/CLI and .NET (my blog)
My latest book : C++/CLI in Action / Amazon.com link -
It takes VS 2008 20 seconds to start on my machine, and at least 8 seconds to compile the most basic app....
Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
Christian Graus wrote:
and at least 8 seconds to compile the most basic app....
Really? It depends on what you call basic, but that's way too slow - on my laptop, compiling a project with ~10 files takes 2-3 seconds, max.
Regards Senthil _____________________________ My Home Page |My Blog | My Articles | My Flickr | WinMacro
-
Christian Graus wrote:
You should get him to add file/open functionality instead of just drag/drop.
Yes, that's well spotted. However for the purpose I want to use it, I would pass the File Open info through the 'Environment', and default to an error screen, if someone just doubleclicked on it in windows explorer, they should get an eror message stating that is NOT a Stand Alone Application.
Christian Graus wrote:
The Express Edition of C# is, however, free.
When we started writing in 1995, MFC was Free. The MFC 4.2 Compiler is still our weapon of choice, and has not failed us sofar. :)
Bram van Kampen
-
All our Code is in MFC. We do not use Managed Code.
Bram van Kampen
If you want to create an app yourself and you don't want to use managed code, just allow the user to page through the file in 32KB chunks. Create a right arrow button that will go the next 32K and a left arrow button that will go to the previous 32K. And maybe allow the user to specify how many bytes into the file to start the loading. There are more sophisticated techniques, but that shouldn't take too long to code.
-
It takes VS 2008 20 seconds to start on my machine, and at least 8 seconds to compile the most basic app....
Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
Christian Graus wrote:
It takes VS 2008 20 seconds to start on my machine
4 seconds on mine, plus 10 seconds to rebuild a 120kloc, 16 projects solution. :cool: Time to buy a new PC Christian?
If you truly believe you need to pick a mobile phone that "says something" about your personality, don't bother. You don't have a personality. A mental illness, maybe - but not a personality. - Charlie Brooker My Photos/CP Flickr Group - ScrewTurn Wiki v3
-
6 secs to start and populate the Start page (don't ask me why I haven't disabled that, I don't know why.) Compiling is OK but I don't work on large projects....
Candy: Here's the plan: we changes our names, move to a distant island, and disguise ourselves as a family of traveling donkey polishers.
Ha! haha! Muhahahahahaha! Yaaaaaa![^]
Agh! Reality! My Archnemesis![^]
| FoldWithUs! | sighist | µLaunch - program launcher for server core and hyper-v server. -
Christian Graus wrote:
It takes VS 2008 20 seconds to start on my machine
4 seconds on mine, plus 10 seconds to rebuild a 120kloc, 16 projects solution. :cool: Time to buy a new PC Christian?
If you truly believe you need to pick a mobile phone that "says something" about your personality, don't bother. You don't have a personality. A mental illness, maybe - but not a personality. - Charlie Brooker My Photos/CP Flickr Group - ScrewTurn Wiki v3
-
call me Cassandra.
Agh! Reality! My Archnemesis![^]
| FoldWithUs! | sighist | µLaunch - program launcher for server core and hyper-v server.peterchen wrote:
call me Cassandra.
;)
“Follow your bliss.” – Joseph Campbell
-
Hi, Does anyone know of a Text Viewer, (for basic .txt Files) which does NOT facilitate editing or Saving. :)
Bram van Kampen
-
Hi, Does anyone know of a Text Viewer, (for basic .txt Files) which does NOT facilitate editing or Saving. :)
Bram van Kampen
-
Is the 32757 line limit a major issue ? Because the rest seems easy to deal with. Just don't make it read only, but write code to reject all keypresses.
Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
Even simpler: Keep it readonly, intercept the WM_CTLCOLOR message, set the device context's background color to white, and return a white HBRUSH.
Software Zen:
delete this;
-
Hi, Does anyone know of a Text Viewer, (for basic .txt Files) which does NOT facilitate editing or Saving. :)
Bram van Kampen
Just going by what's been described, wouldn't it be easier (and safer) to configure the file security to disallow modifications instead? Use any text editor you want at that point and save is disabled. It also means that people that decide not to use your text editor (because some people are sneaky that way :P) still can't edit.
-
Took me a few minutes. The drag/drop logic tripped me up a bit.
:laugh:
Time you enjoy wasting is not wasted time - Bertrand Russel