|
I'm trying to access function in a class which is defined in another class. I've tried to declare it as a friend, however this won't work for me.
Suggestions much appreciated
Kind Regards
Caoimh
|
|
|
|
|
First either make the methods in the other class as public, or declare ClassB(from the class you are trying to access) as friend in ClassA(whose methods you are trying to access)
other way friendship does not work, its not mutual.
MSN Messenger.
prakashnadar@msn.com
|
|
|
|
|
Could you post some example code? Too vague a question to really know what's going on.
Remember, even if you win the rat race, you're still a rat.
|
|
|
|
|
How do I monitor traffic on an already open TCP/IP port? Do I need to use hooks?
|
|
|
|
|
Do either of these tools help:
http://www.sysinternals.com/ntw2k/source/tcpview.shtml
http://www.sysinternals.com/ntw2k/freeware/tdimon.shtml
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
what steps i will have to do before i could use MFC in a win32 non mfc project.
Unmanaged in a .NET world
|
|
|
|
|
Why?????
Isn't much simpler to use Win32 source files in MFC project?
Robert-Antonio
"A flower walked around a meadow. She saw a beatiful human and plucked off his head."
|
|
|
|
|
Well i know it can be that way aswell , but i am more intrested in this cauz i have quite a few win32 projects (not written by me) and i want to extend them with MFC .
So still my question is same
Unmanaged in a .NET world
|
|
|
|
|
Don't you just include the appropriate MFC header files (see StdAfx.h of standard MFC project)?
|
|
|
|
|
If I Include all MFC Headers file it gives in linking error
"void * __cdecl operator new(unsigned int)" (??2@YAPAXI@Z) already defined in LIBCMT.lib(new.obj)
when compiming in MFC Statis Library mode
Unmanaged in a .NET world
|
|
|
|
|
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.
|
|
|
|
|
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
|
|
|
|