473,396 Members | 1,996 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Win32 Edit newline

I have a win32 app which get text from an edit box and stores it in a dynamic array, I was wondering how to make my program ignore the newlines from pressing enter and not show them a part of the dynamic array. The newlines appear as || in my array.
Sep 18 '07 #1
6 2339
sicarie
4,677 Expert Mod 4TB
Moving to Forum section (please double-check next time and make sure you're not in the 'Articles' section. Thanks :)
Sep 18 '07 #2
Savage
1,764 Expert 1GB
I have a win32 app which get text from an edit box and stores it in a dynamic array, I was wondering how to make my program ignore the newlines from pressing enter and not show them a part of the dynamic array. The newlines appear as || in my array.
There are several ways,here are two:

1.Tokenize the string.

2.Loop trough your array and search for '\n',when you find it, delete it and on it's space put a string terminator.

Savage
Sep 18 '07 #3
There are several ways,here are two:

1.Tokenize the string.

2.Loop trough your array and search for '\n',when you find it, delete it and on it's space put a string terminator.

Savage
For some reason looping through the array to delete it doesn't seem to work, it will delete the first of two pipes, then terminate the loop.
Sep 19 '07 #4
Savage
1,764 Expert 1GB
For some reason looping through the array to delete it doesn't seem to work, it will delete the first of two pipes, then terminate the loop.
Can you show us how have you implemented it?

Savage
Sep 19 '07 #5
Can you show us how have you implemented it?

Savage
I have fixed this problem.
Sep 19 '07 #6
sicarie
4,677 Expert Mod 4TB
Do you mind posting how, in case anyone else has a similar issue?
Sep 19 '07 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Chuck Rittersdorf | last post by:
Hi There I am having a problem using the win32 API from VB6. I am trying to send a command string to a printer(zebra TLP 2742) on LPT1 using the folowing API functions CreateFile and...
19
by: Dave | last post by:
Hi, I have done some research, trying to Clear The Screen in java code. The first option was the obv: system.out.print("\n\n\n\n\n\n\n\n\n\n\n\n"); then i heard about this method:...
4
by: Jed R. Mallen | last post by:
Hello, Can anyone point me to a nice tute on making python apps for win32? TIA
0
by: Prabhu Ramachandran | last post by:
Hi, I noticed peculiar behavior under Python-2.3.4 under Win32. When I run something like this: f = open('t.txt', 'wb') f.write('1\012'+'2\012'+'3\012') f.close() f = open('t.txt', 'r')...
0
by: John Browne | last post by:
I was attempting to set up my psql client on the Win32 version of postgres 8.0 beta 2 to be able to use an external editor. I set the environment variable in windows like so: ...
4
by: Peter Kirk | last post by:
Hi I would like to ask a little bit about the value Environment.Newline: what is it and what is the point of it? Ok, I can see in the docs that it represents "newline" for the current platform -...
0
by: artofsuntzu | last post by:
I am trying to use Win32 API in Visual Basic 6.0 to get the text from a third party program that is using an Edit Control Window within a #32770 DialogBox. But I am unable to find any SendMessage...
8
drhowarddrfine
by: drhowarddrfine | last post by:
I have to write/get some code to poll a linux server and securely download a web page (or text file) and print it on a remote XP computer's printer. I have not done any Windows programming in years...
6
by: Perl Beginner | last post by:
Good morning all, I had to reinstall Perl (ActivePerl 5.10.0 Build 1004) on my computer (Windows XP), the install went fine. however, I'm having issues loading Win32-GuiTest using the repository in...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.