Re: VC++6 CreateWindow fails in init instance
r_z_aret_at_pen_fact.com
Date: 09/18/04
- Next message: r_z_aret_at_pen_fact.com: "Re: Drawing a rectangle to a form"
- Previous message: r_z_aret_at_pen_fact.com: "Re: VC++6 CreateWindow fails in init instance"
- In reply to: Andrew Kennard: "Re: VC++6 CreateWindow fails in init instance"
- Next in thread: r_z_aret_at_pen_fact.com: "Re: VC++6 CreateWindow fails in init instance"
- Messages sorted by: [ date ] [ thread ]
Date: Sat, 18 Sep 2004 13:22:55 -0400
On Fri, 17 Sep 2004 09:16:41 +0100, "Andrew Kennard"
<a.kennard@btinternet.com> wrote:
>Aaaah thanks.
>
>I'm as you can probably tell i'm new to c++ and started my c++ programming
>experience on WinCE and XP and hadn't appreciated win9x wasn't unicode
Yep. It's also missing some functions, but you would already know that
if it were relevant.
To (perhaps needlessly) expand/clarify an earlier post:
For eVC, UNICODE must _always_ be defined, and the eVC IDE obliges.
Windows 95 (and probably 98 and ME, which are based on 95) do not
really support Unicode strings, so UNICODE should _not_ be defined; an
earlier post (from Guitar Bill) mentioned software (library?) you can
use to support Unicode strings on Win 95. Windows NT and Windows
versions based on it (2K, XP), support Unicode, so UNICODE can be
defined for apps that "want" to support Unicode strings.
>
>So I presume this means that all messages like WM_GETTEXT etc return char
>arrays and wchars etc ?
>
>TIA
>
>Andrew
>
>"GuitarBill" <GuitarBill_at_cox_dot_net> wrote in message
>news:%23r8oVVCnEHA.2552@TK2MSFTNGP11.phx.gbl...
>> Possibly a Unicode issue? (not supported on Win9x; you will need to use
>> MSLU/unicows). Are you compiling for Unicode?
>> You are mixing metaphors with the code you posted - should be _stprintf
>not
>> wsprintf (which is wide/Unicode version, which might explain bogus message
>> string on non-Unicode build?)
>>
>> "Andrew Kennard" <a.kennard@btinternet.com> wrote in message
>> news:eSBnPYBnEHA.2216@TK2MSFTNGP10.phx.gbl...
>> > Yes I tried to show it in a message box in the normal way but it just
>> comes
>> > out as a load of ?????????????????????? instead of a number ?
>> >
>> > It's just the usual
>> >
>> > TCHAR szTemp[100];
>> > wsprintf(szTemp,TEXT("Create window failed %d"),GetLastError());
>> > MesssageBox(NULL,szTemp,NULL,MB_OK);
>> >
>> > I've used this elsewhere in the code OK but it doesn't seem to work here
>?
>> > Perhaps it's too early in the code or the fact the main window for the
>> prog
>> > isn't created ?
>> >
>> > TIA
>> >
>> > Andrew Kennard
>> >
>> > "Steve Alpert" <sra@newsgroups.nospam> wrote in message
>> > news:uKJxLkAnEHA.1248@TK2MSFTNGP09.phx.gbl...
>> > > Andrew Kennard wrote:
>> > > > Hi all
>> > > >
>> > > > I have a small VC++6 program written on my WinXP dev machine that
>runs
>> > fine
>> > > > on other XP machines
>> > > >
>> > > > If however I try and run it on a Win9x machine it stops before it's
>> even
>> > got
>> > > > going.
>> > > >
>> > > > The problem seem to be the CreateWindow inside InitInstance is
>> failling
>> > but
>> > > > I don't know why ?
>> > > >
>> > > > If I create a "hello world" app this runs fine on Win9x
>> > > >
>> > > > So it's definately something in my app/project
>> > > >
>> > > > The InitInstance, RegisterClass, WinMain are as per the hello world
>> app.
>> > > >
>> > > > It is complied as a MultiThreaded app in the CodeGeneration
>> properties.
>> > > >
>> > > > Any pointers as to what might cause my app to fail at this very
>early
>> > stage
>> > > > would be most appreciated
>> > >
>> > > If you have the source, did you try calling GetLastError() after the
>> > > failure?
>> > >
>> > > /steveA
>> > >
>> > > --
>> > > Steve Alpert
>> > > my email Fgrir_Nycreg @ vqk.pbz is encrypted with ROT13
>(www.rot13.org)
>> > > and spaces
>> > >
>> >
>> >
>>
>>
>
-----------------------------------------
To reply to me, remove the underscores (_) from my email address (and please indicate which newsgroup and message).
Robert E. Zaret, eMVP
PenFact, Inc.
500 Harrison Ave., Suite 3R
Boston, MA 02118
www.penfact.com
- Next message: r_z_aret_at_pen_fact.com: "Re: Drawing a rectangle to a form"
- Previous message: r_z_aret_at_pen_fact.com: "Re: VC++6 CreateWindow fails in init instance"
- In reply to: Andrew Kennard: "Re: VC++6 CreateWindow fails in init instance"
- Next in thread: r_z_aret_at_pen_fact.com: "Re: VC++6 CreateWindow fails in init instance"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|