# Migrate a Windows project to support dark title bars

> How to update a Windows project to support dark title bars




:::important
These breaking change docs are accurate, as of the release
under which they are published. Over time, the
workarounds described here might become inaccurate.
We don't, in general, keep these breaking change docs up
to date as of each release.

这些破坏性改动文档的准确性仅限于其发布时对应的版本。
随着时间的推移，文档中描述的方案可能会逐渐失效。
通常情况下，我们不会在每次发布新版本时都对这些文档进行同步更新。

The [breaking change index file](/release/breaking-changes)
lists the docs created for each release.

[破坏性改动列表](/release/breaking-changes) 
列出了每个版本的文档。

:::


Projects created before Flutter 3.7 have light title bars even
when the Windows theme is dark mode. Projects created before
Flutter 3.7 need to be migrated to support dark title bars.

## Migration steps

Your project can be updated using these steps:

1. Verify you are on Flutter version 3.7 or newer using `flutter --version`
2. If needed, use `flutter upgrade` to update to the latest version of the
Flutter SDK
3. Backup your project, possibly using git or some other version control system
4. Delete the following files:
    1. `windows/runner/CMakeLists.txt`
    2. `windows/runner/win32_window.cpp`
    3. `windows/runner/win32_window.h`
5. Run `flutter create --platforms=windows .`
6. Review the changes to the following files:
    1. `windows/runner/CMakeLists.txt`
    2. `windows/runner/win32_window.cpp`
    3. `windows/runner/win32_window.h`
7. Verify your app builds using `flutter build windows`

:::note
Follow the [run loop migration guide][] if the build fails
with the following error message:

```console
flutter_window.obj : error LNK2019: unresolved external symbol "public: void __cdecl RunLoop::RegisterFlutterInstance(class flutter::FlutterEngine *)" (?RegisterFlutterInstance@RunLoop@@QEAAXPEAVFlutterEngine@flutter@@@Z) referenced in function "protected: virtual bool __cdecl FlutterWindow::OnCreate(void)" (?OnCreate@FlutterWindow@@MEAA_NXZ)
```
:::

## Example

[PR 862][] shows the migration work for the
[Flutter Gallery][] app.

[run loop migration guide]: /release/breaking-changes/windows-run-loop
[PR 862]: https://github.com/flutter/gallery/pull/862/files
[Flutter Gallery]: https://flutter-gallery-archive.web.app

