Click here to Skip to main content
15,921,028 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: GDI+ in Visual C++ 6 Pin
Jun Du8-Apr-07 4:04
Jun Du8-Apr-07 4:04 
AnswerRe: GDI+ in Visual C++ 6 Pin
jk chan8-Apr-07 19:59
jk chan8-Apr-07 19:59 
Questionmulti threading Pin
gingerballs8-Apr-07 3:47
gingerballs8-Apr-07 3:47 
AnswerRe: multi threading Pin
Rob Graham8-Apr-07 4:20
Rob Graham8-Apr-07 4:20 
Questionadapter disconnected Pin
saisp8-Apr-07 3:33
saisp8-Apr-07 3:33 
AnswerRe: adapter disconnected Pin
deeps_cute8-Apr-07 4:53
deeps_cute8-Apr-07 4:53 
QuestionHow to access to registry in vista Pin
bensonchen05088-Apr-07 1:29
bensonchen05088-Apr-07 1:29 
AnswerRe: How to access to registry in vista Pin
bob169728-Apr-07 6:06
bob169728-Apr-07 6:06 
I was having trouble with this as well. Daniel Grunwald was kind enough to point me to an item I must have missed when reading "Windows Vista Application Development Requirements for User Account Control Compatibility" around page 63 and up concerning manifests.

The UAC(User Access Control) junk for Vista, specifically the registry and file virtualization technologies, were kicking in for my windows NT based apps. Apparently, we need to embed one of those darn manifest files in our app to prevent virtualization from kicking in. I've been playing with it for a couple of days and it seems to work. (so far)

Having the manifest with the <trustInfo> section apparently disables virtualization for the app.

Anyway, be forewarned, there are some issues with the manifests from VS 2005 causing some parsing bugs on XP if those manifests are used as is. I'm using the manifest that gets added to my VC++ 2003 projects and modifying it accordingly and things have been stable.

Here's the layout I'm using for standard apps...

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity
version="1.0.0.0"
processorArchitecture="X86"
name="Microsoft.Windows.YourAppNameGoesHere"
type="win32"
/>
<description>Your app description here</description>
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
processorArchitecture="X86"
publicKeyToken="6595b64144ccf1df"
language="*"
/>
</dependentAssembly>
</dependency>
<ms_asmv2:trustInfo xmlns:ms_asmv2="urn:schemas-microsoft-com:asm.v2">
<ms_asmv2:security>
<ms_asmv2:requestedPrivileges>
<ms_asmv2:requestedExecutionLevel level="asInvoker">
</ms_asmv2:requestedExecutionLevel>
</ms_asmv2:requestedPrivileges>
</ms_asmv2:security>
</ms_asmv2:trustInfo>
</assembly>


for administrative utility apps, simply replace the "asInvoker" to "requireAdministrator" and it'll put one of those nifty shields in your icon identifying it as such and ask the user if it's ok to run as admin whenever they try to run it on Vista. This eliminates the need to remember to right click the icon and choose "Run as Administrator".

The article "Using Windows XP Styles in your MFC/WIN32 Applications" here on CP has a decent description on how to embed the manifest file quickly. The Microsoft way requires some defined symbols and it is probably more elegant but if your in a hurry, and want to get this working fast, his article does the job.

Disclaimer: I'm still trying to verify that this doesn't hose my apps on other versions of Windows but so far, XP and W2K have not complained. I've only known about this for a few days myself.

I hope that helps. (Sorry for the long post. I just thought I'd bundle everything people have helped me piece together in one place for others to use)


GeneralRe: How to access to registry in vista Pin
bensonchen050810-Apr-07 14:55
bensonchen050810-Apr-07 14:55 
QuestionCheck if the user is admin Pin
near2world7-Apr-07 14:13
near2world7-Apr-07 14:13 
AnswerRe: Check if the user is admin Pin
cp98767-Apr-07 14:39
cp98767-Apr-07 14:39 
GeneralRe: Check if the user is admin Pin
near2world7-Apr-07 22:17
near2world7-Apr-07 22:17 
QuestionCBitmapButton with transparent bitmap Pin
af140017-Apr-07 9:05
af140017-Apr-07 9:05 
AnswerRe: CBitmapButton with transparent bitmap Pin
Ravi Bhavnani7-Apr-07 11:01
professionalRavi Bhavnani7-Apr-07 11:01 
GeneralRe: CBitmapButton with transparent bitmap Pin
af140019-Apr-07 1:01
af140019-Apr-07 1:01 
GeneralRe: CBitmapButton with transparent bitmap Pin
Ravi Bhavnani9-Apr-07 1:39
professionalRavi Bhavnani9-Apr-07 1:39 
QuestionCheckbox Pin
deeps_cute7-Apr-07 7:59
deeps_cute7-Apr-07 7:59 
AnswerRe: Checkbox Pin
Ravi Bhavnani7-Apr-07 10:57
professionalRavi Bhavnani7-Apr-07 10:57 
GeneralRe: Checkbox Pin
deeps_cute8-Apr-07 1:49
deeps_cute8-Apr-07 1:49 
GeneralRe: Checkbox Pin
Hamid_RT8-Apr-07 2:33
Hamid_RT8-Apr-07 2:33 
GeneralRe: Checkbox Pin
saisp8-Apr-07 3:32
saisp8-Apr-07 3:32 
Questionunzip Pin
prathuraj7-Apr-07 4:27
prathuraj7-Apr-07 4:27 
AnswerRe: unzip Pin
bob169727-Apr-07 5:47
bob169727-Apr-07 5:47 
GeneralRe: unzip Pin
prathuraj7-Apr-07 7:09
prathuraj7-Apr-07 7:09 
GeneralRe: unzip Pin
bob169727-Apr-07 7:24
bob169727-Apr-07 7:24 

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.