|
Yes and its works in VB in managed C++ in C#, and even 5.0 library doesnt work in C++.
Something wrong here, what can I do improperly?
|
|
|
|
|
OK, I'll try to list my actions.
1) Creating a ialog based MFC application (other parameters is by default)
2) Add->Class->MFC class from TypeLib
The window contains library list and list of classes that can be created.
3) Selecting the _Application class (only 1 for example) and header is CApplication.h
4) OK
5) Run (it works)
6) Include CApplication.h into any file
7) Run (100's of error)
in the top of the header there is #import directive. I've reduced error count by changing attributes of it. So, can you list me your attributes, please?
-- modified at 11:20 Tuesday 12th June, 2007
|
|
|
|
|
Ha-Ha!!!
Here is the answer.
Need to comment the line in header file
#import "C:\\Program Files\\Microsoft Office\\OFFICE11\\EXCEL.EXE" no_namespace
I dont know why, but when i've commented it the code began work
|
|
|
|
|
Hello,
Suddenly my project has started giving me error saying a certain .bsr file doesnot exist.I rebuild the project but in vain.
DO I need to make another project or I can do something with the existing project.
Thanks
Pritha
|
|
|
|
|
prithaa wrote: uddenly my project has started giving me error saying a certain .bsr file doesnot exist.
isa it bsr or bsc
"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
Support CRY- Child Relief and You
|
|
|
|
|
I believe these are browsing symbols. I always disable them as they add a significant amount to the compile time and I rarely used them when they were activated.
John
|
|
|
|
|
Hello,
The file is .bsr file.And I get error saying .bsr file doesnot exist.Should I make another project or there is some way to correct the error
Thanks
Pritha
|
|
|
|
|
I am sorry, I got that confused with a .bsc file which is the symbols file. I would just create a new project and put your project files in it.
John
|
|
|
|
|
Hello,
Thanks
I did that I just wanted to confirm.
Pritha
|
|
|
|
|
Hello,
If I have a menu with 4 menu options and I want to attach a popup menu to one of the menu options then is it possible ?
I have tried ModifyMenu() function with MF_POPUP parameter but it did not work.When I want to change the string with MF_STRING parameter I am able to do it.
Thanks
Pritha
|
|
|
|
|
|
Hello,
Thanks for your reply
I have the following code
CMenu M;
M.CreateMenu
M.AppendMenu(MF_STRING, id_DAta, "Data");
M.AppendMenu(MF_STRING, id_Edit, "Edit");
M.AppendMenu(MF_STRING, id_Model, "Model");
Now the above code works.
How should I have popup menu like the following attached to Data. I do not want to add to the 3 menu options above
CMenu M1;
M1.CreatePopupMenu
M1.AppendMenu(MF_STRING, id_Data1, "Data1");
M1.AppendMenu(MF_STRING, id_Data2, "Data2");
M1.AppendMenu(MF_STRING, id_Data3, "Data3");
Thanks
Prithaa
|
|
|
|
|
|
|
Hello,
Before posing the question to the codeproject forum I went through the MSDN CMenu examples but I did not understand how to attach a popup menu to an existing menu which is already there with MF_STRING parameter .
I think somewhere I should use ModifyMenu() to make changes in the Menu but I don't know how to use ModifyMenu
So please help me.
Thanks for your concern
Prithaa
|
|
|
|
|
I read your previous message and your reply to yourself it seems that your problem solved.
|
|
|
|
|
Hello,
Ya, Actually I was just trying to mail in different forms to make my question understandable and understood myself.
Thanks WhiteSky
Prithaa
|
|
|
|
|
Well if we want to get a result of your message that is you are a clever programmer.;)
|
|
|
|
|
I have a class derived from CWinThread, which have a CWnd* member which would recieve message from the thread. In the class also has a socket member,it would send network message to the CWnd* member.
I use such class in a Dialog,it works well.But when the main dialog create a new child dialog and show it using DoModal() function, and I want to make the child dialog correspond to the thread message and network message. In the child dialog,I send data to somewhere,but the class does send the data when the child dialog closed. Why?
Thanks
Good Luck.
|
|
|
|
|
Why?
Perheps, because the child dialog is modal.
In the child dialog,I send data to somewhere,
Please, specify more details. What do you actualy do? How do you send?
--
=====
Arman
|
|
|
|
|
I feel like a bit of a newbie asking this, but I have never had to access elements on the main form from outside it before.
So here it is: I need to access a textbox from a cpp file .... the textbox is on the main form which is initialized in the main function ... with the usual Application::Run.
in the main cpp file:
..........................................
#include "Form1.h"
int main(array<system::string ^=""> ^args)
{
Application::Run(gcnew Form1());
Form1::textBox1->Text = "some text";
}
...........................................
This doesn't work of course, because I am referencing the header class itself, and not the form instance .... but what is the form instance ????
now ... I know I could use ...
Form1^ myForm = gcnew Form1;
myForm->ShowDialog();
except that gcnew objects cannot be declared globally, and I need to access some of the form elements from other parts of the code, not main().
So I'm stuck .... any help would be appreciated.
Thanks
Aaron
|
|
|
|
|
aaron_leese wrote: any help would be appreciated.
Try here.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Your code is 100% Managed and you must ask on the correct forum.
|
|
|
|
|
I get the following linker error:
error LNK2019: unresolved external symbol "__declspec(dllimport) public: ...
...with this code:
typedef int (MainWindow::*MainWindowPtr)(void);
CallbackWrapperSpecific<MainWindow, MainWindowPtr, int>* cbPtr = new CallbackWrapperSpecific<MainWindow, MainWindowPtr, int>(this, &MainWindow::DoWork);
I'm implementing an extended version of a functor (Link), and for some reason, I still get the linker error even though I'm exporting my symbols in the following header file:
#ifndef CALLBACKWRAPPER_H
#define CALLBACKWRAPPER_H
#ifdef _EXPORT
#define THREADAPI __declspec(dllexport)
#else
#define THREADAPI __declspec(dllimport)
#endif
template <class Type>
class THREADAPI CallbackWrapperBase
{
public:
virtual Type Execute() = 0;
};
template <class ClassPtr, class Callback, class Type>
class THREADAPI CallbackWrapperSpecific : public CallbackWrapperBase<Type>
{
public:
CallbackWrapperSpecific(ClassPtr* pClass, Callback pCallback);
Type Execute();
ClassPtr* m_classPtr;
Callback m_callbackPtr;
};
#endif
Anyone know why this still happens?
-- modified at 16:45 Monday 11th June, 2007
|
|
|
|
|
Just check to see that you have not defined the THREADAPI in your calling module too.
|
|
|
|