|
Hi,
I am testing the sample Cir2 ActiveX control given by MSDN lib.
step 1: I inserted that Ctrl in "ActiveX Control Test Container"
Then If I click in the conrtol it is working. (regonize the mouse down event and displays filled circle)
step 2:
1. I inserted the same in MS-Word or PPT.
2 Click on the contol. Results nothing.
3. GoTo SlideShow or use popup/edit/ then click on contol.
then it works.
Question:
How can I do here without using edit or shifting to slide show?
thanks,
regards,
ajitd07
|
|
|
|
|
Hi,
I created a Simple MFC based Active-X control thro Wizard, for testing. i.e MyOCX.
In CMyOCXApp I put a AfxMessageBox("InitInstance") inside InitInstance() and in ExitInstance(), I put AfxMessageBox("ExitInstance")
Case 1: Test in "ActiveX Control Test Container"
Step 1: Insert MyOCX Ctrl in the container.
Result: message Box Poped "InitInstance"
Step 2: Insert Another MyOCX Ctrl in the same container.
Result : MessageBox in InitInstance is NOT popped.
Step 3: Delete the 1st inserted control.
Result : MessageBox in ExitInstance is NOT popped.
Step 4: Delete the 2nd inserted control.
Result : MessageBox in ExitInstance is popped.
"ExitInstance"
Question:
Why it is Not poping up "InitInstance" MessageBox every time when I insert? also "ExitInstance" every time when I delete?
Case 2: Test in "MS Office products: PPT and MS-WORD"
Step 1: Insert MyOCX ctrl in PPT or MS-Word.
Result: message Box Poped "InitInstance"
Step 2: Delete the inserted control.
Result : MessageBox in ExitInstance is NOT popped.
Step 3: Close the Application (PPT/MS-Word) Completely
Result : MessageBox in ExitInstance is popped.
"ExitInstance"
Question:
Why it is Not poping up "ExitInstance" MessageBox Imeediatly When I delete the control in the container?
Where I will get the answer?
Thanks and regards,
ajitd07
|
|
|
|
|
In VC++ 7.0 classes keep disappearing from the Class View. The files are still there in the project but do not show up in the Class View.
How do I get it back into the class view?
In previous versions all you had to do was delete the .clw file and the Class Wizard would recreate it and fix any problems.
|
|
|
|
|
don't know if this will work in VC++ 7, but in VC++6 it does:
you can just modify and save the header file... (it's fastest than deleting the *.clw)
hope this helps...
|
|
|
|
|
I'm using ::TextOut() to render text to a printer DC, and on most printers, this works fine, but I don't know where the font information is coming from! This is fine in most cases (by dumb luck), but on some printers the chosen font is Wingdings!
So my Q: How do I set the font for TextOut() ??
- Nitron
"Those that say a task is impossible shouldn't interrupt the ones who are doing it." - Chinese Proverb
|
|
|
|
|
From MSDN: The TextOut function writes a character string at the specified location, using the currently selected font, background color, and text color.
So all you've to do is calling SelectObject, passing a handle to a former created font object.
|
|
|
|
|
ahh... ic
thx!
- Nitron
"Those that say a task is impossible shouldn't interrupt the ones who are doing it." - Chinese Proverb
|
|
|
|
|
This is more of a design question. I have a CDialog derived window (several) and when I spawn them I push_back their pointers on a vector. This vector is externed so the CDialog guys can see it. Now when I right click on any one of these windows I need to get the pointer of the CDialog I had stored on the vector. How do I get this to happen? Alos when i right click on this control, I want a context menu (popupmenu) to materialize.
What is the difference between the handler written to capture WM_CONTEXTMENU and WM_RBUTTONDOWN - both operate on a right mouse click.....so if I write handlers for both messages which one runs?
Appreciate your help,
ns
|
|
|
|
|
I wrote a CDialogManager class for this very purpose. (I don't have an article yet though.) Basically, what I do is put the vector of dialogs in their own wrapper class (CDialogManager in my case), and set up public methods to get at what I want. Then in your dialog that you want to access one of the ones in the vector, you merely do something like:
CMyDialog* pDialog = &MyManagerClass.GetDialog(iDialog);
Now, pDialog-> is ready to go.
- Nitron
"Those that say a task is impossible shouldn't interrupt the ones who are doing it." - Chinese Proverb
|
|
|
|
|
So when I am right clicking the dialog, how does it know what the iDialog is to call GetDialog with? AM I missing something really obvious?
Appreciate your help,
ns
|
|
|
|
|
ns wrote:
What is the difference between WM_CONTEXTMENU and WM_RBUTTONDO
WM_RBUTTONDOWN is specifically for a mouse button click. WM_CONTEXTMENU is sent for a right-click, Shift+F10 keypress, or App key keypress (basically, any of the ways to get a context menu).
--Mike--
Looks like I picked the wrong week to stop sniffing glue.
1ClickPicGrabber - Grab & organize pictures from your favorite web pages, with 1 click!
My really out-of-date homepage
Sonork-100.19012 Acid_Helm
|
|
|
|
|
hi,
how to use CStdioFile to read separate lines from file like ifstream?
|
|
|
|
|
why do i get this message wenn i do this:
shutdown(sock, SD_BOTH);
my includes are:
#include "stdafx.h"
#include "stdio.h"
#include "tchar.h"
#include "process.h"
#include "crtdbg.h"
|
|
|
|
|
hello
you can try
"#include winsock2.h"
i hope that help you
|
|
|
|
|
lol,
thnx
|
|
|
|
|
I think you need to link with ws2_32.lib
You may need winsock2.h also, but I'm not sure.
- Nitron
"Those that say a task is impossible shouldn't interrupt the ones who are doing it." - Chinese Proverb
|
|
|
|
|
Maybe #include winsock2.h will do the trick?
There is shutdown declared, according to MSDN.
My opinions may have changed, but not the fact that I am right.
|
|
|
|
|
This is oddly missing from winsock.h , use this instead:
shutdown(sock, 2);
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
You past the wrong parameter to shutdown().
shutdown(theSocket, SB_BOTH);
Kuphryn
|
|
|
|
|
Hello,
I am posting here, because although the Problem refers XML, DOM and the MSXML2 Parser, i am using C++ to access the COM functions of the Parser.
After searching for simmilar thread - posts I finally did not find a solution for my problem ... although the topic was still discussed.
Is there any possibility to convert an IXMLDOMNodePtr into a IXMLDOMElementPtr ???
I know the IXMLDOMElement Object extends the IXMLDOMNode one. But because of the fact that I use the smart - pointers to the Interface Objects a downcast does not function. ( i think it is because of this )
All I want to do is just to call the IXMLDOMElement's method
' GetElementsByTagName("...") ' which unfortunatelly returns a List of Nodes ( IXMLDOMNodeList ) and not of Elements. After iterating the List a want to convert every Node of it an a IXMLDOMElement ...
Any Idea ???
Thank you in advance
VLAD
|
|
|
|
|
Does anybody know how to change a project from MFC - dynamically linked to statically linked? I'm in need of this change!
Thanks a lot.
-- narada
|
|
|
|
|
Solved!
It is changed in the project settings!
Thanks
-- narada
|
|
|
|
|
Select settings from project menu. In opened dialog from General Tab, In Microsoft Foundation Class, select "Use MFC in Statically Library".
A. Riazi
|
|
|
|
|
Thanks a whole lot!
-- narada
|
|
|
|
|
Any ideas about an app that can detect if connected to the intertet???
I wrote a function that does it well, but I want to build a process that runs at background, and every time that I connect to the internet, it will signal me somehow.
Should I use some kind of a timer that checks connection every 'x' seconds, or there is some global object (HANDLE) that I can use a wait function on it?
Any suggestion will be blessed!
--BlackSmith--
/*The roof is on fire, we don't need no water, let the MF burn*/. BHG.
|
|
|
|