|
I have created an MFC ActiveX Control through the wizard. In the 2nd Step of the wizard I have enabled the checkbox saying “Available in Insert Object Dialog”, so that I can use my control in Microsoft Office Application like MS Word, Excel, PowerPoint etc using Insert Objects.
I am using property sheet to change the text contents of my control. For that I followed the steps mentioned the MSDN Example CIRC.
http://msdn2.microsoft.com/en-us/library/c6hzbzz6(VS.80).aspx
My control features the following characteristics.
• Changing the painting behavior of an ActiveX control
• Adding stock properties
• Adding custom properties
• Responding to mouse events
• Adding custom events
• Using text and fonts
• Implementing ActiveX control property pages
• Using simple data binding for control properties
But at present I am stuck up problems.
1. Using property sheet I can update the text contents in ActiveX test container. But it doesn’t get updated in Word, and other Office Applications. In fact its not even recognizing any of the event fired by the user (like changing the color on mouse click, key press etc) in any of the office application.
2. I am using this control for assigning digital signatures to a document. For that I am using X509 libraries. But these libraries use Common Language Runtime (/CLR) Support. And if I enable CLR from the project settings, the control crashes while loading on the Office application, ultimately crashing the entire document.
|
|
|
|
|
Currectly I m working with "Programming Windows by Charles Petzold" and "Programming Windows with MFC second edition by Jeff Prosise" for learning Win32 and MFC . Are these resources will enough? or I'll need some more resources that you programmers would like to suggest.
Thanks a lot,
Regards,
Sumit Mandal
|
|
|
|
|
I feel these two are enough to learn MFC. However I prefer you start first with Prosise and after getting feel of MFC start reading Petzold.
Regards,
Paresh.
|
|
|
|
|
Have you some trouble to choose a title for your threads ?
Win32/MFC is too generic to be a valid description of what you're asking for...
|
|
|
|
|
I agree with Paresh except I'd learn them in reverse order. Knowing windows programming
fundamentals (Petzold) first will make MFC (which is mostly a C++ wrapper for Windows APIs)
much easier to use effectively.
Just my opinion
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
SumitMandal wrote: . Are these resources will enough? or I'll need some more resources that you programmers would like to suggest.
actuallly you have to update yourself regularly about new thing .. you can update urself by reading article in beginner section or reading archive of newsgroup and forums!
"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
|
|
|
|
|
Can the icon size of the icon to be displayed on a CButton be set
|
|
|
|
|
|
I believe button icons are displayed centered on the button and if the icon is bigger than the
face of the button it is clipped.
If resizing the button so the icon fits isn't acceptable then you'd need to resize the icon first
before setting it to the button.
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
Hi Experts,
I try Media Player Control in dialog based application at run time And Load a file, It works fine.But when i try this on SDI Application it does not work.Actually i have taken a view in SDI application.
|
|
|
|
|
pther wrote: But when i try this on SDI Application it does not work.
What class is your view derived from?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
are there cases where we should write our own copy constructor and assignment operator overloading in the class?
Thank you.
KIRAN PINJARLA
|
|
|
|
|
Please refer this[^].
When you have atleast a single member varibale as a pointer variable.
Regards,
Paresh.
-- modified at 8:15 Thursday 19th April, 2007
|
|
|
|
|
If your class have member variables that are pointers and/or allocate memory, you have to write a copy constructor and assignment operator. Probably even a "== " operator.
If you don't, the compiler will create those for you and they won't behave the way you want them to. It creates shallow copies, performs member wise comparison and so forth.
You can assume that you should write a copy constructor for each class you develop.
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
Yes. The first example that comes to my mind is for smart pointers for example. Another example would be for a string class (you need in fact to copy the contents of the char pointer, not just the char pointer itself).
|
|
|
|
|
hi
what ifdef do i need to use to run my application on desktop pc(x86 compiler) in visual studio 2005(VC++)?
my application is meant to work for both windows mobile and desktop pc.
thanks.
|
|
|
|
|
These two platforms run different versions of Windows and are not binary-compatible. In other words, you need two different .exe files, each compiled and linked for the appropriate OS. They use the same processors but the OS runtime DLLs are different and different APIs are supported.
Judy
|
|
|
|
|
i know that i'll be getting two different exe's. but i need the #ifdef for compiling under x86 platform. for windows mobile i am using #ifdef POCKETPC2003_UI_MODEL.
|
|
|
|
|
Sorry, couldn't tell how much you knew from the initial question. If you're compiling the code with any Microsoft tool, it assumes the x86 class of processors unless otherwise specified. I'm going to assume you're not asking about the define for x86 compilation but rather the define for regular desktop windows compilation versus mobile compilation. It's been a while, but last time I had a GUI that was written to compile under both VS for regular desktop and eVC for handheld (same source code files with a unique solution / workspace for each IDE), I used the handheld desktop define as the key for both situations. Stuff that was handheld only was #ifdef <handheld define> and desktop only stuff was #ifndef <handheld define> .
My memory may be faulty, but you could also try _WIN32 versus _WIN32_WINCE. I don't have eVC loaded to see if the _WIN32_WINCE is defined for all the different system selections.
Hope this answers your question, since I'm not sure exactly what you need.
Judy
|
|
|
|
|
When we inherit a class from another, as protected what happens how the protected and public members will be derived into this class.
KIRAN PINJARLA
|
|
|
|
|
see here [^].
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
Thank you.
KIRAN PINJARLA
|
|
|
|
|
Is it possible to learn MFC without learning or without going through Win32.
|
|
|
|
|
IMHO
MFC is a library that allow you to do a lot of things, but not all of them, yes, you can use MFC, but soon you'll be using win32 instructions and, who knows ATL or any other library that would allow you to do different things that you'll need...
hope this helps.
|
|
|
|
|
SumitMandal wrote: Is it possible to learn MFC without learning or without going through Win32
You will either pick up a lot of Win32 in the process or not learn MFC at all.
MFC ist for the most part just a C++ layer around the Win32-C API.
Failure is not an option - it's built right in.
|
|
|
|