|
You could write some VBA, or whatever it's called now, code that interface to a service. (I don't know enough about VBA to know how this would be done but I believe it's doable.)
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|
If any modification the user can do causes a call to SetModifiedFlag() then you could time things of this. You would also have to take account of which view was active.
So, have a timer going once/sec in mainframe.
Any OnActivateView()/SetModifiedFLag() causes the mainframe 60 sec count to be reset.
Else, increment the active documents time variable.
Roger Allen - Sonork 100.10016
If your dead and reading this, then you have no life!
|
|
|
|
|
My app starts off with a splash screen,
BOOL CSTrainApp::InitInstance()
{
CWzdSplash wndSplash;
wndSplash.Create(IDB_BITMAP4);
wndSplash.UpdateWindow();
The next thing in my MDI app that shows up is the messagebox:
int nFresh = AfxMessageBox(" Revert to saved settings?", MB_YESNO);
Now when I run the app, if I click off the messagebox (without having selected Yes or No), the app gets minimized ( so far only the splashscreen and messagebox were showing). Now if I try to restore the icon, I just get the splash screen back and the messagebox is irretrievable. Even worse i can only terminate the app through the task manager. What can I do to make my messgaebox come back up when I restore the minimized app?
Thanks,
ns
|
|
|
|
|
Is the call to AfxMessageBox() in your app's InitInstance() ?
/ravi
Let's put "civil" back in "civilization"
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
OOps -- forgot to say its in the OnInitialUpdate().
BTW I wanted to see where the code execution goes after OnInitialUpdate() but if I step through i end up in a disassembly window .................how does one find out which function runs next? Or is it a fact that the UI is spawned at the end of OnInitialUpdate() and the next step is eventgoverned by user action..........??
Actually I ssee that mmediately after OnInitialUpdate() ends , the UI doesnt really come up and I keep stepping through the disassembly...
Thanks!
|
|
|
|
|
This sounds familiar - I recall you were trying to do something like this some months back.- It's unwise to display dialogs from within a view's
OnInitialUpdate() handler. Instead, post an internal command to the view (eg: IDC_SHOW_MY_MESSAGE ) at the end of OnInitialUpdate() and write a handler to for that command that does the AfxMessageBox() .
- Also consider doing the
AfxMessageBox() from within InitInstance() if possible. /ravi
Let's put "civil" back in "civilization"
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
|
This could well be a problem with windows XP itself.
Recently, when I try and shut down my computer when I have applications minimized, some popup a messagebox to ask a question, and XP doesnt show it. You cant switch to the application except through task manager, and then the messagebox is not shown either, and doesn't accept the keyboard input. Only option - Kill it through task manager.
Roger Allen - Sonork 100.10016
If your dead and reading this, then you have no life!
|
|
|
|
|
Well......this is Win 2K. But yes --- same problem. This particular program I can redesign but its going to take a bit of work. Cant send it out the way it is............
|
|
|
|
|
Hello,
who can I catch Outlook events, for example
the user creates an new Contact.
I have to react to this events in C++ .
Can someone give me an example, please !
|
|
|
|
|
I don't have a code sample handy but I may be able to get one over the weekend if you want. Basically you have to create a reference to the outlook com object and create an event sink for the new contact event.
|
|
|
|
|
Thank you, that would be great if you would have some code for me.
How can I get the code ?
|
|
|
|
|
|
do you have a simple example for me, how I
can catch creating an new contact.
(I´m not so familar wiht automating outlook)
Thank you,
JohnX
|
|
|
|
|
How to show my dialog application (when restoring it from the system tray) above all non topmost windows?
|
|
|
|
|
SetWindowPos (CWnd::wndTopMost, 0, 0, 0, 0, SWP_NOMOVE | SWP_NORESIZE);
/ravi
Let's put "civil" back in "civilization"
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
I just created a new Dialog, associated with a class. Now I go into the main Dlg class. Why is the backgroud color in the new dialog when I call DoModal for it a dark grey and it has teh Ok Cancel buttons which do not appear in the Resource file?
-Steven Hicks
CPACodeProjectAddict
|
|
|
|
|
I have code where I am reading file. After I get the line into buffer I am trying to find first occurence of '*'.
How do I get the data from which is before the first occurence of '*'?
inFile.getline(inBuffer,'~');
char* p = strchr(inBuffer, '*');
|
|
|
|
|
You could temporarily stick a '\0' in it, like so:
char* p = strchr (inBuffer, '*');
if (p != NULL) {
char ch = *p;
*p = '\0';
printf ("Data before * is = %s\n", inBuffer);
*p = ch;
}
/ravi
Let's put "civil" back in "civilization"
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
I have one more question. I need to compare this data. Some time the len of the data can be 2 or 3 characters. My question is how do I compare this data if len is changing?
Example:
in file: compare to:
test test
sd sd
|
|
|
|
|
Use strcmp() to compare strings, strlen() to get the length of a string.
/ravi
Let's put "civil" back in "civilization"
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
So that means I have to declare 2 variables with 2 and 3 len. I was hoping is theire is somre way to declare 1 variable with 2 character and then in a run time if it's more that 2 char change to 3 char.
|
|
|
|
|
Sorry, I don't understand your question. If you want to test the length of a string, just use strlen() and compare its result to 2 or 3.
/ravi
Let's put "civil" back in "civilization"
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
Compare with what, exactly?
If you want to compare each pair as "test" and "test", then "sd" vs "sd", then you really need to look at breaking up the input string into separate components (hint: strtok)
Steve S
|
|
|
|
|
Hi,
I am using the GDI+ DrawString() function with a bounding rect
to control the string positioning. While everything looks
great on my view, when I try to print using the same code,
the strings look extremely out of proportion (much larger)
and they don't fit in my rectangles.
Any suggestions?
|
|
|
|