|
Dharmendra Bhargava wrote: I have an application and it can be executed both through the command prompt and by double clicking the application file (i.e. App.exe)...so if i can identify somehow the way it is invoked, i might make a fix for it.
Add some command-line argument to the one that is double-clicked (in Explorer).
"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
|
|
|
|
|
Which directory do you want? The one where your executable resides or the one from where you launch it (which could be a different directory)?
In case you need the directory where the executable is located you can use GetModuleFileName() as already suggested.
|
|
|
|
|
I have created a Dialog using Visual studio 2003. in that dialog i have couple of control buttons. And those buttons are in tab stop order. In 1st tab stop 1st button is focused, and if i click space bar than it got clicked. So i expect the enter click should work in the same way when the button is focused. Is there any other property need to set to acheive that....
thanks in advance.....
Birajendu
SonicWALL
Bangalore
India
|
|
|
|
|
Look at the BS_DEFPUSHBUTTON style. The button that has this style is what is invoked (clicked) when you hit enter.
onwards and upwards...
|
|
|
|
|
Thanks for the quick reply.
But in VC++ IDE i did not get the button style property, I think i can do some thing like sendmessage() to the pertucular button to chnage style but i dont how to do that that. Do you have any idea?
Thanks in advance....
Birajendu
SonicWALL
Bangalore
India
|
|
|
|
|
In the dialog editor, look for the Default Button checkbox option.
onwards and upwards...
|
|
|
|
|
Hello Experts,
I am writing a client-server application on Windows XP. My Server application varifies if both client and server are on same host by comparing its own host name( obtained using gethostname() API) with what is configured as the client name in a configuration file. This entry in the configuration file is filled with hostname command run in a batch script. Thus in order for both the names for a given host to match - value returned from hostname command and gethostname() API should be same. I know that gethostname() API always return standard host name of the host, but i am not sure about hostname command. My query is - "If the hostname command is run without any option, does it return standard host name of the host?"
- learner_28
|
|
|
|
|
learner_28 wrote: If the hostname command is run without any option, does it return standard host name of the host?
Well it does on my PC!
|
|
|
|
|
|
Hello All:
As you know the 'const' key word just make the Variable const when it be compiled.
Now I wana get a method what can Achieve run-time const.
|
|
|
|
|
First of all, tell us what scenario that you're encountering requires 'run-time const' items? What are you seeing that makes 'compile-time const' unsuitable?
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
I got this question from a friend,he just gave me such scenario,I think it is Similar as stack/Heap..
|
|
|
|
|
So what is the correlation between "run-time const" and stack/heap?
"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
|
|
|
|
|
It is the correlation between "compile-time const"/"run-time const" and stack/heap
,the "compile-time const" use the key word const,I wana get a method to achieve "run-time const"
,such as below:
int num = 0;
//
//change the num
//
if(num > 100)
{
MakeItConst(&num);
}
|
|
|
|
|
hxfaido wrote: It is the correlation between "compile-time const"/"run-time const" and stack/heap
But what does the stack/heap have to do with any of this?
hxfaido wrote: ,the "compile-time const" use the key word const,I wana get a method to achieve "run-time const"
,such as below:
int num = 0;
//
//change the num
//
if(num > 100)
{
MakeItConst(&num);
}
Wrap num up in a class and make it a private member.
"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
|
|
|
|
|
I don't think you can directly do this.
You could wrap the variables in getters/setters with a extra parameter to mark the variable "const".
This signature was proudly tested on animals.
|
|
|
|
|
In general, a variable that's const will be placed in a read-only section of the PE[^] file and so will be read-only at run-time. This begs the following question: what's the question you're asking? By "run-time const" do you mean that you want a variable that you can toggle between read-only and writeable at run-time or just a variable that can't be altered (in both cases the read-only-ness is obviously enforced by the OS and not just the langauage)? Perhaps something else?
Steve
|
|
|
|
|
Hi All,
I want to provide username and password in the winlogon dialog box using my service without using my custom GINA.dll . I am using Windows notification packages. Is it possible to do so?
Whenver my service locks the computer my service will unlock it automatically after some time inverval. Is there a way to interact with the Winlogon.exe(msgina.dll) for this pass through authentication.
Recentrly I installed Logmein and it has this kind of feature implemented. You remote control a PC using logmein and if a computer is locked or logged off it automatically logs in or unlocks the computer without reentering the username and password
|
|
|
|
|
hi,all
I want to do the lipsync for my cg animation. I think I have to get the time of Phoneme/Viseme
in the audio file. My questions are:
1.How to get the time of Phoneme/Viseme in audio file (e.g.wav/ogg/...)?
2.Can i get the Phoneme/Viseme in Ogg(or other format) file if any?
3.I know Microsoft Agent 2.0 Tool:Linguistic Information Sound Editing Tool can generate *.lwv file
from *.wav, and *.lwv contains the information of Phoneme/Viseme.
But, it seems that the fomat of lwv file is not open. So, Is there any way to get
the time of Phoneme/Viseme in lwv file?
4.Or, Is there any free software available which can generate the Phoneme/Viseme information
from audio file?
Sorry for my english. And Thank you in advance.
|
|
|
|
|
Wrong forum
Величие не Бога может быть недооценена.
|
|
|
|
|
Then tell him what the right forum is.
|
|
|
|
|
Sorry for the delay
i think it will be more suitable forum than this
General-IT-Issues.aspx[^]
Величие не Бога может быть недооценена.
|
|
|
|
|
Hi there,
this might be a slightly stupid question, but when I write a single BYTE into a file (using ofstream), does it need to be null-terminated? Do BYTE streams generally have to be?
Example code:
char* buf = new char[128];
sprintf_s( buf, 128, "TestOutput/RTPEngineBin%04d.out", m_iFileCount );
m_oStream3.open(buf, ios::out|ios::binary);
if( !m_oStream3 )
{
}
for( int i = 0; i < 12; i++ )
{
m_oStream3 << header[i];
}
m_oStream3 << data;
m_oStream3.flush();
m_oStream3.close();
delete [] buf;
This is a small rtp package. Header has 12 bytes and the payload is just a single byte.
Cheers
Souldrift
|
|
|
|
|
Souldrift wrote: when I write a single BYTE into a file (using ofstream), does it need to be null-terminated? Do BYTE streams generally have to be?
No to both. NULL-termination is merely a C convention for the representation of strings.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Souldrift wrote: Do BYTE streams generally have to be?
Short answer is no.
Since it is your application it is your decision. The only thing to bear in mind is that the program that reads the file needs to understand, and use, the same format rules as the program that writes it.
|
|
|
|