|
How to draw a table on a dialog in VC++ ??? I'm a newbie.....
Thnk u
|
|
|
|
|
gReaen wrote: How to draw a table...
That depends on what you mean by "table." There is a multicolumn list control, and a grid control that can be placed on a dialog, but not a table.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
|
you can add flexgrid from project>addtoproject>components and controls>registered Active X components
Suggestion to the members:
prefix your main thread subject with [SOLVED] if it is solved.
chandu.
|
|
|
|
|
how can i use constant member varible in simple class?
I want ot use it as private.
Thanks...
|
|
|
|
|
ashishbhatt wrote: how can i use constant member varible in simple class?
class ConstantTest
{
ConstantTest() : m_SomeConstant( 10 )
{}
private:
const int m_SomeConstant;
enum { AnotherConstant = 20 };
};
Nibu thomas
MVP For VC++
Code must be written to be read, not by the compiler, but by another human being.
Programming Blog: http:\\nibuthomas.wordpress.com
|
|
|
|
|
Thank u v much Nibu.
|
|
|
|
|
for example :
class Tata
{
private:
const int m_ConstMember;
public:
Tata();
};
Tata::Tata() : m_ConstMember( 42 )
{
}
|
|
|
|
|
Hi Experts,
In my program there are two view , one is ListView another is HtmlView.
Wihtout clicking on HtmlView I can select the ListView content by keyborad key. But when I click on HtmlView, focus lost from ListView and do not come in the ListView even after clicking on ListView.It(focus) remains in the HtmlView .
|
|
|
|
|
I have mounted a drive to a directory(i.e. created a junction point) using mountvol.exe as well as through diskmgmt.msc. Now I would like to mount a remote drive to a directory, but unable to do that. Do anyone has some idea.
Smile.
|
|
|
|
|
Hi!!
I'm working on a C++ source code, in Visual C++ (i didn't build it) and a have to compile it to a DLL from that code. The problem is that the C++ code has a mex function (with MxArray) and it needs to be connected with Matlab to run it. I can't use the Matlab compiler toolbox, I have to use something like the Matlab Project Wizard ( but i was told it's not supported anymore...).
Any suggestions??
Thanks!!
Gui
|
|
|
|
|
It seems to me, the whole mex-approach is discontinued by MathWorks.
Here, we use the Matlab-compiler to build DLLs containing the Matlab code.
These Matlab dlls in turn rely on a matlab-runtime and a so called ctf-File containing the (encrypted) matlab code to be executed.
The DLL conatains bindings to call the Matlab-code from C++ and to wrap c++ datastructures for Matlab (mwArray).
There is no problem to call this Matlab-Dll from a self-written DLL.
Hope this helps at least a little.
Though I speak with the tongues of men and of angels, and have not money, I am become as a sounding brass, or a tinkling cymbal. George Orwell, "Keep the Aspidistra Flying", Opening words
|
|
|
|
|
The problem is that i don't have matlab-compiler...
|
|
|
|
|
Hi all,
I've create a char type buffer as follows.
char tempBuffer[256] ;
Then I use some text to a file using that buffer as follows.
openFile.Write(readString, sizeof(tempBufferWrite)) ;
Now my question is this. Say I'm write something to the file which is the length is less than 256 characters. File contains the text I wrote to it and after that filled up with annoying characters until reach to 256 total characters. I want to avoid such annoying characters.
So, is there any way to initialize the buffer with empty characters, or the size define the length of the string(text I have write to the file)
Thanks
Eranga
I appreciate your help all the time...
|
|
|
|
|
char tempBuffer[256] = <code>{0}</code>;
|
|
|
|
|
Yep I have try it, but no luck. Initially I thought that letter '0' initialize in all 256 memory locations. And also I've tried this.
char tempBufferWrite[256] = {} ;
Even though print some annoying text.
For more explanation see this code,
<br />
void CSRFToolDlg::OnBnClickedWrite()<br />
{<br />
char tempBufferWrite[256] = {0} ;
openFile.Write("text of letters", sizeof(tempBufferWrite)) ;<br />
openFile.Flush() ;<br />
}<br />
Eranga
I appreciate your help all the time...
|
|
|
|
|
try strlen (tempBufferWrite) inside your write function.
Suggestion to the members:
prefix your main thread subject with [SOLVED] if it is solved.
chandu.
|
|
|
|
|
You mean set the buffer size to length of the string(text)?
Eranga
I appreciate your help all the time...
|
|
|
|
|
mmm,
you are writing "text of letters" (16 chars including '\0'), but you have actually 256 bytes in the buffer and is not a pointer so the size is fix to you init value. That means the rest is going to be written with waste values.
Try:
void CSRFToolDlg::OnBnClickedWrite()
{
char* tempBufferWrite = NULL;
tempBufferWrite = new char[256];
tempBufferWrite = "text of letters";
openFile.Write(tempBufferWrite , sizeof(tempBufferWrite)) ;
openFile.Flush() ;
}
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
|
|
|
|
|
Seems it works. Thanks.
Now I'm going to slightly change it with dynamic text, like text from control box. I come back here if I got any issue there.
Eranga
I appreciate your help all the time...
|
|
|
|
|
Nelek wrote: tempBufferWrite = new char[256];tempBufferWrite = "text of letters"; //or something longer, it should be the same
This is for what?
- NS -
|
|
|
|
|
mmm, I just made some changes but leaving his point of view.
Anyways, if it is not correct, or it is useless... instead of just ask "this is for what?" would be better to say, "this is not right, you should use...", so I would learn as the same time I try to help
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
|
|
|
|
|
Eranga Thennakoon wrote: void CSRFToolDlg::OnBnClickedWrite()
{
char tempBufferWrite[256] = {0} ; // or {}
openFile.Write("text of letters", sizeof(tempBufferWrite)) ;
openFile.Flush() ;
}
instead of
sizeof(tempBufferWrite)
there you put strlen(tempBufferWrite)
thats it.
Suggestion to the members:
prefix your main thread subject with [SOLVED] if it is solved.
chandu.
|
|
|
|
|
chandu004 wrote: there you put strlen(tempBufferWrite)
That would equate to 0 , which is obviously wrong. The second argument to Write() should be the number of bytes in the first argument.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
the length of hte string should obviously be the number of bytes in that string right??!
Suggestion to the members:
prefix your main thread subject with [SOLVED] if it is solved.
chandu.
|
|
|
|