|
Hello All,
I am developing one application of ActiveX in which i want to track mouse.
So any body tell me how can i get mouse events in ActiveX control?
Please help me anybody its very urgent.
Thanks in advance.
Manish Patel.
B.E. - Information Technology.
|
|
|
|
|
I am not sure but i think it will help you OnMouseActivate
Yes U Can ...If U Can ,Dream it , U can do it ...ICAN
|
|
|
|
|
Thanks for your reply
But How can i use this event in my Code?
Please provide code snippet if posssible
Again thanks
Manish Patel.
B.E. - Information Technology.
|
|
|
|
|
Hello and good day.
I have an application which is composed of 35 CDialog classes. Now, I haven't really done this many dialogs before in a single application before; usually when it's just 10 or less I just do a DoModal to go to the next dialog. Then someone said that it is better to just have one main dialog class, then just re-create the dialog's appearance when shifting to another screen (since the top part of the dialog has always the same appearance and buttons except the title). I know that somehow this is better, as it will be removing some of the repeating parts of the dialog but I really don't have that much of an idea here. So can anyone give me suggestions on how to start this up? I am currently reading about design patterns (MVC) and looking if this applies to the application. But still I need some expert opinions here who can give me some light on this.. Thanks in advance. 
|
|
|
|
|
You may try CtreePropSheet[^] or CTreePropSheetEx[^]. All your dialogs will be contained within a window and the user will be able to navigate through the dialogs easily.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
thanks for the help! i will try this but, is there any other way rather than importing this code in my application? sorry if i did not mention but I am specifically looking for a sort of process which I should do with my codes or rather an existing object within c++. again thank you for your help, I'll maybe import this if there is really no other possible way. thank you.
|
|
|
|
|
Llasus wrote: sorry if i did not mention but I am specifically looking for a sort of process which I should do with my codes or rather an existing object within c++.
If I understand it right, you want to redo something similar? Why would you do it, when somebody has already done it? The classes I linked you to are built very well, presented to the community and are already being used by people.
I suggested you to use it because it will enable you to build a more friendly and more easily manageable user interface. If you are worried only because your application is cluttered with lots and lots of dialog boxes and you don't know how to manage them together, then CTreePropSheet or CTreePropSheetEx are very good options.
Llasus wrote: I'll maybe import this if there is really no other possible way.
You see, there's a thing called code-reusability, which is one of the major advantages of OOP. Why don't you take full advantage of that? Making use of those classes will do good for you, because you are with a typical problem of having lots of dialogs and you don't know how to mend them together. By using either of those classes, you could also group dialogs that are closely related into a category. By all means, I will suggest you to at least try either of those classes once.
|
|
|
|
|
Rajesh R Subramanian wrote: If I understand it right, you want to redo something similar? Why would you do it, when somebody has already done it? The classes I linked you to are built very well, presented to the community and are already being used by people.
no, actually I want to find another option or another way that I can do. Like I am reading about design patterns and looking for one that could be applicable to this problem. Sorry if I might have not clearly explained myself well. I appreciate that I now have one possible solution which is the CTreePropSheet but I just want to know if there would be other solutions. Certainly I won't attempt to redo this, unless I have lots of time, knowing it's already proven and tested by the community.
Rajesh R Subramanian wrote: By all means, I will suggest you to at least try either of those classes once.
Thanks and I will try this first thing tomorrow. But even with this, I would still like to know if there are any other possible solutions to my problem. greatly appreciate it. thanks. 
|
|
|
|
|
Hi everybody......
I hav a small query on ActiveX Combobox control. I was not able to add items to a Microsoft 2.0 combo box (ActiveX) control. Please help me if anybody knows
Thanks in advance
Sai
|
|
|
|
|
Hi I'm Rathakrishnan. I have created File Save Dialog using MFC. The code is,
void CPerspectiveDoc::OnFileSave()
{
if(CurrentPath == "Untitled.vps")
{
char acFilters[] = "VPS files (*.vps)|*.vps||";
CFileDialog filedialog(FALSE, "vps", CurrentPath, OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT,
acFilters);
if(filedialog.DoModal() == IDOK)
{
CurrentPath = filedialog.GetPathName();
JustPath = CurrentPath.Left(CurrentPath.ReverseFind('\\')+1);
}
}
The Save as Type Combo Box contains only "VPS FILES(*.vps)" string. Now I want to add this string also to the Combo Box ("NIF FILES(*.nif)). How can I do this?
|
|
|
|
|
Just change your filter:
char acFilters[] = "NIF Files (*.nif)|*.nif|VPS Files (*.vps)|*.vps||"<div style="display:none;" class="CPhogPost"></div>
<div class="ForumSig"></div>
|
|
|
|
|
No. Changing the filter alone as u said is not working. What else can we do?
|
|
|
|
|
T.RATHA KRISHNAN wrote: Changing the filter alone as u said is not working.
Please elaborate me on what you mean by "not working"?
|
|
|
|
|
The string "NIF files (*.nif)" was not displayed in the Save as type Combo Box. What to do?
|
|
|
|
|
|
This is the code.
void CPerspectiveDoc::OnFileSave()
{
if(CurrentPath == "Untitled.vps")
{
char acFilters[] = "VPS files (*.vps)|*.vps||";
CFileDialog filedialog(FALSE, "vps", CurrentPath, OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT,
acFilters);
if(filedialog.DoModal() == IDOK)
{
CurrentPath = filedialog.GetPathName();
JustPath = CurrentPath.Left(CurrentPath.ReverseFind('\\')+1);
}
}
|
|
|
|
|
T.RATHA KRISHNAN wrote: char acFilters[] = "VPS files (*.vps)|*.vps||";
What a waste of time! You haven't added the new extension to the filter! Indeed, this code will be "not working".
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
Sorry.I undo the extension. Here is the new code. This also not working.
void CPerspectiveDoc::OnFileSaveAs()
{
char acFilters[] = "NIF files (*.nif)|*.nif|VPS files (*.vps)|*.vps||";
CFileDialog filedialog(FALSE, "vps", CurrentPath, OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT,
acFilters);
if(filedialog.DoModal() == IDOK)
{
CurrentPath = filedialog.GetPathName();
JustPath = CurrentPath.Left(CurrentPath.ReverseFind('\\')+1);
}
CDocument::OnSaveDocument((LPCTSTR)CurrentPath);
SetTitle(CurrentPath);
}
|
|
|
|
|
T.RATHA KRISHNAN wrote: CFileDialog filedialog(FALSE, "vps", CurrentPath, OFN_
What is CurrentPath ? This works for me:
char acFilters[] = "NIF files (*.nif)|*.nif|VPS files (*.vps)|*.vps||";
CFileDialog filedialog(FALSE, "vps", "hello", OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT,acFilters);
filedialog.DoModal();
|
|
|
|
|
It's working now. Thank u.
|
|
|
|
|
hi...
i was declared as
_variant_t vc;
FieldPtr fieldpointer;
but the error is
_variant_t undeclared identifier.
FieldPtr undeclared identifier.
should i add any header file?
i think this is a silly question.
but sorry... i don't know.
paulraj
|
|
|
|
|
gnanapaul wrote: i was declared as
_variant_t vc;
There lies the problem, you should have declared yourself as "real".
|
|
|
|
|
_variant_t is defined is comutil.h
and
You should import <msado.dll></msado.dll> before using FieldPtr
A Chinese VC++ programmer
|
|
|
|
|
thank you.
_varient error is cleared now.
am using mfc.
here how can import?
pls can you tell brief or pls can you send sample code?
paulraj
|
|
|
|
|
hi...
thank nyou for your guidance...
i got the output.
paulraj
|
|
|
|