|
Hi All,
I have 2 STL set and i need to comper them and write to some CListCtrl to different of them. Beside this fact - i hold one of those set in some the table.
If i use the method FindItem to find some row in the table ( if exist or not ) is it will be less complexity ?
Thanks for the help.
|
|
|
|
|
How to create ListView with LargeIcon items showing image icons of different sizes, at least with similar width but different heights. As ImageList has global size property and every image in it is stretched to that size.
chesnokov
|
|
|
|
|
IMHO, you can zoom in(out) the pictures that don't very well match the imagelist's picture size.
There are some great examples about this at CP, try to search them
A Chinese VC++ programmer
|
|
|
|
|
Hello everyone,
I am learning how to write a local out-of-process server and made a runnable program (including client, proxy DLL and server EXE). It works fine and I am inerested to learn how they are binded together internally. I have posted the registration items for EXE server, proxy DLL and interface as below. Here is my understanding of how a client will find the EXE server from component ID and interface. Please review and correct me if I am wrong.
1. Client issue request through CoCreateInstance with interface ID IX and component ID Component1;
2. IX maps to interface registration item and then find the related proxy/stub item in registry,
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Interface\{32BB8323-B41B-11CF-A6BB-0080C7B2D682}\ProxyStubClsid32]
@="{32BB8323-B41B-11CF-A6BB-0080C7B2D682}"
3. In the proxy/stub item in registry, related physical DLL file will be found and loaded into client's process, here is the related item,
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{32BB8323-B41B-11CF-A6BB-0080C7B2D682}\InProcServer32]
@="D:\\Visual Studio 2008\\Projects\\test_exeserver1\\Debug\\test_proxy.dll"
"ThreadingModel"="Both"
4. For the requested component name, all the registry will be searched to find "Component1", until the following posted EXE Server item is found and then located (started) by its physical location
[HKEY_CLASSES_ROOT\CLSID\{0C092C29-882C-11CF-A6BB-0080C7B2D682}\LocalServer32]
@="D:\\Visual Studio 2008\\Projects\\test_exeserver1\\Debug\\test_exeserver1.exe"
My understanding correct? Do I miss any information?
--------------------
EXE Server
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\CLSID\{0C092C29-882C-11CF-A6BB-0080C7B2D682}]
@="Inside COM, Chapter 10 Example, Component 1"
[HKEY_CLASSES_ROOT\CLSID\{0C092C29-882C-11CF-A6BB-0080C7B2D682}\LocalServer32]
@="D:\\Visual Studio 2008\\Projects\\test_exeserver1\\Debug\\test_exeserver1.exe"
[HKEY_CLASSES_ROOT\CLSID\{0C092C29-882C-11CF-A6BB-0080C7B2D682}\ProgID]
@="InsideCOM.Chap10.Cmpnt1.1"
[HKEY_CLASSES_ROOT\CLSID\{0C092C29-882C-11CF-A6BB-0080C7B2D682}\VersionIndependentProgID]
@="InsideCOM.Chap10.Cmpnt1"
Proxy/Stub DLL
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{32BB8323-B41B-11CF-A6BB-0080C7B2D682}]
@="PSFactoryBuffer"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{32BB8323-B41B-11CF-A6BB-0080C7B2D682}\InProcServer32]
@="D:\\Visual Studio 2008\\Projects\\test_exeserver1\\Debug\\test_proxy.dll"
"ThreadingModel"="Both"
Interface
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Interface\{32BB8323-B41B-11CF-A6BB-0080C7B2D682}]
@="IX"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Interface\{32BB8323-B41B-11CF-A6BB-0080C7B2D682}\NumMethods]
@="5"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Interface\{32BB8323-B41B-11CF-A6BB-0080C7B2D682}\ProxyStubClsid32]
@="{32BB8323-B41B-11CF-A6BB-0080C7B2D682}"
--------------------
thanks in advance,
George
|
|
|
|
|
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
|
|
|
|