|
I am developing a word processor using MFC in CRichEdit class. I want to insert tables in CRichEdit class but not getting any way as there is no class supporting table :-Ogiven by MFC.
|
|
|
|
|
You must derive a new class from CRichedit control.
and implementyour idea there..
_______________________________________AGREE ???________
CodeTheDreams();
|
|
|
|
|
When I compile my cpp file,the following error occurs.I don't know the reason.I do not use memcpy in my program.And I comment almost all the codes in the cpp file , but the error remains.Please help me,thank you very much!
d:\microsoft visual studio\vc98\mfc\include\afxtempl.h(373) : error C2668: 'memcpy' : ambiguous call to overloaded function
d:\microsoft visual studio\vc98\include\xlocmon(106) : while compiling
class-template member function 'void __thiscall CArray<int,int &="">::SetSize(in
t,int)'
dix
|
|
|
|
|
CArray obviously uses memcpy, seeing as it's in the mfc code that the error occurs. CArray is crap anyhow, read my series on vector and use that instead.
I have no idea why you have managed to include to different files that both include a memcpy function. Do you have any using namespace statements floating around ? They have a habit of including stuff you didn't consider, because that's what you are asking for when you do it.
Christian
NO MATTER HOW MUCH BIG IS THE WORD SIZE ,THE DATA MUCT BE TRANSPORTED INTO THE CPU. - Vinod Sharma
|
|
|
|
|
Thank you.
In one of my c++ header file, i use
#include <list>#include <string>
And in the cpp file , i use
#include <list>#include <string>
using namespace std;
Is that the reason?
dix
|
|
|
|
|
Probably, but as you didn't check 'display this message as is', I can't really say. What are the names of the includes ? using namespace std is pretty much always a bad idea, but to get this sort of problem it's also likely you've included a non standard header like iostream.h and then elsewhere included the standard one ( iostream in this case ).
Christian
NO MATTER HOW MUCH BIG IS THE WORD SIZE ,THE DATA MUCT BE TRANSPORTED INTO THE CPU. - Vinod Sharma
|
|
|
|
|
i think you use the function "SetSize" of the libary afxtempl.h the wrong way causes it to copy wrong memory...
maybe your value is negative, your error is somewhere while using CArray.
[]D [] []D []
|
|
|
|
|
I don't use CArray in the cpp file.I used it in some other class,and I include the header file.But there is no error when i compile that class.
dix
|
|
|
|
|
Its seems that the Object the CArray stores gaves the errors. Has it an sizeof-Operator?
The memcpy call you find as described "afxtempl.h" (373).
Or show little bit of code.
Try this @ home. (B&B)
|
|
|
|
|
Thank you for your reply.
The CArray is used in another class and I have used that class many times,no problem.
Could it be the problem of VC,or the settings of my project,
or "stdafx.h",or namespace?
I really need your help.
|
|
|
|
|
My experience is reading the error message carefully is 80% of resolving the problem.
Memcpy (ofCArray) has a problem with copying the data->
What is in your Array?
Try this @ home. (B&B)
|
|
|
|
|
I don't use the Array.It is used in some other class.I don't know what's in it.
But that class has been compiles , and no error.
|
|
|
|
|
Now read that you use different namespaces. Have a lot of fun.
Avoid this.
Try this @ home. (B&B)
|
|
|
|
|
Anybody Knows how to hide an application From Task Manager?
VikramS
|
|
|
|
|
you can register your app as services in win9x
I am seeking...
For what?
Why did you ask me for what? I don't know!
|
|
|
|
|
I have played a little bit with compiling my program and found out, that
unused functions are regardles if i am using them or not included in output. That is strange, i thought that everything that is not used in program is excluded from output. Anyone knows why and (if possible) how to fix that?
|
|
|
|
|
|
plz some one help me out,
the two methods that set up information abt a button on a toolbar (CToolBarCtrl) are not working properly.
1) GetButtonInfo
2) SetButtonInfo
i am using the following code and these functions are returning false always.
bool MYToolbar::Create(CRect rcClientParent, CWnd *pWndParent)
{
if (!CToolBarCtrl::Create(DEFAULT_TOOLBAR_STYLE , rcClientParent, pWndParent, IDR_IETOOLBAR))
return false;
SetExtendedStyle(TBSTYLE_EX_DRAWDDARROWS | TBSTYLE_EX_MIXEDBUTTONS);
BOOL res;
SendMessage(TB_SETEXTENDEDSTYLE, 0,TBSTYLE_EX_DRAWDDARROWS); // set style to draw arrows for drop down buttons
SendMessage(TB_SETEXTENDEDSTYLE, 0,TBSTYLE_EX_MIXEDBUTTONS);
CSize size;
size.cx=200;
size.cy= 20;
res = SetButtonSize(size);
if(!res)
{
MessageBox("no sizing of buttons");
}
if (AddBitmap(4, IDR_IETOOLBAR) == -1)
{
DWORD dwError = ::GetLastError();
return false;
}
TBBUTTON tbs[/*NUM_TOOLBAR_BUTTONS*/4];
for (int i = 0; i < /*NUM_TOOLBAR_BUTTONS*/4; i++)
{
tbs[i].dwData = 0;
tbs[i].fsState = TBSTATE_ENABLED;
tbs[i].fsStyle = TBSTYLE_BUTTON;
tbs[i].iBitmap = i;//i;
tbs[i].idCommand = ID_BTN_MSGTYPE + i;
tbs[i].iString = i;
}
tbs[0].fsStyle = TBSTYLE_AUTOSIZE|BTNS_WHOLEDROPDOWN|TBSTYLE_BUTTON|TBSTATE_ENABLED;
tbs[1].fsStyle = TBSTYLE_AUTOSIZE|TBSTYLE_DROPDOWN|TBSTYLE_BUTTON|TBSTATE_ENABLED;
if (!AddButtons(4, tbs))
return false;
LPTBBUTTONINFO tbi= new TBBUTTONINFO;
int res=GetButtonInfo(0,tbi);
tbi->cbSize = sizeof(TBBUTTONINFO);
tbi->dwMask = TBIF_SIZE;
tbi->cx = 20;
res=mytb.SetButtonInfo(0,tbi);
return true;
}
ur help will make my day.
Farrukh
|
|
|
|
|
Farrukh4u wrote:
nt res=GetButtonInfo(0,tbi);
The 0 should be your Button ID number, or a ID_MYBUTTONSOMETHING .
Are you sure that 0 is the correct ID of your button ?
Farrukh4u wrote:
tbi->dwMask = TBIF_SIZE
Instead of this, try :
tbi->dwMask |= TBIF_SIZE
because maybe you're missing some flags (by doing this, you just add the TBIF_SIZE flag to the ones retrievd by calling GetButtonInfo .
~RaGE();
|
|
|
|
|
I want to create a interface like EXCEL.
But I donnot know How to create : | | 1 | 2 | 3 | 4
| a |
| b | <---This row?
| c |
Sorry For My Poor English
Thank YOU
|
|
|
|
|
|
Hello!
I have a COM (ATL) object IDataProvider which used to provide data to some services. This object can be used from other processes.
Also I have a C++ object which contains data and I need to attach this object to IDataProvider object somehow.
eg:
class CDataContainer
{
...
};
class ATL_NO_VTABLE CDataProvider :
public CComObjectRootEx<ccommultithreadmodel>,
public CComCoClass<ctestdataprovider, &clsid_dataprovider="">,
public IDataProvider
{
...
}
I need something like this:
void CDataContainer::DoDataExchange(pDX)
{
CComPtr<idataprovider> pDataProvider;
pDataProvider.CoCreateInstance(CLSID_DataProvider);
pDataProvider->SetDataContainer(this);
// pDX object can be located in another process
pDX->DoDataExchange(pDataProvider);
}
========================================================
IDataProvider object can be created only from DLL which contains CDataContainer code. Can I use it like this:
class CDataContainer
{
...
};
class CDataProvider : public IDataProvider
{
...
}
void CDataContainer::DoDataExchange(pDX)
{
CDataProvider* pDataProvider = new CDataProvider(this);
// pDX object can be located in another process
pDX->DoDataExchange(pDataProvider);
}
With regards,
Pavel Krupets
|
|
|
|
|
How can I make an application to fetch emails from the
web based mail servers(hotmail,yahoo or aol account) ?
Atleast any one has some clues?
Some application like AOL2POP and izymail etc. already
doing such things.
Thanks in advance.
|
|
|
|
|
hotmail u can get stuff from
check out webwasher (examine the exe and you'll find the url to use)
Bryce
|
|
|
|
|
i couldn't find any way...
and i wanted to have some standard way to get access to all these web based server.
|
|
|
|