Re: VC++6 CreateWindow fails in init instance
From: Andrew Kennard (a.kennard_at_btinternet.com)
Date: 09/17/04
- Next message: Steve Alpert: "Re: Problem with ODS_NOACCEL"
- Previous message: Christian ASTOR: "Re: CListCtrl"
- In reply to: GuitarBill: "Re: VC++6 CreateWindow fails in init instance"
- Next in thread: vipin: "Re: VC++6 CreateWindow fails in init instance"
- Reply: vipin: "Re: VC++6 CreateWindow fails in init instance"
- Reply: r_z_aret_at_pen_fact.com: "Re: VC++6 CreateWindow fails in init instance"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 17 Sep 2004 09:16:41 +0100
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
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
> > >
> >
> >
>
>
- Next message: Steve Alpert: "Re: Problem with ODS_NOACCEL"
- Previous message: Christian ASTOR: "Re: CListCtrl"
- In reply to: GuitarBill: "Re: VC++6 CreateWindow fails in init instance"
- Next in thread: vipin: "Re: VC++6 CreateWindow fails in init instance"
- Reply: vipin: "Re: VC++6 CreateWindow fails in init instance"
- Reply: r_z_aret_at_pen_fact.com: "Re: VC++6 CreateWindow fails in init instance"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|