|
Hi,
I came across an article about setting windows Environment variables from within a program.
http://www.codeproject.com/KB/system/EnvMan.aspx[^]
However it uses .net library's Environment class to do it.
Is there some way to do it using win32/mfc native code?
I tried the _putenv() and getenv() functions but it seems they affect the process which makes these calls only. The changed values do not get reflected on the system level.
Is there any other way to achieve this?
only dead fish swim with the stream
modified on Sunday, May 25, 2008 8:38 AM
|
|
|
|
|
|
thanks Jijo raj.
this seems to be exactly what i was looking for.
only dead fish swim with the stream
|
|
|
|
|
Hi,
i'm working now for some days with the ultimate toolbox.
The small examples were no problem, but now i'm in the advanced folder at the Fileexplorer example.
This is the contol i need and the reason for me to start with the UT because later on i wlii try to implement such a treevew and its listview in a projekt of mine.
But because of the total lack of tuts dealing with the UT i've now a problem.
I copied the FileExplorer sample out of the sample folder in another folder and then i added the headerfiles OXShellFolderTree.h, OXShellNamespaceNavigator.h und OXShellObjectList.h to the project, it works !
But know i want to build up this FileExplorer example on my own, because of training reasons.
I opend a new mfc project (Windows Explorer Style) and added the headerfiles.
What have i to do now?
There is a folder in the orig. sample "UTBSource", have i to add it to my project too?
Have i to change something in the project settings in the studio?
Oh i think it is quiet important, i'm usin Vc++ 6.0 !!!
Thanks a lot for your help!
Best regards
Crocodile Buck
P.S.: Do you know some step by step tuts dealing with the UT.
|
|
|
|
|
...really nobody?
best regards
Croc
|
|
|
|
|
Hi all,
In a fashion similar to that of the existing windows start/task bar, I would like to create an additional bar/panel at the upper extremity of the desktop area. As this would involve a reduction of the existing desktop area in order to ensure that application windows do not encroach upon this area, I'm at a loss as to how this may be achieved.
Any ideas/advice would be gratefully received.
Best regards, Lee.
|
|
|
|
|
i want to convert source from c++ to c.
if you know site that i can request small source to convert or delevope who can use c++ and c
Total number of line is 500.
please tell me~
hi
|
|
|
|
|
Search on internet, you will get lot of options , ofcourse, if they understand what you are trying to do.
Prasad
MS MVP - VC++
|
|
|
|
|
sunerbun wrote: i want to convert source from c++ to c.
Make it yourself: it's a quite enjoyable experience, good luck.
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
|
|
|
|
|
Just some add on informations. May be helpful during your quest.
Cfront - the first C++ compiler made by Stroustrup works the same way as you wish. It converts C++ programs to C and compiles. But it failed to implement C++ exception handling and came to RIP . See wiki for more info - http://en.wikipedia.org/wiki/Cfront[^]
You can download the CFront from http://www.softwarepreservation.org/projects/c_plus_plus/cfront[^]. But not sure whether you can generate the intermediate C files. Anyway just have a look.
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|
|
If it can be done or not, depends entirely on the code.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
I think you must doing yourself.
|
|
|
|
|
Hamid. wrote: I think you must doing yourself.
or get it for free at www.cpallini.freeproducts.com[^].
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
|
|
|
|
|
But I cant connect to your web site(do you know why) when I want to connect it asks do you know Pallini I said yeah then I got "you cant use of this site" again I said No and it told me this site designed for Pallini!
|
|
|
|
|
I am reading the value of the size from the properties file...
e.g.
file_size=500.
I have to check for the file size limit. The max limit is set as done above. During runtime the following function checks for the file size with the above by using the following function to get the current file size.
int get_file_size()
{
long file_size;
ifstream myfile;
myfile.open(path.c_str());
myfile.seekg(0, ios::end);
file_size = myfile.tellg();
myfile.close();
return file_size;
}
But if I do this I get the file size in bytes. I want to do everything in kb's. Any suggestion please.
THANKS.
|
|
|
|
|
How about:
return file_size/1024; ?
|
|
|
|
|
No, that would be a Kibibyte.
|
|
|
|
|
Are you kidding??
If not, my suggestion would be:
Go back to first grade and start all over again.
|
|
|
|
|
Do you know bytes and kilobytes are simply related, don't you?
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
|
|
|
|
|
CPallini wrote: kilobytes
Kilo is actually metric and means 1000, not 1024.
|
|
|
|
|
I know but:
(1) It is a controversial point [^](do you manufacture hard disks?).
(2) It has no releveance on my statement validity.
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
|
|
|
|
|
I was just stating how I interpret the term "kilo", not how the HD manufacturers abuse it for their marketing.
Interesting article on Wikipedia, by the way. I think these new IEC (kibi, mebi ) and Jedec standards are just idiotic. They should simply stick with KB/KByte, MB/MByte.
|
|
|
|
|
Do you really need to open the file and seek to end to get the size? Why directory informations are for then??
|
|
|
|
|
Why you dont use of CFile::GetLength or GetFileAttributesEx if you dont like to use of them so I tell you a secret that is on the c++ and its:StrFormatByteSizeA .
|
|
|
|
|
http://www.mathematische-basteleien.de/somacube.htm
i am searching about soma cube.
and above site show Full source about soma by c++.
but i can't understand the numbers~~
do you know what mean this?
Loesung Nr: 1
000 100 000 011 000 000 000
000 000 000 001 110 000 000
000 000 011 000 100 000 000
000 100 000 001 000 010 000
000 110 001 000 000 000 000
000 000 001 000 000 000 110
000 000 000 000 000 111 000
111 000 000 000 000 000 000
100 000 000 000 000 000 011
firstly, i am sorry, i am from korea.
and i am not good in wriitting english so please understand~
Thank you everyone~
|
|
|
|