'Visual C++ 6.0'에 해당되는 글 2건


우선 다음의 코드를 "프로그램이름.exe.manifest" 파일로 저장하세요. 

----------------------------------------- 프로그램이름.exe.manifest ------------------------------------------------------

<?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="CompanyName.ProductName.YourApplication"
    type="win32"
/>
<description>Your application 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>
</assembly>

 ------------------------------------------------------ cut -----------------------------------------------------------------


만약 64비트 플랫폼을 사용하신다면 위의 빨갛게 표시된 코드를 다음 코드로 변경해 주세요.

processorArchitecture="IA64"


이제 이 파일을 프로젝트 폴더에 집어넣고 기존의 만들어진 Resource script 파일(.rc)을 메모장으로 열어서 다음의 코드를 적당한 곳에 추가해 주세요.

 CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "프로그램이름.exe.manifest"

신고
블로그 이미지

꽃중년

불만있으면 떠나라...


Adding the Windows XP visual style to Visual C++ 6.0 projects

Overview of steps to follow:

  • Create a .manifest file as a resource
  • Add definition for manifests to project.rc
  • Include manifest in project
  • Change all dialog fonts
When Windows XP was released, with it came a new visual style which I believe is called Luna, although I tend to refer to it as the cartoon interface :) It's the one with the curved green Start button, and a large red close button which has a rollover effect and rounded corners. Although your apps written in VC++ will pick up some of these features when your user has the Luna style enabled, the controls within your app don't match:

In order to achive this, create a file in your application's resource directory, with a name of the name of your main executable with .manifest appended. The file contents look like:

<?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="Zhorn.Styles.Styles"
    type="win32
/>
<description>Styles - demonstrate XP styles</description>
<dependency>
<dependentAssembly>
<assemblyIdentity
    type="win32"
    name="Microsoft.Windows.Common-Controls "
    version="6.0.0.0"
    processorArchitecture="X86"
    publicKeyToken="6595b64144ccf1df"
    language="*"
/>
</dependentAssembly>
</dependency>
</assembly>
Don't copy from this web page or DevStudio might crash! Use the zip file below

You will of course want to alter the elements in Bold type to be something appropriate to your project.

Next, edit your project's resource.h file and the main resource file - in our example this will be called styles.rc. I find this simpler to do with Developer Studio closed so that it doesn't complain about having files modified underneath it.

Add the line:

MANIFEST_RESOURCE_ID    24      MOVEABLE PURE   "res\\styles.exe.manifest"

to the styles.rc file - and replace the part in bold again with whatever the file name is for your project.

Then open the resource.h file, and add the line:

#define MANIFEST_RESOURCE_ID    1

at the start somewhere.

Finally, re-open Developer Studio, and change the fonts on all your dialog resources to be Tahoma and not MS Sans Serif. This font isn't a truetype one, so when the user selects ClearType, XP is not able to apply that option to MS Sans Serif.

If you've added a recent enough Platform SDK to your Developer Studio install, you may find the resource.h line isn't required.


신고
블로그 이미지

꽃중년

불만있으면 떠나라...

티스토리 툴바