|
I am using VC++ MFC control.I am having a form which contains a combobox,a listbox and button..now I hv few text files say for example abc.txt,cdf.txt and so on..Now if I select a particular name say abc from combobox all the parameter names which is in that file "abc.txt" will automaticaly get displayed in the listbox.Each file has a parameter number ,name and value,so while displaying the parameter names I have used indexes.
So the format stored in the text file is as follows:
Format: Example:
index no 0
parameter no1 4
parameter name1 fdf
paramter value1 A3434
index no 1
parameter no2 7
parameter name2 eter
paramter value2 B3565
.. ..
.. ..
and so on..
These values are copied into these text files from a particular text file
which contains parameter no,paramter name and parameter value without index numnber.I hv used it for displaying names on the listbox.
So my doubt is:
How to display the list of parameter names of each text file whenever the file is selected using combobox on the list box without using the index numbers.I dont want to use it since it takes extra space in the file.Is there anyway to do this?Please suggest me and help...
|
|
|
|
|
i have a cwnd object, and i have another one inside a cformview
i think the one inside the cformview is not capturing the notifications
NM_CLICK, for example, pretranslatemessage still gets them, but onnotify doesnt
the one outside the cformview works fine
any suggestions? thanks
|
|
|
|
|
Hi all,
I am currently writing a program that will be running on an XP-embedded machine that will act as a watchdog and launcher of another application. Naturally, since this needs to be persistent on the machine, it makes since to write it as a windows service. However, I'm not sure what benefits this will have over a standard application because I have not had a great deal of experience writing services. For one, these machines will never be touched by end-users so an application running in the taskbar would not have the problem of an accidental closure or user error. Two, this program may require relatively constant communication with the application it opens and know if it dies so it can report back to a central server, as well as status update to said server.
So I guess my overall question is are there any caveats to writing this as a windows service? Is there any performance gain or loss when it comes to messaging between the applications? Any opinions and thought are greatly appreciated.
Thanks,
Dustin
|
|
|
|
|
I work on XPe and we do everything quite deliberately as applications, not services. The only real benefit a service has is the built in ability to be restarted by the service manager. Our solution is make sure our "services" don't crash. (Some of our services can't really be restarted anyway
On the negative side, services are annoying to debug (when problems happen when in service mode) and maintain in an XPe environment. In our case, we push down updates, the machine reboots and the updates are xcopy installed. Can't do this with services.
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|
Thanks Joe, that is very informative and helpful. We actually just had another meeting about it and I believe we are turning away from the service idea.
Thanks,
Dustin
|
|
|
|
|
Hi,
Need source code check whether an excel file is already open or not using vc++ code.
I have searched the net,I do not find any related with this task.Please help as soon as possible
Regards,
Abraham.R
|
|
|
|
|
|
Hi Still i am not able to achive it.
I cannot use your dll,can you please tell me any other way i can achieve this requirement ?
|
|
|
|
|
I believe Excel files are locked for writing, so perhaps you could open the file requesting exclusive access.
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|
Hi,
I want to restrict the user to avoid operation on that excel file,when the excel file is in open state.
so i need to indentify by some means to check wether the excel is in open state.
I need to write VC++ Code on this requirement.
Please help.
Regards,
Abraham.R
|
|
|
|
|
There's this utility: http://technet.microsoft.com/en-us/sysinternals/bb896655.aspx Mark used to publish the source and it may still be available somewhere. You could ask on the forums from the sysinternals subsite.
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|
Abraham Betty wrote: want to restrict the user to avoid operation on that excel file,when the excel file is in open state.
so i need to indentify by some means to check wether the excel is in open state.
I think what Rajesh[^] said is a right choice for you.
Abraham Betty wrote: I need to write VC++ Code on this requirement.
You can check the Running object table for an already running instance of Excel. Get the properties of the document object to check whether it is your excel file.
You may get the VC++ code and details from this MSDN KB Article[^]
|
|
|
|
|
can you help with some othe option ?
|
|
|
|
|
Did you try the option which I mentioned in my previous post ?
Using GetActiveObject()[^] ?? to check whether excel is already running or not.
|
|
|
|
|
Hi The one that you have mentioned is VB code. I need to replicate the same in VC++
Thanks in Adv
|
|
|
|
|
Abraham Betty wrote: The one that you have mentioned is VB code.
What I mentioned in last post[^] was VC++. Please click on this link to see the same VC++ code for checking whether excel is running or not.
Check this page to know more about Office Automation Using Visual C++[^]
Abraham Betty wrote: I need to replicate the same in VC++
You can! but have to spend some time over these pages I think.
|
|
|
|
|
Abraham Betty wrote: so i need to indentify by some means to check wether the excel is in open state.
So did you even bother trying to open it?
"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 everybody,
I builted an aplication that read emails from windows Mail. The MAPILogon returns 0, but when a try to send a MAPIFindNext before to use MAPIReadMail the return code is 16. There are emails unreaded in windows mail and i thing that the return code must be 0 for MAPIFindNext.
The windows mail is the default email manager.
I created an email account as "softools" and conected it to samuel.softools@ig.com.br
The MAPI in WIN.INI is 1 and set to MAPI32.DLL. I Loaded the MAPI31.DLL correctly with loadlibrary().
I thing is everything is fine but nothing is heppening
Some can help me ?
Sorry by poor english !
|
|
|
|
|
|
Mohammadj wrote: Any ideas?
Something similar to this?
"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
|
|
|
|
|
Thanks
What I want is to add dual functions to it
like multiply divide on the same button or Fahrenheit To Celsius and vice versa on the same button
The one you showed displays different texts not what I want
Thanks
|
|
|
|
|
Mohammadj wrote: like multiply divide on the same button or Fahrenheit To Celsius and vice versa on the same button
The one you showed displays different texts not what I want
You seem to be contradicting yourself. "Multiply" and "Divide" are different, as are "Fahrenheit" and "Celsius."
"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
|
|
|
|
|
As you can see the button have 2 hover states
What I intent to do
if the user clicked on the left half the button perform division or Fahrenheit to Celsius if the user clicked on the right half the button perform multiplication or Celcius to Fahrenheit
The button perform 2 operations depending which half you click
TY
|
|
|
|
|
Mohammadj wrote: The button perform 2 operations depending which half you click
Which is exactly what the article I pointed you to does, although it has 8 "sides."
"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 just displays different text loll
i want the button to perform 2 actions
|
|
|
|