Hi,
I want to place a mutli-line CString on a CEdit, but the line break "\n" does not break line. "\n" displayed as a symbol like "[]". Please help me out here. The following is the code:
Ctring test="";
for (int i=0; i<20; i++)
{ CString line="New...
Thank you.
I found the problem. It turns out that I have to set the Dialog style as "visible" while setting dialog properties for the modeless dialog.
Thanks anyway.
Hi, there,
I am having a problem with creating a modeless CDialog.
The CDialog code is:
class ADialog : public CDialog
{
// Construction
public:
ADialog(SomeData* data, CWnd* pParent = NULL): CDialog(IDD_ADIALOG, pParent){
Data=data;
}
BOOL Create(CWnd* pParent=NULL){
return...
Thanks, programsecrets.
I think the statement is OK since float is a basic type, not a class.
float* a; (sorry, I missed ';')
a = new float[5];
In fact, there are a large number of similar functions in the same class, and most of them do not cause the warning masssages.
Cheers.
Hi,
I have a function as follow:
void ClassA::FunctionA()
{
float* a
a = new float[5];
}
The Visual C++ compiler keeps giving the following warning massages:
warning C4305: 'initializing' : truncation from 'int' to 'short'
warning C4309: 'initializing' : truncation of constant value...
Thank you, BobbyB.
Your suggestion works when I ony use the array with fixed index range.
However, I need to use the arrays with different index ranges as the function parameter.
Can you think of any other answer to this situation.
Cheers.
Thank you very much, Jeffray.
I tried your suggestion
(1)for 'call it as AFunction(&p1)'
The compiler tell me
cannot convert parameter 1 from 'float (*)[4][4]' to 'float ** '
(2)for 'change the definition of AFunction as:
AFunction(float *)'
I have to use expression such as p[3][3] in the...
Hi,
I have a c++ programme as follow:
void AFunction(float** p){ .....};
float p1[4][4]={{1.0f,0.7407f,0.2593f,0.0f},
{0.0f, 0.2593f, 0.7407f, 1.0f},
{0.0f, 0.1481f, 0.0741f, 0.0f},
{0.0f,-0.0741f,-0.1481f,0.0f}};
AFunction(p1);
When I compile, I was told:
cannot...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.