|
vinniez_ok wrote: I realize it's not proper to ask for code
No, that's not true. We don't like it when people who have not tried anything ask for their homework to be done.
If I had to send tabular data anywhere, I'd do it as XML. Depending where the data comes from, a DataTable is another candidate.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
Thanks Christian but for the little bit of data I'm using XML would overcomplicate things for me.
I'm thinking that Win32 would have what i need.
A table like this ::
name age wage ranking
Joe5 2 99 1
Joe9 7 1 1
Joe2 7 10 2
Joe1 14 1000 1
Joe4 25 1 1
Joe6 26 5 2
Joe8 26 20 3
Joe7 26 50 4
Joe3 26 500 5
is all I'm looking to output into a no-frills window that pops up after C++ compilation.
Thx!
Vin
|
|
|
|
|
OK, so it's just a rendering issue ? Looks like a job for a listview to me.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
is it possible to make a normal button pressed and lock it until its pressed again?
|
|
|
|
|
yes, it is.
set a radio or a checkbox, and change its property "Toogle Button" to True
|
|
|
|
|
thnx for the reply.
but the problem here is i hav more than 1000 buttons in my applicaton, so quit big work to change those buttons to check boxes and set toggle to true. can u provide me way for normal buttons.
Raj Gopal
|
|
|
|
|
Various Ways.-
1. Find out in a 3 button dialog what needs replacement, Load the .RES File in a Wordprocessor, and make relevant changes by Text replacement.
2. I do not believe that you wrote all this code for more than 1000 buttons, without testing for 2 or 3 first. but, maybe that's experience on my part
3. If you have thousands of buttons in your dialog template, you're at the wrong end of the stick. in 'OnInitDialog(), run a for(...)statement to go through each item to first retrieve the style, and then add the relevant style bit.
There's an Old Irish saying though,
"If I wanted to go where you tell me you want to go, If I where you, I would not have started where you are now". Think about it!!!
LateNightsInNewry
|
|
|
|
|
radio button and check boxes ARE normal buttons... only the style changes...
|
|
|
|
|
create a checkbox/button and set the BS_PUSHLIKE style ( either by code or in the resource editor )
|
|
|
|
|
Can someone direct me to information on how to 'activate' a button (that is either ON or OFF) without clicking on it ---- using only code to manipulate the action that would normally occur if the user clicked on it.
Thanks very much.
John P.
|
|
|
|
|
CButton m_button;
m_button.EnableWindow(TRUE);
|
|
|
|
|
Do you mean:
(1) making the button to have the Focus ?
SetFocus();
(2) making the button Enabled?
EnableWindow(TRUE);
(3) making the button (previously hidden) to appear?
ShowWindow(SW_SHOW);
(4) ...
hope that helps...
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 Language are U Using?? What Compiler, etc.!
LateNightsInNewry
|
|
|
|
|
1) Use SendInput
2) Use two SendMessage calls, one with WM_LBUTTONDOWN and one with WM_LBUTTONUP with the appropriate coordinates.
3) Use mouse_event (I think it still exists).
- S
50 cups of coffee and you know it's on!
|
|
|
|
|
Actually I have 2 bytes hexavalue and I want to convert into decimal value in C language could some one tell me how can i do that.
ikram
|
|
|
|
|
if you have two bytes worth of data that you want to interpret as an integer: __int16 i = *(__int16 *)pYour2Bytes;
if you have two strings:
char *p;
int i1 = strtol(pStr1, &p, 16);
int i2 = strtol(pStr2, &p, 16);
int i = (i1 << 8) + i2;
if you have one string:
char *p;
int i = strtol(pStr1, &p, 16);
|
|
|
|
|
thx..
I have some thing like that.
unsigned char DATA[25]; // DATA array consist of hex values.
I want to convert DATA[1] and DATA[2] contain hexadecimal values that is (0x00 0x02) into the decimal value.plz let me knw accordindly..thanks in advance.
|
|
|
|
|
__int16 i = *(__int16 *)pYour2Bytes;
FYI: unsigned chars do not contain "hexadecimal values" . a uchar contains 8 bits which can be combined to represent numeric values from 0 to 255 in decimal, or 0 to 0xff hex, or 0377 in octal, or 00000000 to 11111111 in binary, or any other base you prefer to use.
|
|
|
|
|
Please explain what you want to achieve. It appears you want to read two Text Strings, base 16, and combine them into one int.Why only shift 8 bits,etc. A lot depends on your End Pointer &p, which appears to be not modified between calls. How are you sure that p points to a valid end value in BOTH Strings. Me thinks that your code cannot make sense!
See your Standard header File for
'long strtol( const char *nptr, char **endptr, int base );'
LateNightsInNewry
|
|
|
|
|
(methinks your reply was misplaced)
|
|
|
|
|
sorry i was away-
unsigned char DATA[25];
Array contain different hexavalues(One function fills the values in DATA array). Now I want to read DATA[1] and DATA[2] values combinely.
let suppose,
DATA[1]=0x0b
DATA[2]=0x0b
The Decimal values for 16 bit(2 bytes DATA[1]& DATA[2]) is 187..
plz explain me how can i do that.thx
|
|
|
|
|
sorry..
DATA[1]=0x0b
DATA[2]=0xb0
The decimal value is 187.
|
|
|
|
|
__int16 i = *(__int16 *)&DATA(1);
|
|
|
|
|
thx for the help done.
|
|
|
|
|
if you have the string-representation of the hex number, such as "F5", the you may use strtol function, e.g.
char *pEnd;
long nVal = strtol("F5", &pEnd, 16);
hope that helps.
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.
|
|
|
|