|
Hi everybody, i'm trying to get an answer to my question: How to display a dialog in SDI app that has a class derrived from CRecordView?
But no one seems willing to tell me, or i'm trying smt impossible?
|
|
|
|
|
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
ivanris wrote: But no one seems willing to tell me, or i'm trying smt impossible?
Perhaps you are asking in the wrong place.
|
|
|
|
|
ivanris wrote: But no one seems willing to tell me, or i'm trying smt impossible?
This is very easy to do but I am not allowed to answer it here.
[EDIT]
Wait a minute wasn't this question in the lounge? If not I appologize.
[/EDIT]
John Last modified: Mon Aug 28 09:54:58 2006 --
|
|
|
|
|
you know john, some people can move threads around here... sorry, it was not a UFO
|
|
|
|
|
You've been answered more than once, with the most recent being a mere three minutes ago. See here and here. What exactly do you not understand?
"Money talks. When my money starts to talk, I get a bill to shut it up." - Frank
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
How to display a dialog in SDI app that has a class derrived from CRecordView?
|
|
|
|
|
ivanris wrote: How to display a dialog in SDI app that has a class derrived from CRecordView?
The same way you would any other dialog (e.g., DoModal() ). Having a CRecordView -derived view has no bearing on that.
"Money talks. When my money starts to talk, I get a bill to shut it up." - Frank
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
How do i can shell a program hidden and i want my program to wait until the shelled program ends.
thanks.
|
|
|
|
|
that's a "hard-to-undeerstand" english...
what do you mean by "to shell a program" ?
also, please rephrase your question in a more lexical speaking...
|
|
|
|
|
Can you be more specific,Do you need to ShellExecute
|
|
|
|
|
Sina Parastgary wrote: shell a program hidden and i want my program to wait until the shelled program ends
I think that you are starting a process from your application that should run hidden in the background and also not show itself in the System Process list.
Am I right?
Sina Parastgary wrote: wait until the shelled program ends
Are you trying to achieve this in two different process?. If yes you can use a shared variable. When the value of that shared variable changes post a message from your application and ask the parent application to quit.
I think I am on the right track in understanding your statement...
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
From what I understand you want to start a program using ShellExecute and wait for that 'shelled' program to end. If this is true, you can use the following -
1. Use FindExecutable() API to find the associated EXE
2. Use CreateProcess() API to create the process for the EXE got from step#1
3. Use WaitForSingleObject() API to wait on the process created in step#2
If you can state your problem more clearly, people here will be able to help you in a better way
S o h a i l K a d i w a l a
modified 21-Apr-21 21:01pm.
|
|
|
|
|
Use ShellExecuteEx() instead, followed by WaitForSingleObject() .
"Money talks. When my money starts to talk, I get a bill to shut it up." - Frank
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hi there,
I've now encountered a hard problem.
As we know, in a dialog-based program, when we press a
button, the windows wait for the corresponding procedures
to be executed. During executing those procedures, the other
windows message won't be taken care.
I've ever used a library, it provides two functions.
One is Go(), and the other is Stop().
I created two corresponding buttons ButtonGO, and ButtonStop
to do Go() and Stop().
I don't have to use AfxCreateThread in OnBottonGO. When I press
ButtonGo, the ButtonStop button is still pressable!
When I press ButtonStop, the OnButtonGo() function shall return.
How this can be done?
Any suggestion will be appreciated.
|
|
|
|
|
cwyang wrote: OnButtonGo() function shall return
Set a flag when you click OnButtonGo.Modify that flag when you click OnButtonStop.
In Go Function keep checking the value of the flag.If it's set continue with your processing else return from the function.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Method 1: use a shared boolean flag between your main thread and the Go-thread (protected by critical sections of course). When stop is pressed, change the value of the flag. In the Go-thread loop, check the value each time (again, making sure to protect it).
Method 2: Use a event handle. Set up the event before creating the thread, and pass it in as part of the thread's data. Use WaitForSingleObject at some point during each iteration and break out of the thread's loop when the event is signaled. When Stop is pressed, call SetEvent.
If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week
Zac
|
|
|
|
|
Thanks for thr instant reply.
But my problem here is, I don't wanna use thread here.
I want the Go() function could do the "PeekMessage"
for the main window.
Just don't know to do so.
|
|
|
|
|
cwyang wrote: I want the Go() function could do the "PeekMessage"
for the main window.
This is a VERY bad practice. You do NOT want to keep making message loops in your main thread. It makes your code overly complicated, impossible to maintain, and royal pain to debug. If you have a section of code that will be doing enough processing to block your UI thread (aka, your main thread), you do want to us a worker thread.
If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week
Zac
|
|
|
|
|
Dear sirs
I need to use a Open Office SDK to conversion doc to PDF files in a dll that is created by C but compiled by Visual C++ 2003. After including files:
#include "cppuhelper/bootstrap.hxx"
#include "osl/file.hxx"
#include "osl/process.h"
#include "com/sun/star/bridge/XUnoUrlResolver.hpp"
#include "com/sun/star/frame/XComponentLoader.hpp"
#include "com/sun/star/frame/XStorable.hpp"
#include "com/sun/star/beans/XPropertySet.hpp"
#include "com/sun/star/beans/XProperty.hpp"
#include "com/sun/star/beans/XPropertyAccess.hpp"
#include "com/sun/star/lang/XMultiServiceFactory.hpp"
#include "com/sun/star/uno/Sequence.hxx"
#include "com/sun/star/util/XCloseable.hpp"
#include "string.h"
the compiler return:
Fatal error C1189: #error: "Could not find 16-bit type, add support for your architecture"
After it I define:
#define WNT
#define CPPU_ENV msci
Then compiler return:
Fatal error C1070: mismatched #if/#endif pair.......
My project is created without StdAfx.h precompiled header and with makefile. Also in other program I successfully add these header files and no error appear.
What is necessary to do for resolve the problem?
Best regards
Kamen
-- modified at 7:07 Monday 28th August, 2006
|
|
|
|
|
might be best to try the open office mailing lists.
|
|
|
|
|
Few days back i got this linker error when i rebuild my coding..
Linking...
nafxcwd.lib(afxmem.obj) : error LNK2005: "void * __cdecl operator new(unsigned int)" (??2@YAPAXI@Z) already defined in Communciation.obj
.\Debug/CS3OperatorStation.exe : fatal error LNK1169: one or more multiply defined symbols found
Error executing link.exe...I posted question for this and get some soluitons too...
But myself i got solution for this error.
In my project settings under Microsoft Foundation Classes :Use MFC in static library
Then i changed this to "Use MFC in shared DLL" then the error didnot come after that and its work properly...why its came?whats the differnec between static library and shared dll?
I am using some DLL function in my applcation.Is there any connection between this?
-- modified at 6:11 Monday 28th August, 2006
Anu
|
|
|
|
|
May be this[^]could help you.
2 bugs found.
> recompile ...
65534 bugs found.
|
|
|
|
|
See here[^] maybe it is some helpful to you
|
|
|
|
|
I have two dlls with some functions. Both the dlls have to update a text file almost in all functions they have ( its like a log file). I have another client application which creates threads and uses those dlls in those threads.
Now how to achieve syncronization?
Please help me.
Thank you.
KIRAN PINJARLA
|
|
|
|