• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1241
  • Last Modified:

Windows EventLog - Making a custom EventMessageFile

I have a Win32 service that is writing events to the windows event log,  I send a value such as "12:00:00" and it gets formatted according to a format string (defined in my custom eventmessagefile) and results in a viewable message in the event viewer that looks like this:

"Ding!  It is now 12:00:00"

It is all working fine.

What I want, however is to change my eventmessagefile format string so that the viewable message now looks like this:"


The Time is now 12:00:00"

How do I format the eventmessagefile so that it contains those two linefeeds?

I use XN Resource Editor to create my resource files, and this is what I've tried

Editing the EventMessageFile format string

It seems to work okay, but the linefeeds I enter into XN Resource Editor aren't appearing in the Event Viewer.

After editing the format string
It still appears like:

The message all appears on one line:
Brian Withun
Brian Withun
  • 2
2 Solutions
käµfm³d 👽Commented:
käµfm³d 👽Commented:

You'll need two of them  : )
Brian WithunAuthor Commented:
It was actually a "%n" that I needed.

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now