Click here to Skip to main content
15,908,444 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Accessing Dialog member Variable problem Pin
Cedric Moonen3-Dec-09 20:10
Cedric Moonen3-Dec-09 20:10 
AnswerRe: Accessing Dialog member Variable problem Pin
Rajesh R Subramanian3-Dec-09 21:14
professionalRajesh R Subramanian3-Dec-09 21:14 
QuestionWhich window has the focus [modified] Pin
SujayG3-Dec-09 18:17
SujayG3-Dec-09 18:17 
AnswerRe: Which window has the focus Pin
«_Superman_»3-Dec-09 18:21
professional«_Superman_»3-Dec-09 18:21 
GeneralRe: Which window has the focus Pin
SujayG3-Dec-09 18:31
SujayG3-Dec-09 18:31 
GeneralRe: Which window has the focus [modified] Pin
Madhu Nair3-Dec-09 19:28
Madhu Nair3-Dec-09 19:28 
AnswerRe: Which window has the focus Pin
vasu_sri3-Dec-09 20:18
vasu_sri3-Dec-09 20:18 
QuestionIs there a convenient way to change a System environment variable in MFC? Pin
Erik3-Dec-09 18:16
Erik3-Dec-09 18:16 
Hi,

I'm using VS 2005 and MFC, and I want to modify a system environment variable. So I looked up in the MSDN help and found that it is easy to set a user environment variable. However, for changing a system variable, the help says:

"Calling SetEnvironmentVariable has no effect on the system environment variables. The user can add or modify system environment variables using the Control Panel. To programmatically add or modify system environment variables, add them to the HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment registry key, then broadcast a WM_SETTINGCHANGE message. This allows applications, such as the shell, to pick up your updates. Note that environment variables listed in this key are limited to 1024 characters."

I understand that, but find this way very error-prone and complicated. Is there really no easy, straightforward way to do such a simple thing as setting a system variable? No other methods availbale in MFC?

Thanks alot
AnswerRe: Is there a convenient way to change a System environment variable in MFC? Pin
T21023-Dec-09 19:27
T21023-Dec-09 19:27 
GeneralRe: Is there a convenient way to change a System environment variable in MFC? Pin
Erik3-Dec-09 23:36
Erik3-Dec-09 23:36 
QuestionRe: Is there a convenient way to change a System environment variable in MFC? Pin
David Crow4-Dec-09 3:41
David Crow4-Dec-09 3:41 
Questionwhy RES file contain ICO file path? Pin
HOW WHAT3-Dec-09 17:06
HOW WHAT3-Dec-09 17:06 
AnswerRe: why RES file contain ICO file path? [modified] Pin
Adam Roderick J3-Dec-09 17:14
Adam Roderick J3-Dec-09 17:14 
Questionerror LNK2001: unresolved external symbol _wWinMain@16 Pin
includeh103-Dec-09 15:32
includeh103-Dec-09 15:32 
QuestionRe: error LNK2001: unresolved external symbol _wWinMain@16 Pin
David Crow3-Dec-09 16:02
David Crow3-Dec-09 16:02 
AnswerRe: error LNK2001: unresolved external symbol _wWinMain@16 Pin
Adam Roderick J3-Dec-09 17:06
Adam Roderick J3-Dec-09 17:06 
Questionload bitmap into memory [modified] Pin
transoft3-Dec-09 11:54
transoft3-Dec-09 11:54 
AnswerRe: load bitmap into memory Pin
«_Superman_»3-Dec-09 13:04
professional«_Superman_»3-Dec-09 13:04 
GeneralRe: load bitmap into memory Pin
transoft4-Dec-09 2:18
transoft4-Dec-09 2:18 
QuestionHow to measure program speed? Pin
Grimes3-Dec-09 6:31
Grimes3-Dec-09 6:31 
QuestionRe: How to measure program speed? Pin
David Crow3-Dec-09 6:38
David Crow3-Dec-09 6:38 
AnswerRe: How to measure program speed? Pin
Grimes3-Dec-09 6:45
Grimes3-Dec-09 6:45 
AnswerRe: How to measure program speed? Pin
«_Superman_»3-Dec-09 8:19
professional«_Superman_»3-Dec-09 8:19 
GeneralRe: How to measure program speed? Pin
Grimes3-Dec-09 9:47
Grimes3-Dec-09 9:47 
AnswerRe: How to measure program speed? Pin
David Crow3-Dec-09 9:55
David Crow3-Dec-09 9:55 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.