|
Can't find any solution out there!
|
|
|
|
|
|
You have to go for ownerdraw menu.
- NS -
|
|
|
|
|
As others have said, use an owner-drawn menu. It's not too difficult.
However, unless your application really needs to do this, I'd recommend not doing it. Users have the ability to set their preferences in Windows how they want them, and it's generally frowned upon to go messing with them (including deliberately doing something different).
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
hey all,
i have a really simple question, im amazed i cant find out how to do this.
i have 2 integers, called x and y . i need to show printf("%d", (x/y));
everything i try will round it to the closest integer. i've tried using double for x,y, another variable that stores the value of x/y, but it still rounds the to the closest integer. how can i display a number not rounded to the closest integer?
thanks in advance
|
|
|
|
|
|
If both of the numbers are of type int like they stated then you'll get (On Visual C++ 6.0 and VC++ 2003)
#include "stdafx.h"
int main(int argc, char* argv[])
{
int x=1;
int y=9;
printf("%f\n",x/y); // The expression gets truncated before formatting
printf("%lf\n",x/y); // The expression gets truncated before formatting
printf("%f\n",(double)x/y); // The correct way when both are integers
printf("%lf\n",(double)x/y); // The correct way when both are integers
return 0;
}
*************** OUTPUT VC++ 6.0*******************
-1.#QNAN0
-1.#QNAN0
0.111111
0.111111
Press any key to continue
*************** OUTPUT VC++ 6.0*******************
796482944349676280000000000000000000000000000000000
000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000
000000000000000000000000000000.000000
796482944349676280000000000000000000000000000000000
000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000
000000000000000000000000000000.000000
0.111111
0.111111
Press any key to continue
|
|
|
|
|
Don't forget to make sure at least one of the components in the expression is a float or a double to avoid truncations. If both x and y are int's you will notice a truncation of the result before the printf formatting occurs.
printf("%f\n",(double)x/y);
|
|
|
|
|
See
<br />
double c;<br />
double x = 123.456;<br />
double y = 2.1;<br />
c=x/y;<br />
printf( "%f\n", c);
whitesky
|
|
|
|
|
|
One slight correction: Use the "%f " format code for values of type float , and "%lf " format code for values of type double .
Software Zen: delete this;
|
|
|
|
|
anybody knows how to repair a floppy??Plz giv some implementation..
|
|
|
|
|
Do you want to create this utility or just need a tool for doing this
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
I am already in the rocess of makin this utility ,but some ppl say that they move bad sectors in damaged floppies!! How can we do that? We can just indicate the OS that the sector is bad ,we cant move it here n there around.So I just wanted to confirm this thing. I hav tried my programs on several floppies n 8/10 hav been suceessfully repaired .But anyways Thanks .
|
|
|
|
|
|
Hey , Listen
CFlopy is just to read from a floppy , onthing else OK. It is not a floppy repairer . If u dont know the answer ,then stop guessing.
|
|
|
|
|
No, you listen. He suggested you look at an article related to your question. It might have had information that was useful to you, even though it didn't solve your problem directly. Your response is rude and uncalled for.
Software Zen: delete this;
|
|
|
|
|
Thank you for support
whitesky
|
|
|
|
|
You're welcome.
Normally I don't correct other people's behavior in public, but ingratitude is one of my hot buttons.
Software Zen: delete this;
|
|
|
|
|
I am here (usualy only visual c fourm)for answer to questions and you know that i can dont answer to any question and i see questions(only) but i like answer to questions becuase i want help to programers
whitesky
|
|
|
|
|
how can we detect bad sectors in a floppy??PLz tell with some implementation!!
|
|
|
|
|
Have you tried "chkdsk" command? It checks and fixes bad sectors on a drive.
- It's easier to make than to correct a mistake.
|
|
|
|
|
Is it possible to center align the subitem image (no text in subitem) in a List control (CListCtrl)? CListCtrl::SetItem() doesn't seem to do so. Help please!
|
|
|
|
|
SeeHere[^] im not sure but maybe it is some helpful to you
whitesky
|
|
|
|
|
Yes I have seen that before but that is owner draw list and I have to use normal list control.
Thanks for your input.
|
|
|
|