|
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
|
|
|
|
|
class MyClass
{
public:
MyClass() : MEMBER_ONE(64), MEMBER_TWO(128){};
~MyClass(){};
public:
const int MEMBER_ONE;
const int MEMBER_TWO;
//... etc.
};
Trust in the code Luke. Yea right!
|
|
|
|
|
I'll try it, thanks.
Obseve everything, remember more...
|
|
|
|
|
I am writing an application which is minimized to the systray and the timer is run. After some time I want a window to appear close to the icon.
My question is how to create a window which will be displayed even when he aplication is minimized.
Please help
|
|
|
|
|
Maybe this article will help,
http://www.codeproject.com/dialog/taskbarnotifier.asp?target=messenger[^]
Michael
'War is at best barbarism...Its glory is all moonshine. It is only those who have neither fired a shot nor heard the shrieks and groans of the wounded who cry aloud for blood, more vengeance, more desolation. War is hell.' - General William Sherman, 1879
|
|
|
|
|
Thanks it will really help
|
|
|
|
|
I'm just getting into Visual C++. What books would you recommend reading? or any other resources would be helpful.
Thanks,
BZZR
|
|
|
|
|
Ivor Horton's Beginning Visual C++ 6 is a good start
Le Ridder Noir
Considderd to be the worlds fastest knoppenbonker.
one year of working experience with the worlds fastest copie paster(about 2000 lines a minute).
And experience with the one and only NewEra Guru and Crystal Ace.
|
|
|
|