|
MFC is the Best wrote:
120 111 34 44 (between every number is a blank)
Why dont you just simply use CString::Find(' ', nStart) ?
So you can iterate over the whole Line and by remembering the result of Find() you can reuse it in the next Find() .
With CString::Mid(), you get the portion of the Text between the two finds.
|
|
|
|
|
Hi!
Since I found out, that under eMbedded Visual C++ 3.0 the CPropertySheet doesn't support the wizard style mode (see CPropertySheet::SetWizardMode ), I try to implement my own wizard dialog.
So, the first test version is ready to test... but I have one problem... At the moment I have got no device to test my application, so I only can make some tests with the emulator.
So, I would be happy, if there are some programmers who would test my application on some devices. I am also very happy, if they would take a look on my source code and give me some tips to make it better!
So, please give me a reply on this message with your e-mail and I would send you the source code of my eVC++ 3.0 application!
I have one proplem in my application... I have a command bar with some buttons... I want to enable / disable this buttons at a special time... to enable / disable the buttons I use the OnUpdate???(CCmdUI* pCmdUI) function... but the system will never call this functions in the emulator... so the buttons will every time enabled!
There are 4 important files in my application:
- Wizard.h
- Wizard.cpp
- WizardPage.h
- WizardPage.cpp
I have 3 wizard pages (simple dialogs IDD_PAGE1 , IDD_PAGE2 and IDD_PAGE3 ), who are subclassed from CWizardPage (see Wizard.h and Wizard.cpp).
The wizard dialog (CWizard ) is in Wizard.h and Wizard.cpp.
In the CWizardPage class you can find the CWizardPage::OnInitDialog function, where I detroy and delete the empty command bar of the wizard pages (dialogs), so that the wizard butons (back, next, ready and cancel) are always be visible.
In the CWizard class you can add some pages with CWizard::AddPage , in the CWizard::OnInitDialog function I create all the pages.
With the next and back button I show and hide the current page.
(Sorry for my bad english - I am learning!)
--
Nice greets, Daniel.
|
|
|
|
|
Let me see.
cward@sct.com
RebelCause
|
|
|
|
|
Hi!
Now I have my own PocketPC (a HP jornada) and I have tried my own Wizard-Style dialog, and it works very fine! I will create a simple sample application and will send it to you, if you want?
Daniel
---------------------------
Never change a running system!
|
|
|
|
|
|
Who can send me one?
Thank you very much!
nevergrief@hotmail.com
nevergrief@sohu.com
C++ lover ,haha
|
|
|
|
|
|
|
|
A basic introduction in debugger-development is contained in the book "Debugging Applications" from Microsoft Press.
Gero
|
|
|
|
|
If you are going to debug code running under windows, all the information you need are in the book "Debugging Applications" by John Robbins, from Microsoft Press.
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|
|
Anders Molin wrote:
"Debugging Applications" by John Robbins
Yes this is worth getting. Also check out John's ongoing series of Bugslayer articles on MSJ etc. These are all on the MS Web site.
Neville Franks, Author of ED for Windows. www.getsoft.com
|
|
|
|
|
Thanks for the recommendation, guys!
/ravi
Let's put "civil" back in "civilization"
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
In the Visual Basic WinSock control whenever some data is received to the computer, it goes to an event where you can then handle the data. In c++ i'm using winsock, and using the send and recv functions. My question is this: how will i know when some data is sent to my pc that i can recieve? do i have to have a thread with the recv function always running and then it runs a function whenever it recieves some data?
Thanks all!
-Rune Svensen
|
|
|
|
|
recv(...) is a blocking function, that means it doesn't return untill it receives data.
Well, it's up to you if you want to put it into a separete thread or not....
But I always put my recv function in a loop.... in the client I call recv just sometimes when I have to.
Do you understand?
Rickard Andersson@Suza Computing
C# and C++ programmer from SWEDEN!
UIN: 50302279
E-Mail: nikado@pc.nu
Speciality: I love C#, ASP.NET and C++!
|
|
|
|
|
The thing is. I have to different instances of the program, one connects to another and they're connected. Then either of the programs can try to send a file to the other application. So i don't know which program will send the file and then i can't set up a recv function that blocks until it receives some data. So so i just create a new thread that loops the recv function and handles the data?
Thanks for your help.
|
|
|
|
|
You can use asynchronous socket, but it's a bit more complicated. There should be some articles about it here on codeproject.
But if you want to use recv, which is a blocking function, you can use select to chech if theres data to read...
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|
|
A close analogy with MFC is the CAsyncSocket class. If you inherit from it and
override classes like OnReceive you should be able program in a manner more
familiar to you.
Good luck,
Iain.
|
|
|
|
|
After reading Petzold, books about Garbage Collection and looked at MSDN to much, I had the Idea of comming up with a new Framework for Windows.
Goals I want to settle:
- Fully Garbage Collected
- Fully Object-Oriënted (Well, except the generated _tWinMain...)
- Really easy to use
- Thread supported
Well, as you can see, these four things are the most complicated to do it all together, but it seems to me it has to be possible.
A problem is that I can't do this alone, (It would take me years, I'm studying, have a job, etc...) so I need some people to help me out.
I know that you guys are the best (well, most of you are), so what do you think???
If you want to join, post a message (also if you've got some Ideas). I really want to do this!
Sjoerd van Leent
LPCTSTR Dutch = TEXT("Double Dutch ");
This has to be replaced with:
OString *dutch = new OString("Double Dutch ");
|
|
|
|
|
S van Leent wrote:
After reading Petzold, books about Garbage Collection and looked at MSDN to much, I had the Idea of comming up with a new Framework for Windows.
Goals I want to settle:
- Fully Garbage Collected
- Fully Object-Oriënted (Well, except the generated _tWinMain...)
- Really easy to use
- Thread supported
Well, as you can see, these four things are the most complicated to do it all together, but it seems to me it has to be possible.
A problem is that I can't do this alone, (It would take me years, I'm studying, have a job, etc...) so I need some people to help me out.
I know that you guys are the best (well, most of you are), so what do you think???
If you want to join, post a message (also if you've got some Ideas). I really want to do this!
Sorry dude, but it has been done yet: it is called the .NET Framework.
"In an organization, each person rises to the level of his own incompetence." Peter's Principle
|
|
|
|
|
As I was expectiong this answer, not everything in this world is based on .NET, thereby, it's not only about useability but also about some fun.
LPCTSTR Dutch = TEXT("Double Dutch ");
|
|
|
|
|
Try googling for "Boehm GC".
|
|
|
|
|
Hi,
I have a VC+ 6.0 application, I would like that when it is launched (run) ... it's Dialog will be Minimized immediately so the user does not bothered it ... until they want so!
I did invoke CDialog::OnSysCommand(SC_MINIMIZE,SC_HOTKEY) & CWnd::OnSysCommand(SC_MINIMIZE,SC_HOTKEY) in OnInit() but it did not worked!
Any one can help?
Thank in-advanced,
|
|
|
|
|
See if this solution helps.
PostMessage(WM_SYSCOMMAND, SC_MINIMIZE);
Kuphryn
|
|
|
|
|
Hi Kuphryn,
Thank you very much for help, it works as a I wanted!
Many thanks,
ATC
|
|
|
|
|