|
Thank you for the reply. But now I am curious: why not? Sorry to further bother you....;)
Appreciate your help,
ns
|
|
|
|
|
In DLGCORE.CPP u can find in the implementation of DoModal
// destroy modal window
DestroyWindow();
PostModal();
MSDN says for EndDialog "it sets a flag and allows the dialog box procedure to return control to the system. The system checks the flag before attempting to retrieve the next message from the application queue. If the flag is set, the system ends the message loop, destroys the dialog box"
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
Thank you. Its so odd.if I do google on EndDialog it takes mt to a more informative microsoft site than just searching in help in the dev environment....
The info you gave me wasnt in my local msdn help...
Appreciate your help,
ns
|
|
|
|
|
That is misleading because MFC creates all dialogs as modeless and manually disables/enables the dialog's parent as appropriate.
--Mike--
THERE IS NO THERE IS NO BUT THERE IS
MAGIC PIXIE DUST BUSINESS GENIE CODE PROJECT
Homepage | RightClick-Encrypt | 1ClickPicGrabber
"You have Erica on the brain" - Jon Sagara to me
|
|
|
|
|
ns wrote:
Thank you for the reply. But now I am curious: why not? Sorry to further bother you....
Hello ns,
It was you who got me started on this article :-
http://www.codeproject.com/dialog/notmodaldialogs.asp
Regards.
Nish
Author of the romantic comedy
Summer Love and Some more Cricket [New Win]
Review by Shog9
Click here for review[NW]
|
|
|
|
|
Hi!
I have problems with method SetOptions.
When I call SetOptions(ECOOP_OR, ECO_SAVESEL ) and CRichEditCtrl has no text some styles for this controls simply are disappearing (like ES_AUTOVSCROLL).
But when I type some text everything is OK.
Any help?
P
|
|
|
|
|
I have numerous word documents that I need to email to several different people. The first line in the word document contains the email address that the document is supposed to be sent to.
Is there any way that I can take this document and parse it so that I can get this information and then send an email to the address that was taken out of it?
|
|
|
|
|
Use Word.Application COM object.
Sergiu.
|
|
|
|
|
I want to read character by character from a text file and want to match each character to a certain criteria.
Moreover I want to reach certain points or certain data in the file. Plz provide me with datails how to do so.
I am totally blank in filing so Plz provide me with details instaed of just mentioning the function names.
Reply me soon
|
|
|
|
|
Working in MFC, I want my program to send an email message automatically on certain addresses after the satisfaction of some criteria. I am a beginner in VC++, so provide me with relevent APIs/sites/codes to fullfil this task.
Plz suggest me the easiest way of doing so.
Reply me soon
|
|
|
|
|
Solutions depend on your design and tools. For example, what socket tool do you want to implement, i.e. pure winsock or MFC's CSocket? Deside on a socket design and then we move from there.
Kuphryn
|
|
|
|
|
Actually I want to attach this email code with a code I am already using for sniffing packets. In that I am using raw sockets of Winsock api. But I feel that MFC's CSocket would be a better chice to be used.
Plz provide me further info. on it and plz keep in mind that I am a beginner and does not have much knowledge in VC++. So kindly try to suggest me the easiest ways of doing so.
Reply me soon
|
|
|
|
|
|
You can find some wrapper classes at www.naughter.com
you can use those classes for sending e-mails
Wish u good luck
--Kamesh
|
|
|
|
|
i would like, that my addin makes a new menuitem just right to "Tools" which is called "MyAddins" (so i can find my addin there and not under tools (default))
how can i do this?? it is nowhere documented!!
or is there another way to make this menu? by changing something in the registry maby? i didnt found out, please help me, thanx!
|
|
|
|
|
Hi ,
How to merge resources developed in differnet project work spaces??
I tried with
Open source work space ->select dialog, Edit->copy,
Opened target workspace -> Edit paste. But i could copy only dialog, but not associated .h and .cpp files and member varables.
Any suggessions
Thanks in advance
--Kamesh
|
|
|
|
|
Import the .cpp and .h files into your project and change the App class(#include "myapp.h") of the .cpp files. then also rename the Resources(IDD_yourresource) into the names you use in your cpp and h files(or the other way around, change the names in your .cpp and .h files) it should workt then.
[]D [] []D []
|
|
|
|
|
Just open your new project
and open just the old rc file(OldProjectName.rc) on old project.
rc file is a compiled resource file.
You can see resource tree,
Select the node you want and drag or copy to the left resource tab on workspace.
|
|
|
|
|
Open the the sourve and target Rc in Textmode or with a texteditor, than copy and paste the Dialoges. You must than also copy the ID defines from the header and ready.
PS: you could also put some Standard-dialoges in an extra dll
Try this @ home. (B&B)
|
|
|
|
|
Can I just check, is this code valid? The compiler claims there's a syntax error - 'constant' - for each member. It claims the same even when they are just regular ints too!
class MyClass
{
public:
MyClass(){};
~MyClass(){};
public:
static const int MEMBER_ONE;
static const int MEMBER_TWO;
//... etc.
};
const int MyClass::MEMBER_ONE = 64;
const int MyClass::MEMBER_TWO = 128;
and
static const MyClass MyObj;
// One instance, declared in header
I should note that I'm #including this file into another header, so that class can have a reference to MyObj as a member.
Obseve everything, remember more...
|
|
|
|
|
tom76 wrote:
const int MyClass::MEMBER_ONE = 64;
const int MyClass::MEMBER_TWO = 128;
These must appear only once, so move them from the .h to the .cpp that defines the class.
It would also help a lot if you included the specific compiler error and indicated what line it referred to.
tom76 wrote:
static const MyClass MyObj;
This instantiating an instance of the class. Is that what you realy want. I don't know if you can have a const class like this.
Also globals are bad, very bad.
Neville Franks, Author of ED for Windows. www.getsoft.com
Make money with our new Affilate program
|
|
|
|
|
I've not got a definition (.cpp file) for my class, as all I am using it for is to create a static const object with these members so everything is in MyClass.h . I believe I need a global because I only want one instance of this object, because the members will never change value.
The errors are
error C2059: syntax error : 'constant'
error C2238: unexpected token(s) preceding ';'
for each member.
Obseve everything, remember more...
|
|
|
|
|
tom76 wrote:
I believe I need a global because I only want one instance of this object, because the members will never change value.
Would it be better to make your variables (which seem to be constants) constant members of the Application-class? So you can access them (almost) everywhere in your program and yet they are not global.
Example:
Yourapp.h
class CYourapp : CApp
{
[...].public:
const int m_One;
const int m_Two;
[...].}
Yourapp.cpp
[...]
CYourapp::m_One = 1;
CYourapp::m_Two = 2;
[...].
Use in either of this ways:
int i = theApp.m_One;
int j = static_cast<CYourApp*>(AfxGetApp())->m_Two;
My opinions may have changed, but not the fact that I am right.
|
|
|
|
|
Thanks, I'll have a go at that I think. Still don't know why I am getting these syntax errors though. Oh well.
Obseve everything, remember more...
|
|
|
|
|
At first sight, It's a little strange.
'Cause my poor skill
Why const variable have to be a static one?
My wild guess is that a const variable will also have just a one instance between several class instance like a static.
Actually, It's not exactly right.
But I think const and static have similitiy on each other in this case.
Develope yourself
|
|
|
|