Sorry, don't know then. Was wondering how to include MFC into Win32 myself. I think it may be best to create an MFC project, and then put or link all your Win32 stuff in there. Only option I can think of.:)
JGStanier
Posts
-
how can use MFC in a non MFC win32 project -
how can use MFC in a non MFC win32 projectDon't you just include the appropriate MFC header files (see StdAfx.h of standard MFC project)?:cool:
-
Monitoring Internet trafficHow do I monitor traffic on an already open TCP/IP port? Do I need to use hooks?:eek:
-
Macros in Windowsx.hI've found there are loads of macros in the windowsx.h header file. Anyone know if there is a listed description of these macros available, or do I just plough through this header? Thanx.;)
-
Problem with MessageBoxNo, when I run it I get nothing, just a 1407 error message, and then the program terminates.
-
Problem with MessageBoxYes, sorry, I was trying something and forgot to replace it with NULL.:-O Still get an error message saying it can't find the window class though. I guess it isn't linking the windows.h file.
-
Problem with MessageBoxOops, '/*Module: MyLib.h*/' should read '/*Module: MyLibFile.h*/':)
-
Problem with MessageBoxIts an implicitly loaded DLL. The DLL code is as follows (NB its not my code, I got it out of a book):
/*Module: MyLibFile1.cpp*/ #include <windows.h> #define MYLIBAPI extern "C" __declspec(dllexport) #include "MyLibFile.h" int g_nResult; int Add(int nLeft, int nRight) { g_nResult = nLeft + nRight; return(g_nResult); }
The header file is:/*Module: MyLib.h*/ #ifndef MYLIBAPI #define MYLIBAPI extern "C" __declspec(dllimport) #endif MYLIBAPI int g_nResult; MYLIBAPI int Add(int nLeft, int nRight);
And the main code that includes the MessageBox() is as follows:/*Module: MyExeFile1.cpp*/ #include <windows.h> #include "..\MyLibFile\MyLibFile.h" int WINAPI WinMain(HINSTANCE hinstExe, HINSTANCE, LPTSTR pszCmdLine, int) { int nLeft = 10, nRight = 25; TCHAR sz[100]; wsprintf(sz, TEXT("%d + %d = %d"), nLeft, nRight, Add(nLeft, nRight)); MessageBox(GetActiveWindow(), sz, TEXT("Calculation"), MB_OK); DWORD Error = GetLastError(); wsprintf(sz, TEXT("The result from the last Add is: %d"), g_nResult); MessageBox(NULL, sz, TEXT("Last Result"), MB_OK); return(0); }
:) -
Problem with MessageBoxI have written a simple program that imports a DLL at compile time, and then displays a message box (MessageBox()) containing data from the imported DLL. The problem is that the data gets imported, but the message box doesn't get displayed, returning code 1407 'Cannot find window class'. But when I don't import the DLL, the message box displays fine. Anyone have any ideas?:)
-
Programming Applications for Windows (J Richter)Thought so, the stack was full of repeated function calls. Can't see why this is happening though, how come it is easy to do with hooks? Any way of preventing this? Thanks.
-
Programming Applications for Windows (J Richter)It says "Unhandled exception at 0x10011669 in 22 LastMsgBoxInfo.exe: 0xC00000FD: Stack overflow." It then says "There is no source code available for the current location." so I look at the Disassembled version and can't figure out what's going on. Any way of looking at assembler code to debug?Hope you can help.
-
Programming Applications for Windows (J Richter)Am trying to get Jeffrey's LastMesaageBox example hooking software working on XP using Microsoft Development Studio .NET. I keep getting an error that the stack is overflowing just when the message box is being displayed. Anyone have any ideas?:sigh: