• 0

College settings program


Question

Hi..

Wasn't sure whether to post this question but decided what the hell.. I was just wondering if there are any very bored C++ programmers out there that can give me a hand? Well, it would be a bit more than just a hand which is why I wasn't sure whether to post or not.. Anyway..

I've just started C++ at college (3 lessons so far!!) which is why I would like to try using that but if someone reads that and thinks of a programming language that would be alot easier then I'm open to suggestions..

The thing is, everytime I log onto a computer at college it wipes our personal settings.. There's an attached image of what the desktop looks like.. Now this is probably me being very fussy but I just can't live with these settings.. I find myself wasting the 1st 5 or 10 minutes of the lesson setting it back to decent settings.. No font smoothing, grey as hell.. yuck! It just puts me off working..

So I was wondering if I could write a program to load a .theme file and change settings such as cleartype.. Even if I found out how to change the setting in the registry for cleartype (I know where it is) how could I refresh the settings in windows? What I mean is, changing the value in the registry doesn't do anything unless you log off or restart.. But then the settings get wiped..

And the way I will load these settings is using the start menu.. The only way you can load anything on startup is by putting a program in the all users startup folder..

So if anyone has any ideas or suggestions please post them.. Oh and I've aksed the admins nicely and said that I can't stand cleartype off etc and they basically said live with it.. But I think if I can do this it will make me work better and help me learn C++ better..

Please no one post anything about do it yourself or you shouldnt mess with settings I just thought I might aswell ask and if no one wants to help out then thats fair enough..

Thanks

post-47-1096304160.jpg

Link to comment
Share on other sites

11 answers to this question

Recommended Posts

  • 0

wow! that desktop looks so fun and interesting!! not. :\

afaik u shudnt need a program to change the settings. just use a .theme file and put that in the startup folder. worked for me a couple times :)

just try running the theme file, and if it works, then add it 2 startup all the time.

Link to comment
Share on other sites

  • 0

Thanks for the reply..

Unfortunately that brings up the display properties window and doesn't automatically load the theme and close the window.. To be honest I wouldnt be bothered about that but it also doesn't apply settings like cleartype and if I put a shortcut in all users, users that don't have the theme file in there user area would get an error.. I was going to have the program automatically detect whether there was a theme file present and if not, just exit..

I'll do that for now tho thanks :)

Link to comment
Share on other sites

  • 0

99% of settings are controlled through the registry. So you can easily export then import some reg files. The hard part would be getting windows to apply the settings. The quick and dirty method would be to ctrl+alt+del and close explorer.exe, then restart it.

You could also try setting the theme in the registry, then restart the theme service (if you can; not sure if you need/have admin rights).

Link to comment
Share on other sites

  • 0

So is there not a command to restart explorer.exe? And I doubt I'll have rights to mess about with services.. I'll try that idea of exporting and importing registry values when I'm next at college thanks

Link to comment
Share on other sites

  • 0

Check Process32First/Process32Next; these functions enum all running processes. Once you have a process handle for explorer.exe, you can call TerminateProcess and then CreateProcess (or ShellExecute) to run explorer.exe again.

Link to comment
Share on other sites

  • 0

Ok I haven't looked into anything C++ yet I think once I do it will take me a very long time I'm new at programming and this ain't exactly a Hello World thing lol..

But I did change the cleartype setting in the registry and then killed explorer.exe and then ran it again but explorer.exe did not pick up the cleartype setting change in the registry.. So even if I could program it to kill explorer.exe and then start it again it wouldnt work anyway..

Link to comment
Share on other sites

  • 0

So you're saying I can use that to set the cleartype value in the registry? Or are you saying it does it differently than just changing the registry values? Because I already know what the cleartype thing in the registry is and what is has to be set to but like I said just setting that value using regedit and then killing and loading explorer.exe didn't work.. I don't see why a program setting a registry value would be any different? Altho, lets face it, I don't know much at this point!

Sorry if I mis understood I'm about to go to bed lol..

Link to comment
Share on other sites

  • 0

I don't have time to actually write the program at the moment, but if others can help mark, I believe you can use the following APIs:

SystemParametersInfo(SPI_SETFONTSMOOTHING, TRUE, 0, SPIF_UPDATEINIFILE | SPIF_SENDCHANGE); SystemParametersInfo(SPI_SETFONTSMOOTHINGTYPE, FE_FONTSMOOTHINGCLEARTYPE, 0, SPIF_UPDATEINIFILE | SPIF_SENDCHANGE);

See: http://msdn.microsoft.com/library/default....ontext_0xgn.asp

This is only cleartype by the way. You can do similar things with display using SystemParametersInfo for whatever you need. Just look on MSDN for more info.

You may be able to use this also:

SystemParametersInfo(SPI_SETDESKPATTERN,0,NULL,WM_SETTINGCHANGE );

Hope this helps

Edited by schwarz2
Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.