|
Can any1 tell me how do i detect start and close of FireFox browser?
Does it send any message or generate any event at time of start up and closing?
Please tell me kinda solution which I can implement in MFC.
Thanks.
|
|
|
|
|
::WaitForSingleObject() is of any help ?
|
|
|
|
|
s_v_patel wrote: Does it send any message...at time of start up and closing?
WM_CREATE comes to mind. What exactly are you trying to accomplish?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
I want to retrieve the selected text from RichEditView Window and if image or any other thing is selected it should return empty string.
How to do the same. Any help will be appreciated.
Thanks.
|
|
|
|
|
See CRichEditCtrl::GetSelText and CRichEditCtrl::GetSelectionType .
Prasad
MS MVP - VC++
|
|
|
|
|
What kind of error is "Event index out of range"?
picm
|
|
|
|
|
when does it occur ?
and how does it show off ?
|
|
|
|
|
only in Release configuration end randomly.
In a message box.
picm
|
|
|
|
|
you don't provide much info, so it's quite hard to help.
btw, you seem to have a problem with your release compilation.
you should consider read this article[^]...
|
|
|
|
|
It isn't simple to provide more information. The message is showed randomly during the program execution . What kind of bug can generate the error?
thank you
picm
|
|
|
|
|
Can you pause the execution of the program when the message is displayed and then look at the call stack to understand where in your code happens the crash, and why?
Russell
|
|
|
|
|
The kind you get when your code does something wrong.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
hi all,
i will make my question more clear, i want to read a line of characters from a text file. The problem is i don want to read the ""(double quotes ) which is in the line.
line is like this
"string","12","23","32"...
how to access this values without " and comma...
thanks in advance
||SnAkeBed||
|
|
|
|
|
is philiptabraham another account you're behind ?
|
|
|
|
|
Can you not be bothered to look at the question IMMEDIATELY BEFORE YOURS?
Not to mention the answer was posted before your question also...
I'd understand if it was paaaages back, but one line?
It wouldn't be a class assignment you both had.....?
Your's crankily,
Iain
ps. Youth of today... sheesh... I remember when all this was vt100s...
|
|
|
|
|
swaroopkb wrote: , i want to read a line of characters from a text file. The problem is i don want to read the ""(double quotes ) which is in the line.
CString::Replace! and CString::Tokenize
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief
|
|
|
|
|
WOW! From India, interested in neural networks and you can't parse a simple line of text?
Try this:
1) Take programming course, or
2) Read a programming book, then
2) have an AHA! moment.
Good luck.
fscanf, sscanf, while 0 != x.read(), .....
|
|
|
|
|
can you tell me how to read and seperate the data from a .csv file.
The Content in my csv file is something like:
"Amount","29900.09","233399",""
can anybody tell me how to get the seperated data into an array
|
|
|
|
|
a) Read a line from a fstream using getline() into a string .
b) tokenize that string, either by running a loop over it searching for ",", or by using a tokenizer:
strtok would be the most hack-n-slay type function.
boost::tokenizer[^] would be considerably more flexible without being much more complex.
Try it! Then post your code here.
Though I speak with the tongues of men and of angels, and have not money, I am become as a sounding brass, or a tinkling cymbal. George Orwell, "Keep the Aspidistra Flying", Opening words
|
|
|
|
|
I want to get compile date-time to my project every time I compile it.
For confirm which one is new version of my program.
How can I do?
Thanks.
|
|
|
|
|
Can you be more specific? Do you want to do this from within the program or do you want one EXE to get the time another was compiled?
Steve
|
|
|
|
|
I want to know the last time that compiler compile my exe.
by call some function in exe.
Maybe include in the resource.
|
|
|
|
|
Here's an example of how an EXE can determine when it was linked. You may also want to check out the following link: http://www.microsoft.com/msj/0297/hood/hood0297.aspx
-----------------------------------------------------------------
// CommandLine.cpp : Defines the entry point for the console application.
//
#include "StdAfx.h"
#include <Windows.h>
#include <iostream>
#include <assert.h>
void main()
{
using namespace std;
// Get out module handle.
HMODULE hUs = GetModuleHandle(NULL);
// In Win32 a module handle is really a pointer to a "DOS header".
PIMAGE_DOS_HEADER pDOS = (PIMAGE_DOS_HEADER)hUs;
assert(pDOS->e_magic == IMAGE_DOS_SIGNATURE);
// Get the address of the "NT headers" from the "DOS header".
PIMAGE_NT_HEADERS pNT = (PIMAGE_NT_HEADERS)((char*)pDOS + pDOS->e_lfanew);
assert(pNT->Signature == IMAGE_NT_SIGNATURE);
// Get the link time.
FILETIME ft;
static const __int64 t1970 = 0x019DB1DED53E8000;
__int64 InNS = (__int64)(pNT->FileHeader.TimeDateStamp) * 10000000;
*(__int64*)&ft = t1970 + InNS;
// Display the date.
FILETIME ftLocal;
if ( !FileTimeToLocalFileTime(&ft, &ftLocal ) )
{
cerr << "'FileTimeToLocalFileTime' FAILED!" << endl;
return;
}
SYSTEMTIME st;
if ( !FileTimeToSystemTime(&ftLocal, &st) )
{
cerr << "'FileTimeToSystemTime' FAILED!" << endl;
return;
}
cout << st.wHour << ":" << st.wMinute << ":" << st.wSecond << " on "
<< st.wDay << "/" << st.wMonth << "/" << st.wYear << endl;
}
Steve
|
|
|
|
|
There are some ANSI macros that allow you to do this, e.g.
const char lpszBuildDate[] = __DATE__;
if you want the time, look up __TIME__
http://msdn2.microsoft.com/en-us/library/b0084kay(VS.80).aspx[^]
Peter
"Until the invention of the computer, the machine gun was the device that enabled humans to make the most mistakes in the smallest amount of time."
|
|
|
|
|
A good point. Note however that this technique can only be used to determine when the current EXE was built. The technique I gave above, with some small modifications, can be used on any PE file (not just the current EXE) built with any language. This may or may not be an issue to the OP however.
Steve
|
|
|
|