|
Stuart Dootson wrote: No, you need to quit your job so you cna spend all day scanning the CP forums
Actually that's exactly what I'm doing... (just kidding, boss!).
Stuart Dootson wrote: Do it long enough and you might start posting answers before the questions appear....
Well, that's actually pretty easy, for instance:
- "We don't make homework for you".
- "Please don't use
CString::GetBuffer() ". - "Urgentz questions go immediately at the bottom of the stack"
are already in the ready-answers-for-incoming-questions queue.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
hwta about fast finger
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
There is no such function like PathStripPath () in MFC can you please help me some other similiar function
Thanks
|
|
|
|
|
Well there is in Win32 API [^]. Are you aware MFC applications may actually access Win32 API ?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
It's an API function and if your compiler says there's no such function, you're probably using a very old SDK.
You can either download the latest SDK, or use PathFindFileName()[^].
Note: You must link to shlwapi.lib and include shlwapi.h to use this function.
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
GetModuleFileName [^].
Then you've just to extract the filename from the full path.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
kapardhi wrote: Can i get the name of this .exe programmatically.
within my application.
You can use __argv[0] .
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
If yes:
Why?
If no:
1) Why?
2) How to do it
Thank you masters!
modified on Wednesday, April 1, 2009 7:48 AM
|
|
|
|
|
See here.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Hi,
In my application I am using Active Sync to connect my PC to Mobile(Windows Mobile).I am using CeCreateProcess() function to invoke exe in mobile.I need to abort my application.
For that I have created one button on my dialog.I have added event handler to that.I have added
PostQuitMessage(0);
while running the application If I click on "Abort" button application is not closing at that point.After completion of present running task only application is closing. For example I am executing testcycle.In the middle I need to abort my application.Can anyone help me.
Rekha.
|
|
|
|
|
The clue is in the api command's name.
PostQuitMessage (0) .
It POSTs a WM_QUIT message to the message queue. This is a signal for your message loop to exit.
While you are still in a function, you're not handling messages... so you don't quit.
ie:
void CMyApp:OnSomeButton ()
{
PostQuitMessage (0);
Sleep (10000);
}
will take 10 seconds before it even could quit.
Not knowing what you're doing, that's as helpful as I can be at the moment.
In the process of moving to Sweden for love (awwww).
If you're in Scandinavia and want an MVP on the payroll (or happy with a remote worker), give me a job!
|
|
|
|
|
Hi,
In my Application I am connecting to Mobile and sending data to Mobile from my computer using socket.And I am receiving information from Mobile.
If I click on Abort button I need to stop Application.I am using MFC.
Can I use PostQuitMessage(0) for this?
|
|
|
|
|
hemlat wrote: Can I use PostQuitMessage(0) for this?
YES.
Now go and read my message again - it won't stop straight away. If you do many other things after the PostQuitMessage command, it will do them first.
Iain.
In the process of moving to Sweden for love (awwww).
If you're in Scandinavia and want an MVP on the payroll (or happy with a remote worker), give me a job!
|
|
|
|
|
exit [^] instead of PostQuitMessage ?
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Hi,
exit is not working.I am sending Data from my PC to Mobile.And I am receving data from my Mobile by using socket.I need to abort this operation.
|
|
|
|
|
it seems to dialog based application, why don't your try EndDialog() api!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
I need to close application immediately after clicking the abort button.
|
|
|
|
|
call EndDialog there only!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
i define my own reserved keyword like"_if,_while" and some operations
like "move","opendialogue" and some complex operations"<=","=="
and now i want to make a compiler to analyse "myself language"
how to make
thank you everybody
modified on Wednesday, April 1, 2009 6:15 AM
|
|
|
|
|
jeansea wrote: How I let compile know what i want to do
That's what source code is for...
Beyond that, I have no idea what you're asking.
Before writing code, you need to have a clear idea yourself what you want the computer to do for you. You need to be able to do the work yourself with pen and paper, then convert that to computer code.
Good luck,
Iain.
In the process of moving to Sweden for love (awwww).
If you're in Scandinavia and want an MVP on the payroll (or happy with a remote worker), give me a job!
|
|
|
|
|
sorry for my poor english
i know i write the code in a file IF.txt
now compiler to read the IF.txt
then to execute the code in IF.txt,i don't know now to execute the code
in IF.txt
holp you can realize what i say
|
|
|
|
|
jeansea wrote: sorry for my poor english
I don't mind - I was just having trouble working out how to help you.
Why are you writing code in a txt file? You are posting in a C/C++ forum, so what's wrong with writing C code?
If you are meaning some sort of script you can change anytime, then look at different technology, like (old timers shout "hey!") bat files, or the new windows scripting host scripts.
I haven't played with the new scripting very much though.
As CPallini said, maybe you should buy a book on C, and start reading. Hopefully it will make some sense - even if it only helps you ask more solid questions.
Good luck with your journey,
Iain.
In the process of moving to Sweden for love (awwww).
If you're in Scandinavia and want an MVP on the payroll (or happy with a remote worker), give me a job!
|
|
|
|
|
C++ is not a scripting language, so you can't compile things on the fly. You could however write your own 'scripting' language but if you need something a bit evolved, that would be a crazy solution. Why don't you instead integrate an existing scripting language into your application ? Take a look at LUA[^] for instance.
I guess that's what you are looking for but your question is not very clear. So if that's not waht you are looking for, rephrase your question so that it is a bit more understandable.
|
|
|
|
|
What are you trying to do?
Do you want to use your file as input for the C++ compiler?
If the answer is yes then you've to follow some rules, i.e. read a good C/C++ tutorial and try again.
Do you want instead to write your own compiler/ interpreter?
Then you should really read some good book about.
Do you want just to write a script?
Then have a look, for instance, at JScript or VBScrip t documentation.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
i want to write my own compiler/ interpreter
|
|
|
|