|
check GetNativeSystemInfo()
nave
|
|
|
|
|
|
Akin Ocal wrote: There are inodes in unix fs , what matches inodes in NTFS , and which system calls should i use to get
inode number of a file/folder ?
Given that an inode stores, among other things, information such as user and group ownership, look at GetFileSecurity() and GetNamedSecurityInfo() . An inode also stores a file's attributes, so check out GetFileAttributes() .
"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
|
|
|
|
|
|
S.V.RAJKUMAR wrote: I need to call that method or function by multithreadingly?
Why?
S.V.RAJKUMAR wrote: In VB, What is the Method to call this function multitaskingly?
VB6 doesn't allow multithreading.
VB.NET allows it.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
What the meaning of "multithreadingly"?
|
|
|
|
|
S.V.RAJKUMAR wrote: In VB, What is the Method to call this function
"How do I call a function from within VB code?" is a VB question. In any case, you'll need something like:
Private Declare Function Add Lib "mydll" (ByVal x as Integer, ByVal y As Integer) As Integer
"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
|
|
|
|
|
|
S.V.RAJKUMAR wrote: How to Invoke Multithreading in VB.
I guess you would create additional threads via CreateThread() .
"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
|
|
|
|
|
Hi all:
In C: when a program terminates correctly, we write
return EXIT_SUCCESS; otherwise
return EXIT_FAILURE;
How about C++, I know in C++ EXIT_SUCCESS and EXIT_FAILURE are not defined. Is there any programming convention I should follow apart from writing plain:
return 0; or
return 1;
Thank you
|
|
|
|
|
C_Zealot wrote: EXIT_SUCCESS
Never seen that before...
I would just return 1 or 0, but you can #define them any way you like.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
|
|
What a program returns (to the calling process) is independent of the language used.
"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
|
|
|
|
|
i have two comboboxes.one is fro user and other is for administrator.what i want is when ever administrator adding a user it will come in to user combobox.for each user ther is a corresponding password also..pls help.
|
|
|
|
|
bigphish wrote: Re: how to add dynamically in a combo box?
CComboBox::AddString()
or
CComboBox::InsertString()
nave
|
|
|
|
|
You can use of CB_ADDSTRING or CB_INSERTSTRING and for MFC m_Combo.AddString("Hello"); or InsertString(-1 for insert string to end of list,"Hello");
|
|
|
|
|
Hi all:
I am writing a program which accepts two command in parameters, "the program name" and "the file it accesses".
My codes are:
#include <iostream>
#include <fstream>
using namespace std;
int main (int argc, char* argv[])
{
ifstream in(argv[1], ios_base::binary);
if (argc != 2) {
cerr <<"Usage: conc file" <
|
|
|
|
|
C_Zealot wrote: It compiles with no errors, but it will crash if argc = 1, e.g. there is no file name given.
Why?
because in that case argv[1] will try to access invalid memory and may cause access violation.
You should put the if (argc != 2) checking above the ifstream in(argv[1], ios_base::binary);
nave
|
|
|
|
|
Thank you very much, nave.
I understand it now.
Thank you again.
|
|
|
|
|
:->I have created a class CSkinDesignerDlg derived from CDialog.As its default background color is too normal,I want to change its color.After having searched on the web,I find a way to change its color.Draw its back color in function "OnPaint()",just like below:
void CSkinDesignerDlg::OnPaint()
{
................
CPaintDC dc(this);
CRect rect;
GetClientRect(rect);
dc.FillSolidRect(rect, RGB(0,0,255));
.................
}
As I will always need to show or hide this Dialog form in my program,there will be a shimmer in my program.Is there anybody know some better way to change the background color.
|
|
|
|
|
I made it in this way :
in OnCtlColor( CDC pDC ...)
you replace the core with :
if((nCtlColor == CTLCOLOR_STATIC) || (nCtlColor == CTLCOLOR_DLG) ) {
pDC->SetBkColor(RGB(255,255,255));
return (HBRUSH) MyBrush;
}
( HBRUSH hbr = ... rests )
where MyBrush is of Type CBrush and will be initialized via MyBrush.CreateSolidBrush(RGB(255,255,255));
I hope it helps
|
|
|
|
|
I know "OnCtlColor()" is used to set child control's color.And I have also tried to use it. But it seem doesn't work, still have glimmer.
Now I will have a more detail introduction of my software. It has a main form.In the main form,there are a lot of child forms. There's a tab control in the main form which I could used to choose which child form to display. As I have changed the main form and child form's background color(main form and child form have different color), there will always be a glimmer when I change the child form to display.
Is there anybody can help me solve this problem.
Thanks to all the helper.
|
|
|
|
|
Peter, Chan wrote: it seem doesn't work,
Why it doesnt work how do you use it?
|
|
|
|
|
Sorry, I said wrong. It works, but still glimmer.
I have tried "CWnd::OnEraseBkgnd(...)". And only paint the area that I need to redraw. Now it shows well, do not have any glimmer.
|
|
|
|