|
Thank you for your answer Papa. But it has some problem while compiling. I write this below program.
------------------------------------------------------------------------
typedef CArray<unsigned char,="" unsigned="" char&=""> CCharArray;
CArray<cchararray,cchararray&> m_Array;
CArray<unsigned char,="" unsigned="" char&=""> NewElement;
unsigned char a='a';
unsigned char b='b';
NewElement.Add(a);
NewElement.Add(b);
m_Array.Add(NewElement);
------------------------------------------------------------------------
While compiling there are this error message happen at this line
m_Array.Add(NewElement);
c:\program files\microsoft visual studio\vc98\mfc\include\afxtempl.h(443) : error C2582: 'CArray<unsigned char,unsigned="" char="" &="">' : 'operator =' function is unavailable
c:\program files\microsoft visual studio\vc98\mfc\include\afxtempl.h(1566) : while compiling class-template member function 'void __thiscall CArray<class carray<unsigned="" char,unsigned="" char="" &="">,class CArray<unsigned char,unsigned="" char="" &=""> &>::SetAtGrow(int,class CArray<unsigned char,unsigned="" char="" &=""> &)'
Error executing cl.exe.
BallotExtractandPrint.exe - 1 error(s), 7 warning(s)
Do you know how to solve my problem?
|
|
|
|
|
try:
CCharArray NewElement;
CArray <CCharArray,CCharArray> m_Array;
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
I strongly suggest you use a std::vector of std::vector
Best regards,
Alexandru Savescu
|
|
|
|
|
I would like to using the SetCooperativeLevel function in window mode
Example Fullscreen mode => DDSCL_EXCLUSIVE|DDSCL_FULLSCREEN
result => I can use the CreateSurface function(return of CreateSurface function DD_OK).
Example Window mode => DDSCL_NORMAL
result => I can't use the CreateSurface function(return of CreateSurface function DDERR_NOEXCLUSIVEMODE).
What I do?
Example Window mode => (what parameters?)
|
|
|
|
|
U must add DDSCL_EXCLUSIVE when DDERR_NOEXCLUSIVEMODE is returned, so i guess
DDSCL_NORMAL | DDSCL_EXCLUSIVE
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
DSCL_NORMAL
This flag cannot be used with the DDSCL_ALLOWMODEX, DDSCL_EXCLUSIVE, or DDSCL_FULLSCREEN flags.
|
|
|
|
|
In Window mode, you don't call SetCooperativeLevel at all.
sometimes it helps to look at the IL generated code
a MS guy on develop.com "answering" .NET issues
|
|
|
|
|
What I can do when I would like to create the DirectX in window mode, Have you an example?
|
|
|
|
|
Papa, no need to dump MSDN here . I expect someone willing to do DirectX stuff to download the DirectX SDK (or platform SDK), where there are plenty of windowed samples.
sometimes it helps to look at the IL generated code
a MS guy on develop.com "answering" .NET issues
|
|
|
|
|
Guess u have a point here
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
HI..
Just a quick question:
If I used visual C++ wizard to build a project n workspace for example TESTING...
How do i go about changing the name TESTING to another name like TESTING2...
'cuz it seems like i can't simply change the filenames of the visual C++
like this..
Testing.dsw -> testing2.dsw
Testing.cpp -> testing2.cpp
etc..
Thanks in advance.
|
|
|
|
|
The problem is that when you rename Testing.dsw, and the other files, the settings in testings.dsw do not change. You will have to rename the files then add them back to the workspace and remove the original names. Hope that answered your question.
Darroll
Not one person lives in the present. Only the past. I can prove it.
|
|
|
|
|
Editing the DSW and DSP file and replacing the occurence of testing with testing2, then renaming testing.cpp to testing2.cpp is enough
but i guess there's a tool on CP that just does that, search a bit!
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
http://www.codeproject.com/tools/vsrename.asp
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
Hi all.
Does visual c++ support tooltips (does it provide built in support)? I am sure that it doesn't but maybe i have missed something?
I was told by someone that it does and that it is very easy to do. But I have a feeling that they are talking about visual basic.
Also, does .net have built in tooltip support?
In all the time I have been using VC++ 6 I have never noticed the support in MFC apps.
|
|
|
|
|
From VC6 IDE
Project->Add To Project->Components and Controls->Visual C++ Components->ToolTip Support
is one way to do it.
Michael
"Time and tide melts the snowman."
-- The Doctor (Doctor Who: Time and the Rani
|
|
|
|
|
Thanks, I will give it a go.
|
|
|
|
|
How can I get a pointer to my document (CDocument) of my MFC application in a dialog? The GetDocument() function doesn't compile!
--
Nice greets, Daniel.
|
|
|
|
|
What kind of application do u have, dialog based, or Document/View or what??
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
A Document/View MFC application! And I want work with my document data in a dialog that I am opening!
The GetDocument() function (using in CView) doesn't compile!
--
Nice greets, Daniel.
|
|
|
|
|
What are the erros??
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
It can not compile because GetDocument() is no member of CDialog and so it is not possible to call GetDocument() in a dialog!
--
Nice greets, Daniel.
|
|
|
|
|
I have fixed the problem:
...
#include "TestDoc.h"
#include "MainFrm.h"
...
CTestDoc* pDoc = (CTestDoc*)((CMainFrame*) AfxGetMainWnd())->GetActiveDocument();
--
Nice greets, Daniel.
|
|
|
|
|
Let your dialog have a constructor that takes a CDocument* (or better still CYourDocument*), and supply the info to your dialog class at construction time (in the view)
|
|
|
|
|
Thanks! Very good idea!
--
Nice greets, Daniel.
|
|
|
|