|
check out the controls section on cp
it has a few things on tabs that should help
situations to avoid #37: "good morning ... how many sugars do you take in your coffee ... and what was your name again?"
coming soon: situations to avoid #38: "...and the dog was there too?"
|
|
|
|
|
> situations to avoid #37
LOL! *g*
is there a list of more?
|
|
|
|
|
The font of a CEdit box can be changed with SetFont(..), but that function doesn't change the Background color of the text.
How on earth can I change it, I'm getting pretty desperate, as it appears there is no function that does the job properly.
And subclassing a control will result in rewriting almost the entire paint process of the CEdit class.
I need to do the same with Group boxes.
Who can help me out? Any help would be greatly appreciated!
|
|
|
|
|
|
HI
Is there any way to hide all desktop details from the User and provide my own customize shell.
<|>
|
|
|
|
|
My question may be stupid but i can't remember if we can initialize and affect an array in the same code line. Something like:
int Array[10]=[1,2,3,4,5,6,7,8,9,10];
could someone tell me if it's possible and how to do...please
|
|
|
|
|
int array[10] = {1,2,3,4,5,6,7,8,9,10};
situations to avoid #37: "good morning ... how many sugars do you take in your coffee ... and what was your name again?"
coming soon: situations to avoid #38: "...and the dog was there too?"
|
|
|
|
|
Hi!
I have drawn three radio buttons, and want to set one of this three one to aktivated state. How can I do this???? Please Help me soon, I need it for a project at school!
thx Michi
|
|
|
|
|
If you have used Visual Studio to generated the dialog you will have set the first one in the group with the WS_GROUP style.
The easiest way is to use Visual Studio the attatch a variable to the auto radio button group. Set the variable to 0 to avtivate the first,
1 for the second and 3 for the third. Then call UpdateData(FALSE);
Happy programming!!
|
|
|
|
|
first you need to make them all part of the same group in the dialog editor
then you need to assign a variable with them in the class wizard
then you need to set the variable to the zero-based index of the button you want on in your data exchange code
situations to avoid #37: "good morning ... how many sugars do you take in your coffee ... and what was your name again?"
coming soon: situations to avoid #38: "...and the dog was there too?"
|
|
|
|
|
|
thx 4 help!!!!!
thx Michi
|
|
|
|
|
want to load arrays and display arrays that will have numbers 1-25 in this format
1 2 3 4 5
6 7 8 9 10
11 12 13 and so on...
i have got 2 functions
i will load arrays n second will display
[code]
void loadArray()
{
int r, c, cnt=1;
for( r=0; r<5; r++ )
for( c=0; c<5; c++ )
data[r][c] = cnt++;
}
void displayArray( )
{
int r, c, temp;
cout << "The 5 x 5 2D array:\n\n";
for (r=0;r<5;r++)
{
for(c=0;c<5;c++)
{
cout << " " << data[r][c];
}
}
displayArray();
getchar();
pause();
}
i want to display arrays when ever i call func DisplayArrays();
|
|
|
|
|
what is the part that is not working properly?
|
|
|
|
|
I made just a couple of very minor tweaks to your code to do what I think you're asking for. If this isn't what you want, then you'll need to be more specific as to the exact problem you're having.
Code
#include "iostream.h"
int data[5][5];
void loadArray()
{
int r, c, cnt=1;
for( r=0; r<5; r++ )
for( c=0; c<5; c++ )
data[r][c] = cnt++;
}
void displayArray( )
{
int r, c;
cout << "The 5 x 5 2D array:\n\n";
for (r=0;r<5;r++)
{
for(c=0;c<5;c++)
{
int value = data[r][c];
cout << " " << ((10 > value) ? " " : "") << value;
}
cout << "\n";
}
}
void _tmain(int argc, _TCHAR* argv[])
{
loadArray();
displayArray();
int i;
cin >> i;
}
Output
The 5 x 5 2D array:
1 2 3 4 5
6 7 8 9 10
11 12 13 14 15
16 17 18 19 20
21 22 23 24 25
Cheers,
Tom Archer
Author, Inside C#
Author, Visual C++.NET Bible
A total abstainer is one who abstains from everything but abstention, and especially from inactivity in the af
|
|
|
|
|
Hi Tom, why don't you use ISO C++?
I mean #include <iosteam>
Maxwell Chen
People say "No news is good news". Then, no code is good code!?
|
|
|
|
|
|
Hi,
inside a method I need to know the current width of my listbox. thx for help!
CClientDC dc(this);
int nSave = dc.SaveDC();
CRect rect;// and now?
...
dc.RestoreDC(nSave);
|
|
|
|
|
GetWindowRect should work for you
Cheers,
Tom Archer
Author, Inside C#
Author, Visual C++.NET Bible
A total abstainer is one who abstains from everything but abstention, and especially from inactivity in the af
|
|
|
|
|
|
Thx a lot Michael & Tom!
Sometimes it's embarrassing what question I ask,
but this tiny function would have kept me busy for a while!
|
|
|
|
|
Anonymous wrote:
Sometimes it's embarrassing what question I ask,
Luckily you were anonymous, right
Nish
The posting stats are now in PDF:-
http://www.busterboy.org/codeproject/
Feel free to make your comments.
Updated - May 04th, Saturday
|
|
|
|
|
Nish [BusterBoy] wrote:
Luckily you were anonymous, right
got me
cheers
|
|
|
|
|
You're welcome. Just make sure that you understand that these functions will return different values and so deciding which one to use is going to be based on what you're trying to do.
Regarding positioning (x,y coordinates), the GetWindowRect returns the windows position relative to the overal screen. You can take the returned CRect and use it in a call to ScreenToClient to get the coordinates relative to the control's parent (e.g., the dialog). The GetClientRect will always return 0 and 0 for top and left.
Regarding sizing (cx,cy coordinates) the GetWindowRect size is based on the overall control (including its frame) while the GetClientRect is for getting the control's client area. Therefore GetClientRect will not include the size of the overall window and will usually be a bit smaller than the values returned from GetWindowRect (usually 4 pixels in the case of the default listbox).
Cheers,
Tom Archer
Author, Inside C#
Author, Visual C++.NET Bible
A total abstainer is one who abstains from everything but abstention, and especially from inactivity in the af
|
|
|
|
|
Wow, that was very detailed. I have to say thx again!
Hm, I did use GetClientRect() in my case, since I wanted to know the width of my owner draw control (client area). Works fine now.
|
|
|
|