|
It will not impact the generated code.
Steve
|
|
|
|
|
Thanks Steve!
regards,
George
|
|
|
|
|
I just succeeded in doing it just fine in MSVC6. Here’s what I done:
- Created a console application and pasted in your code.
- Switched to the release configuration.
- Selected “Project”->“Setting…” from the menu.
- Selected the “C/C++” tab (“General” should be selected in the “Category” combo).
- In the “Debug info” combo I selected “Program Database”.
- Switched to the “Link” tab.
- Selected “Debug” in the “Category” combo.
- Ticked “Debug info” and selected the “Microsoft format” radio button.
- Made sure “Separate types” was *****NOT***** selected.
- Build it and loaded it up in WinDBG and issued the following command: bp George!foo
- Let it run.
Steve
|
|
|
|
|
|
i hav made 3 dialog based application and i want to execute other application from one application on a button click in 1st application
can any1 help
|
|
|
|
|
|
|
Hi
Does anyone know What this function actually does. I've created a Setup Program which adds various entries for file types which are Seldomly used, but, which are crucial files to unravel a screwup.
All the client has to do, is, under guidance of our support team, double click the file with the requisite extension, and the recovery program should run. The Only thing that may never have happened is the Prior running of 'EnableShellOpen' from within the particular App. How would this affect things. I do not use anything like DDE, COM, OLE, or whatever other incantations. All Apps communicate by directly reading from, or writing to Files on the Server.
Regards,
Bram van Kampen
|
|
|
|
|
Bram van Kampen wrote: Does anyone know What this function actually does.
Are you using it in conjunction with RegisterShellFileTypes() ? You could also supply a .reg file with your application for manual registration of document types.
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
No, I culled items from MFC, and am generally 'Rolling my Own'
I am not using the 'MFC Document type architecture'
I've written the code to emulate 'RegisterShellFileTypes()'
All I require is that the shell launches the App, with the File name on the Command line. See also my conversation with Mark Salsburry on this.
Regards,
Bram van Kampen
|
|
|
|
|
According to the source code, it sets things up so DDE can
be used by the shell to pass an open command to your app if it's
already running.
See CWinApp::OnDDECommand()
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Hey y'all,
How would I make a DialogBox a child window of the main View window in an SDI project?, or am I going about this wrong?
By the way I'm using C++ 6.0
Mike
|
|
|
|
|
Mike Hankey wrote: How would I make a DialogBox a child window...
The CDialog constructor takes a parent as one of its arguments.
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
David,
You are right...is my thinking right;
CCeDBTestView::CCeDBTestView()
{
poutputDlg = new COutputDlg;
poutputDlg->ShowWindow(SW_SHOW);
}
I get an ASSET failed in winocc.cpp
I show be able to create it then show it? I'm obviously missing something?
Mike
|
|
|
|
|
You need to call Create with the pointer created by new.
Try this:
CCeDBTestView::CCeDBTestView()
{
poutputDlg = new COutputDlg;
if (poutputDlg != NULL)
{
if (poutputDlg->Create(COutputDlg::IDD,this))
poutputDlg->ShowWindow(SW_SHOW);
}
else
AfxMessageBox("Error creating OutputDlg!");
}
|
|
|
|
|
NO still no luck...Thats basically what I had to begin with but tried to narrow things down, same error goes south on the ShowWindow staement?
Thanks for your help
Mike
|
|
|
|
|
Does your child dialog include an ActiveX control?
|
|
|
|
|
No right now it doesn't contain anything. What I wanted to use it for is a container for controls and have several where I could switch views.
Mike
|
|
|
|
|
Come to think of it, creating the child dialog in the view constructor is not the right place. The view window has not been created yet.
Try creating the child dialog in the OnInitialUpdate handler for the view. Alternatively you can create your child dialog in the OnCreate handler (after you have called CView::OnCreate).
I just created a simple SDI app and tried creating a child dialog in the constructor and saw the same ASSERT you are getting. I then moved the child creation code into OnInitialUpdate and the child dialog was created successfully.
|
|
|
|
|
Your right my bleary mind didn't pick up it til you mentioned it. )
Thanks,
Mike
|
|
|
|
|
For a modal dialog box, try:
CCeDBTestView::CCeDBTestView()
{
COutputDlg poutputDlg(this);
poutputDlg.DoModal();
}
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
the below function tokenize the string "ram,red,orange,,blue,,yellow,white" as
ram
red
orange
blue
yellow
white
but I want a "sapce" if no value is present between commas. So that result should be
ram
red
orange
blue
yellow
white
- Nandu
void Tokenize(const string& str, vector<string>& tokens, const string& delimiters )
{
// Skip delimiters at beginning.
string::size_type lastPos = str.find_first_not_of(delimiters, 0);
// Find first "non-delimiter".
string::size_type pos = str.find_first_of(delimiters, lastPos);
while (string::npos != pos || string::npos != lastPos)
{
// Found a token, add it to the vector.
tokens.push_back(str.substr(lastPos, pos - lastPos));
// Skip delimiters. Note the "not_of"
lastPos = str.find_first_not_of(delimiters, pos);
// Find next "non-delimiter"
pos = str.find_first_of(delimiters, lastPos);
}
}
int main(int argc, char* argv[])
{
vector<string> tokens;
vector<string>::iterator it;
string str = "ram,red,orange,,blue,,yellow,white";
Tokenize(str,tokens,",");
cout<<str;
for (it = tokens.begin(); it <tokens.end(); it++)
cout<<*it<<'\n';
getch();
return 0;
}
|
|
|
|
|
|
|
Hi,
Below code shows how to get the last occurrence of a string. But in this case string::rfind reads the string from the starting and gives the last occurrence.
string str ("The sixth sick sheik's sixth sheep's sick.");
string key ("sixth");
size_t found;
found=str.rfind(key);
if (found!=string::npos)
str.replace (found,key.length(),"seventh");
cout << str << endl;
(EXAMPLE:1)
But I need a code to find the last occurrence of a string reading it from the last rather than reading it from starting. Using only string operations.
This is because I have a requirement where I need to read a string from the end, improve the performance as below shown scenario
#STAR
Data…
Data..
…………
……….
Data……
#END
We will receive a huge string (about 10mb) of data from server as show above (in the above format). To confirm that we have received the whole set of data, just check for #START and #END tag. As of now I am reading the #END using string::rfind(), which takes some time to give the result. So is there any to find a word in a string reading from end. Reading from the end will reduce the time for finding the #EDN tag.
So please proved a solution to read a string from the end.
-Nandu
|
|
|
|