|
Im currently working on CGridCtrl. I need to support atleast 50,000 rows so i opted for the virtual mode.
The problem raised when I have to add controls into my Grid such as Check boxes and combo boxes. I also want set the
color of the text in virtual mode.
Will you be able to help me out here.
Im very desperate...
Thanks
Rajith
|
|
|
|
|
I'm pretty sure the CGridCtrl's virtual mode is very primitive in the fancy things it can or cannot support.
I remember an article I wrote on a progress-bar cell type, and one of my forum questioners asked about using it in a virtual grid. We never really got anywhere.
More recently, CMaunder and co posted another grid control, developed by him and Dundas and now released into the public arena. That may be more useful to you. I didn't find any features that required me to make all the changes in my software to switch over. But improved handling of virtual grids may be a compelling feature for you.
Ultimate Grid:
http://www.codeproject.com/KB/MFC/UltimateGrid.aspx[^]
Iain.
Iain Clarke appearing in spite of being begged not to by CPallini.
|
|
|
|
|
Hello everyone,
I have searched for MSDN for half an hour about a configuration guide for DCOM on the basis of out-of-process server, but failed.
(Suppose I have a working well out-of-process server and I want to use dcomcnfg to make it run on two machines using DCOM)
Could anyone recommend some tutorials?
thanks in advance,
George
|
|
|
|
|
|
Hi Matthew,
VB client does not matter to my question. My question is about how to configure server.
Any recommended tutorials?
regards,
George
|
|
|
|
|
No sorry I don't remember ever using any . It was a long time ago but I remember I used the notes I made on a DevelopMentor COM course where I asked a lot of questions. DCOMConfig was part of the course so I guess I was pretty confident with it at the time.
Nothing is exactly what it seems but everything with seems can be unpicked.
|
|
|
|
|
Thanks all the same, Matthew!
regards,
George
|
|
|
|
|
Hi there,
I am using LogonUser() API in my code to check for the authentication of user credentials. The problem that i am facing is that the API returns true only if the Account User Name is provided and not the Display user Name. For example: If I create a New Account lets say "ABC" with password as "NEWPWD". On passing "ABC" as user name and "NEWPD" as password LogonUser() returns true. If now I change the user name to lets say "XYZ" and call LogonUser() with the changed user name it returns false. How can I resolve this Issue.
|
|
|
|
|
So LogonUser("ABC", ...) succeeds and LogonUser("XYZ", ...) fails. Is that correct?
Why would you want to logon using the display name of XYZ rather than the account name of ABC?
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Well as per the requirements of my application the user is allowed to change certain things only if he enters a proper Windows registered user name and password. Normally when we login to windows we enter our display user name and password. Or in case of tiles also we see the display user name and not the account name (if they are different. So in normal circumstances an end user will enter his display name when being asked for his/her credentials.
|
|
|
|
|
I upgrated VS2003 to VS2005 this week, then I found that functions like sscanf was changed to sscanf_s, so I updated my project sobstituting it everywhere .
now:
VS2003 (it was warking perfectly)
CString str=...;<br />
double d1, d2;<br />
scanf(str, "%lf%lf", %d1,%d2);
VS2005
scanf_s(str, "%lf%lf", %d1,%d2);
No, because the compiler tells that it cant convert CString to char*, then
scanf_s((char*) str.GetBuffer(), "%lf%lf", %d1,%d2);
The compiler is ok, but it seemes that only the first char of str is analysed !?!
(i.e. if str="23.43" then d1 will be =2 and not =23.43)
Am I wronging something?
Is there a different way to avoid the compiler error (something different and more sure from (char*) str.GetBuffer() )
thank you
Russell
|
|
|
|
|
Russell' wrote: Is there a different way to avoid the compiler error (something different and more sure from (char*) str.GetBuffer())
Yes, first thing to remember: never, ever use GetBuffer unless you know exactly what it does. Did you check the documentation ?
If it doesn't compile for VC2005, it is probably because UNICODE is enabled by default for VC2005. So either, don't enable it, or use UNICODE compatible functions, like _tscanf_s (check here[^]).
|
|
|
|
|
I haven't find the way to remove UNICODE from the project, ... but I found this way
<br />
CStringA str="12.45 45.23 45.78"; <br />
double d1, d2, d3;<br />
sscanf_s(str,"%lf%lf%lf", &d1, &d2, &d3);
It looks well working.
I haven't use CStringA and before, but
In this case it isn't needed the _T(..) macro when I initialize the string ...
Can I ask if this way is sure or if I'm forgetting something? (I'm sorry but I'm a little bit confused from this differences between VS2003 and 2005)
Russell
|
|
|
|
|
Russell' wrote: I'm sorry but I'm a little bit confused from this differences between VS2003 and 2005
First: this is not really a big difference. It is just that when you create a new project with VC2005, UNICODE is enabled by default and when you create a project with VC2003, UNICODE is not enabled by default.
UNICODE lets you work with strings that are wide characters (so two bytes per character). When UNICODE is defined, the CStringW class will be used and when is it not defined, then CStringA will be used (check the definition of the class CString, you'll see that it is just a 'macro' that redirects to one of the two versions).
When you use the string manipulation functions (like sprintf, scanf, ...), you should use the ones with the 't' at the begining (like _tscanf, ...) because they are also a macro that redirects to the correct function depending of the UNICODE setting.
Now, if you don't want to use UNICODE, you should undefine it and then you can use the char versions of the functions.
Russell' wrote: I haven't use CStringA and before
You shouldn't use CStringA or CStringW directly. If you do it, then it means that something wrong with the way you handle strings. In your case, why don't you simply use _tscanf_s as I told you ? This way, your code will compile in both cases (if UNICODE is defined or not).
Russell' wrote: In this case it isn't needed the _T(..) macro when I initialize the string ...
Here also, the _T macro lets you specify a literal string so that it is independant of the UNICODE setting you are using. So, it is good to use it.
Russell' wrote: I haven't find the way to remove UNICODE from the project,
If you want to remove it, go into your project properties, C/C++ category -> preprocessor and click on the button that appear when you click on "Preprocessor Definitions". There, uncheck the "Inherit from parent or project defaults". You'll see that the preprocessor definition that are inherited are in fact UNICODE and _UNICODE.
By the way, you should search here on CP about articles that discuss UNICODE. It will help you understand what it really does.
|
|
|
|
|
I was not hoping on a so long and detailed reply.
I got the way to solve this little problem (and something about the theory).
Thank you very very much.
5
Russell
|
|
|
|
|
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.
|
|
|
|