|
I didn't really state the problem very well -
The whole point of this code is polymorphism to allow one virtual function to be called on the base class for various operations but especially drawing. This way a huge switch statement is avoided every time you want to draw an object (i.e. CInd1, CInd2.. etc.) and you don't have to modify the View class when adding a new object. It seems to be fairly standard - it's described very well in Horton's "Beginning Visual C++".
The downside appears to be the difficulty modifying existing elements but I solve that by a delete and replace operation (transparent to the user). My only difficulty was populating the CInd setup dialog to reflect the selected element but I think I have solved that by instantiating the dialog in the CInd1 class and calling a CIndicator display dialog virtual function.
|
|
|
|
|
Can you add a virtual method to CIndicator that returns the value of CIndicator 's member variables?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius
|
|
|
|
|
Thanks all,
I know which element to modify because the CIndicator class has a couple of vars, CString ElementName and int ElementId.
I also realized that I can solve this by casting the pIndicator to the derived class (I had a serious hole in my knowledge with regards to casting pointers of derived classes). Then I think I can add a function to the dialog to update the controls by passing the derived class pointer, ie.
CInd1* pInd1 = static_cast<cind1*>pIndicator); //cast from base to derived class
Ind1Dlg.UpdateDlg(pInd1);
|
|
|
|
|
Hi,
I have developed an installer application in Visual C++ 6.0. It runs in admin login. While it creates program folder, I want to assign specific rights. The rights I want to assign are as under.
Everybody should be allowed for Modify + Read & Execute + List folder content + Read + Write.
On advance security tab, "Apply to" field for Everybody should be set to "This folder, subfolders and files". In addition "Apply these permissions to objects and/or containers within this container only" tick box shoud be checked.
Right now, the code I have used for this is,
--------------------------------------------------------------
SECURITY_ATTRIBUTES sa;
SECURITY_DESCRIPTOR sd;
InitializeSecurityDescriptor(&sd,SECURITY_DESCRIPTOR_REVISION);
SetSecurityDescriptorDacl(&sd,TRUE,NULL,FALSE);
SetSecurityDescriptorGroup(&sd,NULL, FALSE );
SetSecurityDescriptorSacl(&sd, FALSE, NULL, FALSE );
sa.nLength = sizeof(SECURITY_ATTRIBUTES);
sa.lpSecurityDescriptor = &sd;
sa.bInheritHandle = TRUE;
CreateDirectory( m_strDestinationDir, &sa );
--------------------------------------------------------------
This gives full control to Everybody but does not have setting on Advance tab as I mentioned above. Due to that files created by one user in this folder becomes unaccessible for another user.
I will be very much thankful if someone can help me out to resolve this problem.
Thanks & Regards,
Chintan.
C.R.Naik
|
|
|
|
|
Hello folks!
Do you know of any good guide about writing a shell replacement for windows in VC++? I tried to google around but i didn't find anything usefull really, maybe i am not looking for the right terms...i tried to search here on CP too of course but no luck...so if any of you knows where to look or at least what i should search for, please give suggestions, thanks a lot in advance.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Sometimes you just have to hate coding to do it well. <
|
|
|
|
|
It all depends on what you want your replacement to do. If you mean a complete replacement of Windows then you have about 500 years of development ahead of you. If you mean just one small part then perhaps you could expand on your requirements.
MVP 2010 - are they mad?
|
|
|
|
|
Thanks for the answer. Of course i know that writing a complete replacement that can do at least what explorer.exe can do and more is not a one man job, or a one man job for the coming 2 centuries. But i have no such ambitious plans, i am just after learning something new, to expand my knowledge, see what could be possible and what not.
Richard MacCutchan wrote: If you mean just one small part then perhaps you could expand on your requirements.
-i don't understand what you mean by expanding requirements, i probably lack the "proper english" here...
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Sometimes you just have to hate coding to do it well. <
|
|
|
|
|
Code-o-mat wrote: -i don't understand what you mean by expanding requirements,
Well your original question was "Do you know of any good guide about writing a shell replacement for windows in VC++". So what do you mean by a Shell replacement? What do you expect your version to do? You might like to take a look at some of the open source projects around to see what they offer and whether reading some of that code will help you.
MVP 2010 - are they mad?
|
|
|
|
|
i think Saurabh.Garg (here's his post[^]) got it right, i am/was looking for some general guide, something that would explain exactly what tasks a replacement for the graphical shell has to fullfill, i mean from the system's point of view, not the user's, i guess it isn't simply just replacing explorer.exe with something else (changing the registry entry that points windows at explorer.exe to make it run some other program instead upon logon) and done, i read on some forum that the shell has to perform some special initializations in order to work (and of course these were not listed). Looking thorough those codes is a good idea, it might be very hard though to understand it without any basic idea of what exactly the intent of the whole thing is...hmm, they however might have comments in the code that might be very usefull and shed a lot of light onto the whole thing, thanks.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Sometimes you just have to hate coding to do it well. <
|
|
|
|
|
Code-o-mat wrote: i think Saurabh.Garg (here's his post[^]) got it right
Strange, that's what I said!
MVP 2010 - are they mad?
|
|
|
|
|
You mean a replacement for explorer.exe? Take a look at qmmander[^] - not an instruction, but at least it is open source.
|
|
|
|
|
Thanks for the answer, however, i am not exactly after yet another file commander program (althorough qmmander does look interesting ), i would just like to learn a bit about how windows' graphical shell ticks and how one would go about replacing it with something else, i just feel like experimenting some (probably on a virtual windows install).
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Sometimes you just have to hate coding to do it well. <
|
|
|
|
|
|
Hi,
Sorry for intruding on this thread, but I'm following it with interest.
Your list gives only alternative shells for the older OS's.
I would be most interested in an alternative shell for Vista and Win7, mainly one that will roll back the security settings and look and feel to something similar to Windows XP.
Regards
Bram van Kampen
|
|
|
|
|
You can always change Win7 to use Windows Classic and turn off UAC.
|
|
|
|
|
Hi,
Thanks.
Well, to tell you the truth, I have not even tried Windows 7 yet. All our customers are running on either Win98, or Win XP. We tried to run on Vista, that was a disaster, even with UAC turned off. Maybe Win7 is better.
I am preparing an article about the larger issues at hand for applications which are not cutting edge technology driven, and could survive live quite well with older technology.
Licencing terms and MS Monopoly will be the main issue there.
Regards,
Bram van Kampen
|
|
|
|
|
Thank you.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Sometimes you just have to hate coding to do it well. <
|
|
|
|
|
I don't think there is a general guide like one you are seeking. You should list the features you want in your shell and if during implementation you encounter problems I am sure people here can help you out.
-Saurabh
|
|
|
|
|
Thanks for the reply, i don't have any specific plans for it (yet), currently i am only curious about the means and hows of doing such a project, the basic idea of it all, what such a replacement has to do to work with the system from the point of the system itself, now really from the point of the user, for example i read on some forum that the shell has to perform certain initializations (these were of course not listed) in order to work right, so i guess it isn't just a simply replacing a program (explorer.exe) with anything else...oh well, i guess as Richard MacCutchan suggested[^], i will have to study some opensource projects.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Sometimes you just have to hate coding to do it well. <
|
|
|
|
|
Hi,
I am beginner to VC++. Now I want to develop an application where window divided into two parts. left side i am having tree view and right side display information.
I already implemented tree view using SDI application (CTreeView).
Now I want to implement a tree in CFormView. How can i write a tree implementation in CForm View.
Please suggest me the solution. Also If you have any references related to this please send me.
Thanks in advance........
To invent something, you need a mountain of junk in your mind.
---------------------Thomas alva edison
|
|
|
|
|
One solution is to use a spliter (CSplitterWnd) to split the view into 2 parts, the left side (for example) will contain the tree, and the right side will contain the "information".
This signature was proudly tested on animals.
|
|
|
|
|
You can consider a tree control (CTreeCtrl) for form view.
|
|
|
|
|
Hi All
I want to make a dialog based application which have send mail.I have no idea how can i do this? Plz help me
|
|
|
|
|
Have a look at CodeProject articles about MAPI [^].
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.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Member 6864839 wrote: I want to make a dialog based application which have send mail.
Those are mutually exclusive things. Which are you having trouble with?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius
|
|
|
|