Click here to Skip to main content
15,898,035 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Where is Depends 2.x in VS.NET Pin
Big Art13-Mar-03 6:55
Big Art13-Mar-03 6:55 
GeneralRe: Where is Depends 2.x in VS.NET Pin
cemlouis13-Mar-03 7:24
cemlouis13-Mar-03 7:24 
GeneralRe: Where is Depends 2.x in VS.NET Pin
Michael Dunn13-Mar-03 7:50
sitebuilderMichael Dunn13-Mar-03 7:50 
QuestionHow to debug ATL COM DLL with ASP Pin
mdivatia@hotmail.com13-Mar-03 6:35
mdivatia@hotmail.com13-Mar-03 6:35 
AnswerRe: How to debug ATL COM DLL with ASP Pin
Hesham Amin13-Mar-03 6:41
Hesham Amin13-Mar-03 6:41 
GeneralRe: How to debug ATL COM DLL with ASP Pin
mdivatia@hotmail.com13-Mar-03 8:00
mdivatia@hotmail.com13-Mar-03 8:00 
AnswerRe: How to debug ATL COM DLL with ASP Pin
Brian Shifrin13-Mar-03 8:08
Brian Shifrin13-Mar-03 8:08 
Generalproblem with trivial MFC app Pin
Mister Transistor13-Mar-03 6:27
Mister Transistor13-Mar-03 6:27 
As testing for a real MFC application I made a trivial one, but ran in to problems. To my mind this exemplifies the difficulties faced by the newbie to MFC and doc/view.

I wanted a single-window MFC doc/view app with a static control on the window.

I used AppWizard to make an MFC EXE. It ran and showed an empty window.
I put my static control in the view .h file
private:
CStatic Statcontrol;
Now I made my ..Create() in the view .cpp file
RECT rect = {100,100,200,200};
Statcontrol.Create("hello",WS_CHILD | WS_VISIBLE | SS_CENTER,rect,this,ID_STAT);
But where do I put this code? In the view constructor it fails. In PreCreateWindow() it fails. All I get is a FALSE return - not much diagnostics. (But I guess 'this' is wrong). In the OnDraw() handler it works! But then it's called multiple times.

Help! Why is something so simple so difficult? MFC books never help with things like this.

Andrew


MisterTransistor - germanium is King
GeneralRe: problem with trivial MFC app Pin
Gary Kirkham13-Mar-03 6:43
Gary Kirkham13-Mar-03 6:43 
GeneralRe: problem with trivial MFC app Pin
Mister Transistor13-Mar-03 21:54
Mister Transistor13-Mar-03 21:54 
GeneralRe: problem with trivial MFC app Pin
Gary Kirkham15-Mar-03 9:06
Gary Kirkham15-Mar-03 9:06 
GeneralRe: problem with trivial MFC app Pin
Anonymous13-Mar-03 10:55
Anonymous13-Mar-03 10:55 
Generalextracting flags from an integer Pin
Kuniva13-Mar-03 6:24
Kuniva13-Mar-03 6:24 
GeneralRe: extracting flags from an integer Pin
Hesham Amin13-Mar-03 6:54
Hesham Amin13-Mar-03 6:54 
GeneralRe: extracting flags from an integer Pin
Gary Kirkham13-Mar-03 6:55
Gary Kirkham13-Mar-03 6:55 
GeneralRe: extracting flags from an integer Pin
Hesham Amin13-Mar-03 7:11
Hesham Amin13-Mar-03 7:11 
GeneralRe: extracting flags from an integer Pin
Nitron13-Mar-03 8:11
Nitron13-Mar-03 8:11 
GeneralSystem Variables and PATH Pin
Brian Delahunty13-Mar-03 5:53
Brian Delahunty13-Mar-03 5:53 
GeneralDoubles to Strings for Edit Box Output Pin
Brent Lamborn13-Mar-03 5:18
Brent Lamborn13-Mar-03 5:18 
GeneralRe: Doubles to Strings for Edit Box Output Pin
Gary Kirkham13-Mar-03 7:01
Gary Kirkham13-Mar-03 7:01 
GeneralRe: Doubles to Strings for Edit Box Output Pin
Brent Lamborn13-Mar-03 8:52
Brent Lamborn13-Mar-03 8:52 
GeneralRe: Doubles to Strings for Edit Box Output Pin
Gary Kirkham13-Mar-03 9:03
Gary Kirkham13-Mar-03 9:03 
GeneralRe: Doubles to Strings for Edit Box Output Pin
Brent Lamborn13-Mar-03 9:13
Brent Lamborn13-Mar-03 9:13 
GeneralRe: Doubles to Strings for Edit Box Output Pin
Gary Kirkham13-Mar-03 9:08
Gary Kirkham13-Mar-03 9:08 
GeneralRe: Doubles to Strings for Edit Box Output Pin
Brent Lamborn13-Mar-03 11:06
Brent Lamborn13-Mar-03 11:06 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.