|
MessageBox(inet_ntoa(addr.sin_addr));
|
|
|
|
|
I've got a modeless dialog where, I've got a static text field, progress bar, and and edit box.
Ranging through a CStringArray, I'm updating the static text and progress bar OK, but I can't seem to get the CEdit to update properly.
The Edit box is just supposed to display which files have been processed, and some relevent info. 1 per line.
I've tried dlgModeless->m_cEditBox.SetWindowText(sStatusOut) , but no go.
Thanks for help.
BW
{insert witty/thought-provoking saying here}
|
|
|
|
|
How did you declare m_cEditBox? Is it a control or a CString variable? For a CString variable, remember to call UpdateData(FALSE).
Kuphryn
|
|
|
|
|
I've declared it both as CEdit and CString. Now it is back to CString. I'm updating this CString(m_sStatusEdit) in the calling function, and then calling UpdateData(false).
Nothing.
The window is up, and two other controls are being properly updated.
Actually I'm not even seeing the edit box. (visible setting is checked, though)
thanks for your help
BW
{insert witty/thought-provoking saying here}
|
|
|
|
|
How did you add the edit box? If it Windows does not draw it, then there is definitely a problem that is bigger than the update problem original posted.
Kuphryn
|
|
|
|
|
Well I tried not destoying the dialog, and my edit box does become visible with everything as it should be, once the process is over. (i do updateData() after each pass.
I appreciate your time/help
BW
{insert witty/thought-provoking saying here}
|
|
|
|
|
I got it working!
thanks
BW
{insert witty/thought-provoking saying here}
|
|
|
|
|
Does it give any trick to include some little resource objects (like bitmaps) in the header file of a class?
I want to write a subclassed dialog with some buttons, but I don't want to add the button bitmaps (icons) to the resource file! I want to add this bitmaps in the header or cpp file, so that I can use the class very easy!
--
Nice greets, Daniel.
|
|
|
|
|
Funny I was thinking the same thing just the other day...
The way I see it, yes it has advantages...you don't have to include resource files with your project, just one CPP and one H file is all that are required...
I think if anything it'd be a bit (no pun intended) faster than using traditional resource bitmaps. You can avoid the call to LoadBitamp() or LoadImage()
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
|
|
|
|
|
You can but the size of bitmap you can include is limited.
Todd Smith
|
|
|
|
|
Any one knows how to convert a binary array to a decimal array in C++? Thanks.
mIchAel Liu
__________________________________________________________
The secret of business is to know something that nobody else knows.
|
|
|
|
|
what's a "binary array" ?
-c
All you have to do is tell the people they are being attacked, and denounce the opposition for lack of patriotism and exposing the country to danger.
-- Herman Goering, on how to control the public
|
|
|
|
|
... and what's a "decimal array" ?
The opinions expressed in this communication do not necessarily represent those of the author (especially if you find them impolite, discourteous or inflammatory).
|
|
|
|
|
1111 0000 1111 1000 = F0F0
is "111100001111000" a string?
Developing with C++ is like programming by the seat of your pants
|
|
|
|
|
Actually, I have a big integer value, larger than 80 bits which I can't use DOUBLE to hold this value and print it out. Now I have a array to hold this value by binary integers(0,1), then I need to convert it to another array which hold decimal integers(0 to 9) to present this large value. Because I can't use power of 2 ( if I have 256 bits, then I can't hold the it), I have touble to convert it.
mIchAel Liu
__________________________________________________________
The secret of business is to know something that nobody else knows.
|
|
|
|
|
CString * pArray;
int iArraySize = 4;
for (int i =0; i< iArraySize; i++)
{
pArray[i] = "abc";
}
It chokes at the line where I assign it "abc" . Previously I had assigned it 2*i, so I thought that since i is int and p String, thats causing the crash. But the above is not happy.
Whats wrong?
Appreciate your help,
ns
|
|
|
|
|
Why don't you assign the array like that:
const int iArraySize = 4;
CString Array[iArraySize];
for (int i=0; i < iArraySize; i++)
{
Array[i] = "abc";
}
<pre>
modified 12-Sep-18 21:01pm.
|
|
|
|
|
Fine. Thanks for that!
How will I pass this array into a function?
myFunc( CString * pArray)
called as
myFunc(pArray)
? ????
Appreciate your help,
ns
|
|
|
|
|
eh... If I get you right you could call it as myFunc(&pArray), I think
|
|
|
|
|
try this:
void Arr(CString pArray[], int intArrCount)
{
for(int i=0; i<intArrCount; i++)
pArray[i] = "abc";
}
you simply pass the array like that:
CString array[4];
Arr(array, 4);
modified 12-Sep-18 21:01pm.
|
|
|
|
|
Exactly the info I needed. Many many thanks!
Appreciate your help,
ns
|
|
|
|
|
I hope you are not writing software I will install for any reason on my computer in the future.
I am not bashing you, I am just figuring out you don't know what a pointer is. And it worries me.
sometimes it helps to look at the IL generated code
a MS guy on develop.com "answering" .NET issues
|
|
|
|
|
Well,
I am just trying to pattern it after a char array which we pass in by name as
myFunc(myArray)
where its
myFunc(char * myArray)
(Am I wrong about this too? )
Appreciate your help,
ns
|
|
|
|
|
ns wrote:
I am just trying to pattern it after a char array
Actually, you're better off using the MFC collection class CStringArray which seems ideally suited for your purpose, since you don't have to worry about freeing up storage, knowing its length, etc. Here's what I mean:
CStringArray arrayOfStrings;
for (long nIndex=0; (nIndex < 4); nIndex++) {
arrayOfStrings.Add ("abc");
}
myFunction (arrayOfStrings);
...
void myFunction
(CStringArray& stringArray)
{
}
/ravi
Let's put "civil" back in "civilization"
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
Then why don't you help the guy find out what a pointer is, instead of just telling him that he can't program?
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|