|
use MFC as a statically linked library
Nish
|
|
|
|
|
- Thanks my pal!
- I am a beginner of this topic. Can you show me how to use MFC as a statically linked library?
- Can you show me an example?
- Regards,
Maer
|
|
|
|
|
Take Project-Settings and take the General tab
There will be a drop-down combo with the text "Microsoft Foundation Classes" above it.
Select "Use MFC in a Static Library" from the combo
Nish
|
|
|
|
|
- Thanks Nish pal!
- Your reply is the one I am looking for.
- Regards,
Maer
|
|
|
|
|
Hello everybody,
I create an application(.exe) but sometimes, when i closed it
i noticed that the processus(Myapplication.exe) is not destroyed by
windows NT.
Why?
Thanks for help.
S.
|
|
|
|
|
Have you over-ridden your main frame window's WM_CLOSE handler?
If so, post the code here....
Nish
|
|
|
|
|
Hi everyone. I am sure others have encountered this problem, it came up often at my previous job, but I don't think we ever figured it out completely. I have a dialog based app, which reads data from a DAO database. The data is read in both into edit boxes and list views. Specifically, a list of data is shown in a listview, and a dialog with edit boxes etc appears when you edit or add a new record. Sometimes, mysteriously, instead of the given text being fetched out and displayed in the text box or edit box, all that is displayed is a single black bar (an ASCII character below 32 I imagine). This seems to occur totally randomly, I cannot recreate it this on purpose, but it can occur randomly. it seems to happen more with entries in the middle of the list view. I ahve done a lto of debugging, and it seems data is always fetched out of the DB okay, but it just doesn't appear properly.
|
|
|
|
|
The black bars are undisplayable characters. This is not a bug in CEdit or anything, your data simply contains unprintable chars. These are probably carriage returns or similar.
Try using multiline list boxes, or scanning your data for 0x0D, 0x0A
Sorry to dissapoint you all with my lack of a witty or poignant signature.
|
|
|
|
|
Dear Friends
Should anyone help me how can we keep track of a particular event consecutively i.e. next, next and next.
Can we use a variable with function keys like VK_Fi.
So please give me the answer as soon as possible and help me.
For that I shall ever be grateful to all of you.
Thanking you in advance
Binay Wardhan
|
|
|
|
|
Dear Friends
I want to display content to output display only after key down event i.e. if a particular key a pressed. WM_PAINT message is always the last message and it can post into the message queue after once InvalidateRect is executed.
But I am unable to get the result. So please help me in getting the solution.
So please give me the answer as soon as possible and help me.
For that I shall ever be grateful to all of you.
Thanking you in advance
Binay Wardhan
|
|
|
|
|
How do I get the full path and file name of a file, given just its file name or relative path? My program will accept one parameter, a file named passed on the commandline. I need to take the file name passed, and both get the file's full path and name, and in the process validate that the file actually exists.
eg. myprogram.exe somefile.mdb
Where somefile.mdb is a file in the same dir as the exe. I need the whole path of somefile.mdb. It can be not just in the same dir as the exe, it could be in any path specified,
eg. myprogram.exe ..\..\somefile.mdb
I searched through MSDN for a way to get the whole path, but did not find any way that actually worked. Anyone have any ideas?
|
|
|
|
|
It's not that clear what you're after exactly, but I think it's probably this:
Assuming that argv[argc - 1] points to the filename that you've got:
char strFullPath[MAX_PATH];
char *strFilename;
DWORD dwStatus = GetFullPathName(argv[argc - 1],
MAX_PATH,
strFullPath,
&strFilename);
cout << strFullPath << "\n";
Sorry to dissapoint you all with my lack of a witty or poignant signature.
|
|
|
|
|
- How to change the cursor shape when my cursor enters into the View client area.
(MDI based)
- Can you help? Can you show me an example?
- Regards,
Maer
|
|
|
|
|
See the VC forum FAQ (there's a link to it at the top of this page, too).
--Mike--
http://home.inreach.com/mdunn/
This posting is provided "as was" with no warranties, guarantees, lotteries, or any of those little bags of peanuts you get on planes. You assume all risk for crossing the street without holding mommy's hand. © 2001 Mike's Classy Software. Member FDIC. If rash develops, discontinue use.
your with and
|
|
|
|
|
- Thanks, Mike pal!
- Your reply clarifies my doubts.
- Regards,
Maer
|
|
|
|
|
the UUEncode email looks like
x-sender: seaboat@cmsland.com
x-receiver: cococut@cmsland.com
Received: from mail pickup service by webserver.landserver with Microsoft SMTPSVC;
Tue, 7 Aug 2001 09:16:15 +0800
From: "seaboat" <seaboat@cmsland.com>
To: <cococut@cmsland.com>
Cc:
Subject: good luck!
Date: Tue, 7 Aug 2001 09:16:13 +0800
X-Priority: 3
X-MSMail-Priority: Normal
Importance: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700
Message-ID: <webserver9xdcxobbcs00000001@webserver.landserver>
X-OriginalArrivalTime: 07 Aug 2001 01:16:15.0117 (UTC) FILETIME=[8DA6B3D0:01C11EDE]
hello ,baby!
begin 666 make.txt
zqrKssO0u+HKx9Xi0fnX07XEu7CjrMTRtcC+zcrH1eK49tH519O1xMLro7+/ycrHztK+zcrHsrvD97DXo6E=
end
but What the MIME *.eml looks like?
can you post me a MIME eml?
my email: cococut@mail.com
thans in advance!
|
|
|
|
|
A MIME email always has a header field that contains:
MIME-Version: 1.0 There are several other possible headers, and the structure of the message body depends on the headers. See RFC 2045 for the specification of MIME message structure.
|
|
|
|
|
I'm coding MFC application that supports external dll's. These additional dll's are depended from my main project. The problem arised when I'm trying to set breakpoint and run the debugging. VC determines invalid breakpoints in dll and runs from the beginning.
So, does anyone know how can I debug external dll's?
|
|
|
|
|
You have to set the dll as the active Project.. (if you have got more projects in your workspace..) (or open the Workspace of the dll)
if you debug the dll you can tell the compiler which exe should be run to test the dll -> Settings / Debug / Executable for Debug Session... the enviroment starts the exe and you can debug your dll.
hope this helps
Bernhard
""Politicians and diapers have one thing in common. They should both be changed regularly and for the same reason."
|
|
|
|
|
* You have to set the DLL - Project as the active Projekt (or open the Workspace of the DLL - Project)
* Then you just start debugging (F5) (the first time you do this, the compiler will ask you which executable should be started for debugging this dll, later you can change this in the project settings / debug / executable for debug session )
hope this helps
bernhard
""Politicians and diapers have one thing in common. They should both be changed regularly and for the same reason."
|
|
|
|
|
Hi all,
I am trying to update a record in an Access Database(I am new to DB programming and VC++), from everything I have read the following code should acheive the desired result but it gives a DB exception.
Have I missed a readonly flag or got something wrong in my database.open command???
Any pointers greatly appreciated,
Thanks in advance,
Tryhard
Code:-
CDatabase database;
CString sSql;
CString sDriver = "MICROSOFT ACCESS DRIVER (*.mdb)";
CString sDsn;
CString sFile = "d:\\Docs\\Wayne\\C\\Converse\\CDAT.mdb";
TRY
{
// Build the creation string for access without DSN
sSql.Format("ODBC;DRIVER={%s};DSN='';DBQ=%s",sDriver,sFile);
// Open the database
database.Open(NULL,false,false,sDsn);
// Allocate the recordset
CRecordset recset( &database );
// Update data
sSql = "UPDATE Convhist "
"SET GREETINGCOUNT = '1'"
"WHERE YOURFIRSTNAME = 'WAYNE'";
// Execute SQL Statement
database.ExecuteSQL(sSql);
// Close the database
database.Close();
}
CATCH(CDBException, e)
{
// If a database exception occured, show error msg
AfxMessageBox("Database error: "+e->m_strError);
}
END_CATCH;
}
Tryhard
|
|
|
|
|
Are you sure that your database could be opened? You are not checking the return value.
The rest of the code is fine, but there is no need for a CRecordset.
What does the error string say?
A vast majority of our imports comes from outside the country.
George W. Bush
|
|
|
|
|
I have VC++ Standard Edition and I am going to install it on Win XP how do I install it so that it supports creating unicode projects? Thanks.
-Matt Newman
-Matt Newman
|
|
|
|
|
Your choices are 1) Do a full install of MFC (the shared and static libraries for Unicode, as they're called) so the files are copied to your HD; or 2) do a default install and keep the VC CD in your drive. Setup will set the VC lib path to point at the LIB files on the CD.
In the end, though, you don't save space with #2, because when you apply a service pack, the LIBs can only go one place - your HD.
--Mike--
http://home.inreach.com/mdunn/
This posting is provided "as was" with no warranties, guarantees, lotteries, or any of those little bags of peanuts you get on planes. You assume all risk for crossing the street without holding mommy's hand. © 2001 Mike's Classy Software. Member FDIC. If rash develops, discontinue use.
your with and
|
|
|
|
|
How do I add unicode to a project (new or old) under new MFC AppWizard the only platform option is Win32. I am running XP on NTFS. I know I installed all the Unicode Libs.
-Matt Newman
-Matt Newman
|
|
|
|