|
Belive me its a pain to convert win32 application to MFC application its not as easy as including few header files and thats it.
Besides ur current win32 logic may stop functioning or give unexected error coz both are off different architecture. and besides there nothing much that MFC can do that win32 can't.
MSN Messenger.
prakashnadar@msn.com
|
|
|
|
|
Well I have solved this issue
1.First of include all headers files present in a MFC project stdafx.h
2.Go to Project --Settings ---General and select either MFC in shared library or MFC in static Library Option
3.In static library option it will give the already defined linking error to solve this issue follow this link and do the apropriate steps as given in this link
http://www.as-ltd.co.uk/cgi-bin/support/faq/XLPFAQ004.htm
after it include stdafx.h where u want to use MFC.
Unmanaged in a .NET world
|
|
|
|
|
Too good man too good.
MSN Messenger.
prakashnadar@msn.com
|
|
|
|
|
#include <windows.h> or #include <afxwin.h>
After that, the MFC classes should be available to your application.
|
|
|
|
|
Sorry... that is #include <windows.h> or #include <afxwin.h>
|
|
|
|
|
So.. i have made a program with a tray icon in the system-tray. And my problem is, that when explorer is hung and you restart explorer it dosent reload the tray icon..
Does anyone know how i can make the tray icon to reload??
Thanks in advance
Zagzagzag
|
|
|
|
|
From the MSDN
const UINT WM_TASKBARCREATED =
::RegisterWindowMessage(_T("TaskbarCreated"));
BEGIN_MESSAGE_MAP(CMainFrame, CFrameWnd)
ON_REGISTERED_MESSAGE(WM_TASKBARCREATED,
OnTaskBarCreated)
END_MESSAGE_MAP(CMainFrame, CFrameWnd)
LRESULT CMainFrame::OnTaskBarCreated(WPARAM wp, LPARAM lp)
{
VERIFY(InstallIcons());
return 0;
}
BOOL CMainFrame::InstallIcons()
{
NOTIFYICONDATA nid;
return Shell_NotifyIcon(NIM_ADD, &nid);
}
Hope you get the idea
MSN Messenger.
prakashnadar@msn.com
|
|
|
|
|
ok.. erhm.. i will try to work it out..
and thank you for your help
just one thing though.. is it supposed to be placed in the Headerfile or the main program's cpp file??
|
|
|
|
|
Yeah it goes in the .cpp file.
MSN Messenger.
prakashnadar@msn.com
|
|
|
|
|
Does anyone know how to plot a graph using Visual C, given a set of x & y coordinates? ANy command line or examples? Thanks
Yours truly,
EInly
Einly
|
|
|
|
|
Check LineTo and MoveTo api's
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
|
If you want a fancy control, look at the Miscellaneous controls section on this site -
theres a whoooole bunch of graph / chart controls.
If you just want to "join the dots", look up Polyline in the MSDN docs.
Iain.
|
|
|
|
|
Hi
I am looking for simple source code that allows me to get E-mail from an ISP onto a PC and strip it and re-build it ( I need to find certain text in the message body and copy it into the subject line.) The program then needs to act as a server and allow another program to use POP3 to retrieve the mail, any ideas?
Cheers
Eugene
|
|
|
|
|
Instead of looking to others for a solution to your problem, try reading RFC 1939. I'm sure it'll answer most of your questions related to the POP3 protocol. Implementing POP3 into a program is a trivial task and I'm sure you'll agree once you know how it works.
http://www.faqs.org/rfcs/rfc1939.html
John
|
|
|
|
|
Try doing a search on, um, codeproject with a phrase of pop3[^], and you get loads of
hits. If you have a specific problem, an author of an article you used, or this
forum may be to help.
Iain.
|
|
|
|
|
Hi
Is there any way to copy the file object to clipboard?
I want to implement Cut, Copy and Paste for files like explorer does.
Regards
Neha
|
|
|
|
|
|
.
modified 1-Dec-11 1:28am.
|
|
|
|
|
Use CreateToolBarEx(...)
for further reading refer MSDN it has a good example how to add buttons, resize, etc.
MSN Messenger.
prakashnadar@msn.com
|
|
|
|
|
thanks alot. I just needed this jump start .
|
|
|
|
|
Hi,
I have developed a small program to read the content from excel sheet in VC++. The developed program is working in Excel 2002 version, but it is not working in Excel 2000. I found that Excel 2002 having "_Application" class, but it is not in Excel 2000. In this project First I have included the "Excel.Exe" Type library. Then I changed the type library with "XL5EN32.OLB". Because this ".OLB" file is exist in both versions. Then I changed my code accordingly with the classes available in the OLB file. The classes I have included are "Application","WorkSheet","WorkSheets","WorkBook",WorkBooks","Range". While compilation time this project is ok. But it is giving the "Runtime" Error. Below I have mentioned the code I got the runtime error.
-----------------------
AfxOleInit(); //Initialization
Application app;
Workbook book;
Worksheet sheet;
Workbooks books;
Worksheets sheets;
Range range;
LPDISPATCH lpDisp;
COleVariant
covTrue((short)true),
covFalse((short)false),
covOptional((long)DISP_E_PARAMNOTFOUND, VT_ERROR);
if(!app.CreateDispatch("Excel.Application"))
{
AfxMessageBox("Unable to Create Excel Application");
return;
}
VARIANT var;
var=app.Workbooks(OleVariant("*.XLS")); //I got the RunTime error Here.
lpDisp = var.pdispVal;
books.AttachDispatch(lpDisp);
--------------------------------------------
var=app.Workbooks(OleVariant("*.XLS));
The above line is giving the problem. If anybody knows the solution to this problem, please reply me. Thank you very much.
Ramanan.
RamananS
|
|
|
|
|
At the risk of asking a stupid question, what do you expect that line to do?
I'm assuming that you have a simple typo, and it should be COleVariant("*.XLS"), but that nicety aside, I think you need to understand what the method you're calling actually does.
app.Workbooks( VARIANT ) will return a Workbook object (strictly, a Workbook interface), and the value of the variant can be a numeric index into the collection, between zero and Workbooks.Count-1. It's a shorthand for app.Workbooks.Item(VARIANT). The value of the variant can also be a document name, such as "C:\Documents And Settings\Steve S\My Documents\vacation.xls".
There isn't, unless they've updated the model significantly since I last checked, anything that supports it being a wildcard.
I know all the automation stuff for Excel, Word etc has samples in VB, but I suggest you read the appropriate docs. It's not that hard to figure out. You might also search the MS site for a download called something like B2CSE. This is a simple VB automation to C++ automation conversion tool, and while it's not perfect, is really helpful in circumstances like this.
Steve S
|
|
|
|
|
how can we generate html dynamically through vc++ or c++?
|
|
|
|
|
Simply write out the html tags, a technique followed by many application.
MSN Messenger.
prakashnadar@msn.com
|
|
|
|