|
did you correctly #include d the header which defines the _ApplicationPtr type ?
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
have you used #import statement. If not you need to add one
like
#import "C:\\Program Files\\MicrosoftOffice\\Office\\msoutl85.olb"\
no_namespace exclude("_IRecipientControl", "_DRecipientControl")
For more info search MSDN for "HOWTO: Use Microsoft Outlook Object Model From Visual C++ Through an #IMPORT Statement"
|
|
|
|
|
Hi
How to register a file type in Windows Registry and assign a default program to that file type.
Eg: *.Txt files are Text Files and Default program is notepad
Regard
KK
|
|
|
|
|
|
Hello everyone,
I have a little problem with a struct that i would like to create the way you will see below. i am using Visual C++ 6 :
VCalcParserTypes.h
<font color=blue>#include</font> <STRING> <font color=green>
<font color=green>
<font color=blue>typedef long double</font> <font color=purple>VALUES_TYPE</font>;
<font color=green>
<font color=blue>typedef struct</font> {
<font color=blue>const</font> std::string m_strFormula;
<font color=blue>const</font> <font color=purple>VALUES_TYPE</font> m_valResult;
} <font color=purple>AnswerItem</font>;
<hr>
VCalcParser.h
<font color=blue>#include</font> <STRING> <font color=green>
<font color=blue>#include</font> <DEQUE> <font color=green>
<font color=blue>#include</font> <font color=gray>"VCalcParserTypes.h"</font>
<font color=green>
<font color=blue>class</font> CVCalcParser {
<font color=blue>private</font>:
<font color=green>
std::string m_Source; <font color=green>
std::deque<<font color=purple>AnswerItem</font>> m_dqeAnswersHistory; <font color=green>
<font color=blue>public</font>:
<font color=green>
<font color=purple>VALUES_TYPE</font> Evaluate(<font color=blue>const</font> std::string& Source);
<font color=green>
};
<hr>
VCalcParser.cpp
<font color=green>
<font color=purple>VALUES_TYPE</font> CVCalcParser::Evaluate(<font color=blue>const</font> std::string& Source) {
<font color=blue>this</font>->ResetParserMembers(Source);
<font color=blue>try</font> {
<font color=purple>VALUES_TYPE</font> valResult = <font color=blue>this</font>->Level_1();
<font color=purple>AnswerItem</font> AnsItem = { <font color=blue>this</font>->m_Source, valResult };
<font color=blue>this</font>->m_dqeAnswersHistory.push_front(AnsItem);
<font color=blue>return</font> valResult;
}
<font color=blue>catch</font> (...) {
<font color=blue>throw</font>;
}
}
At the line quoted on the previous code, the compiler gives me a :
error C2552: 'AnsItem' : non-aggregates cannot be initialized with initializer list
Seing the MSDN, my AnswerItem type IS an aggregate :
- no constructor,
- no private/protected members,
- no base class,
- no virtual functions...
any suggestion ?
TOXCCT >>> GEII power [toxcct][VisualCalc]
-- modified at 4:22 Tuesday 27th September, 2005
|
|
|
|
|
|
yeah, i saw this, but did not pay attention to it that much (shame on me)...
thank you
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
toxcct wrote:
Seing the MSDN, my AnswerItem type IS an aggregate :
Well, how about the std::string member?
Also remove the const directive.
--
Roger
|
|
|
|
|
wow, damn, yep, you might be right
i wanted to avoid assigning each member one by one, but i realize that i'll have to...
thanks anyway
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
without source file. i have the library file.
but the lib is in vc6 version. how can i use it in my vc7 projects?
|
|
|
|
|
Dear sir:
I obtained a warrning dialog message, saying "Unable open the files(C:\VC60\SKetcher16\ScaleDialog.h, C:\VC60\SKetcher16\ScaleDialog.cpp) for class "CScalDialog" when I am trying to obtain the new class of the CScalDialog by using Class Wizard. I uninstalled the Visual C++ 6.0 and installed it for many times. Still I can't resolve the problem. I am using Windows XP as the OS. Anyone know how to fix it. Notify me please.
Scincerely Yours.
wen hou
|
|
|
|
|
Hi wen,
Delete the .clw file(better to take a backup ). Open the project and goto classwizard and create new .clw file by including all the files.
Hope this solves ur problem.
Adios,
Cool Ju
|
|
|
|
|
hi,
how to check radio button in another dialog to the corresponding radio button in one dialog
|
|
|
|
|
You can do this by ON_COMMAND messaging. ON_COMMAND messaging sends or pumps a message to your entire program. It gets very tricky when sending messages from one Dialog class to another. The best programming with respect to Dialog based programs, is to keep your Views ( Dialog ) loosely coupled from the inner workings ( Control ). Some go on the idea of MVC ( model, View, Control ) idea. Try to read up on this. Another way is to implement a GoF concept, by using the "Observer pattern" ( plenty of example here in codeproject ). This pattern does the job of keeping the Dialog class loosly coupled, and is continually updated when information is changed, or an action has taken place ( hint: such as a radio button clicked ). All in all, messaging from one dialog to another has its pitfalls.
|
|
|
|
|
tamsel wrote:
how to check radio button in another dialog to the corresponding radio button in one dialo
I am confuse between these two api... one of then certainly goign to help :-
CheckDlgButton or SetDlgItemInt
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
I have created a view which need to be printed
by a printer , The base class for the view is
the CScrollView.
How can i print all the data, i also want to
ensure that if data is long enought not to
fit on one page then there should be some
blank space left at the starting and ending
of every page.
Vikas Amin
Embin Technology
Bombay
vikas.amin@embin.com
|
|
|
|
|
hi buddys
i made adialog based app and
made an animation using SetTimer. i have a Draw() func wich draws when th e timer executes. but after about 30 sec nothing will be drawn anymore(Although the Draw() func executes)i used double buffering.
would u tell me what will cause such a problem
thx
|
|
|
|
|
We can't answer this, by telling us what you want to happen, you're telling us what the code should do. You need to post some code so we can see why it's not doing that.
One possibility is that you're not cleaning GDI resources, and you're running out.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
oh i havent access to code right now
when i use LoadBitmap() do i have to clean it or something??
i also releaseDC() the DC. do i have to delete memDC??
and i have another question. i have a Draw() func. i call it in onTimer()
is it acceptable? or i should call Draw() in onPaint()?
|
|
|
|
|
You need to release everything explicitly.
Yes, you should be calling Draw from OnPaint and calling Invalidate.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I want to get a list of system created folders like C:\windows, C:\Program Files, etc.
1. Are these the only two the system creates, or are there any more? how do we identify them all?
2. SHGetFolderPath with CSIDL_PROGRAM_FILES will give you only C:\Program Files, how do get the program files directory in other drives like D:?
|
|
|
|
|
if you have many 'Program files' folders in several hard disks, only one is owned by the system (because the other have been made by you - or a user). so, if the system is installed on C:, ShGetFolderPath() will return only that one...
understand ?
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
actually, thats my question too. Does the system own the Program Files folder? I thought it is the applications that get installed create this folder, and you can chose to install it in D:\Program Files. And the system installation also installs a few applications, thats why that folder will be there.
Anyways, C:\Windows, C:\Program Files and C:\Documents and Settings are the only ones the system creates, right? can any user's home directory be configured on a different drive than the system drive?
|
|
|
|
|
Flace wrote:
Does the system own the Program Files folder?
yes, but it own only the one it created during its installation.
Flace wrote:
can any user's home directory be configured on a different drive than the system drive?
certainly ! right click on a "My Documents" icon (on the desktop for example) and see the change target into the target property tab...
but i don't know how to do this programmatically...
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
Flace wrote:
C:\windows,
GetWindowsDirectory()
GetSystemDirectory(): for System directory
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|