views:

67

answers:

1

Hi,

Good morning!

Is there any pattern (software design pattern) for loading images or message strings from resource files?

-Pavan.

+3  A: 

A pattern describes a general solution to a particular situation. It's about the larger structure and not about single commands.

Loading images or message strings from resource files boils down to simple commands, i.e.

LoadString (HINSTANCE, UINT, LPTSTR, int)

so I don't think that you will find a "pattern" for this.

Smasher
Think of a larger project with multi language support.
Pavan
Pavan, no matter the size of a project, the "pattern" for loading things from resource files is always going to be "load the resource." You can pile other abstractions on top of it, but those don't change the pattern. Clearly, a pattern isn't really what you're looking for. Maybe you're asking about "best practices" or "idioms."
Rob Kennedy