RE: How to get ride off this warning ?

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Naren (Naren_at_discussions.microsoft.com)
Date: 12/27/04


Date: Sun, 26 Dec 2004 20:33:02 -0800


you can make that by using MAKEINTRESOURCE macro. i think it works

just replace the line with CString str (MAKEINTREAOURCE(string_id));

"Polaris" wrote:

> Hi:
>
> I have a string resource defined. I need to pass this string ID to another
> function like this:
>
> void foo (UINT string_id)
> {
> CString str ((LPCTSTR)string_id);
> }
>
> During comiling, got error at casting ((LPCTSTR)string_id. But it works
> fine. Just wonder, how to get ride off this warning?
>
> Thanks In Advance!
> Polaris
>
>
>



Relevant Pages