|
conditional checkbox is present in few row. I just want to capture any change in any checkbox.
|
|
|
|
|
I hope you are showing the check box with LVS_EX_CHECKBOXES. If so, you will get the LVN_ITEMCHANGED notification when user checks or unchecks the check box. you can identify the state of check box by getting the state image of the item.
From MSDN:
"State image 1 is the unchecked box, and state image 2 is the checked box. Setting the state image to zero removes the check box."
|
|
|
|
|
how to contact the file extension with file type?
as we know, you can check the option of hidden known file extesion in windows, but how do we identify file extension through file type
|
|
|
|
|
try the SHGetFileInfo() with the SHGFI_TYPENAME flag.
|
|
|
|
|
You would need to know the format of each type of file that may exist. This information is specific to each application and is not something maintained by Windows itself.
|
|
|
|
|
|
You could try gettin an IShellFolder[^] interface of the desktop, maybe by using SHGetDesktopFolder[^], use its EnumObjects[^] method to enumerate the objects on the desktop, on every object you get, use GetUIObjectOf[^] to retrieve IExtractIcon[^] for it and then use the ExtractIcon[^] method of that to get an icon.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Sometimes you just have to hate coding to do it well. <
|
|
|
|
|
Hi,
I make one dialog with pos as follow
SetWindowPos(&CWnd::wndBottom,0,80,350,900,SWP_SHOWWINDOW);
But when i changed the resolution to 800x600,half of dialog get hided.
How can i avoid that?
I want in all resolution the dialog should display in same size.
Anu
|
|
|
|
|
You can handle WM_DISPLAYCHANGE message in your application and call SetWindowPos(...) to readjust the size.
|
|
|
|
|
Anu_Bala wrote: SetWindowPos(&CWnd::wndBottom,0,80,350,900,SWP_SHOWWINDOW);
But when i changed the resolution to 800x600,half of dialog get hided [...] I want in all resolution the dialog should display in same size.
Well, you can't have a 900 pixel high window in a 600 pixel high desktop.
Cheers,
M
|
|
|
|
|
You can adjust your sizes with respect to maximum width and height available.
for example
your ratio for 900(in 1028x1024) is 900/1024 and for 800x600, it will be 600*900/1024.
Perhaps this[^] could also help.
|
|
|
|
|
By way of pointing out the obvious -- if you have an 820 pixel high dialog on a 600 pixel high display, part of it will be cut off no matter what.
|
|
|
|
|
how to get Window name from window handle in win32.
|
|
|
|
|
|
Hi All,
Will you please give me one solution to change the caption of balloon tooltip that will be shown when a device is connected?
Regards,
Spk
|
|
|
|
|
Maybe you can hook the balloon tooltip window and change it.
April
Comm100 - Leading Live Chat Software Provider
modified 27-May-14 9:00am.
|
|
|
|
|
Hi all,
How to change the button style to default button.
Thanks
|
|
|
|
|
|
|
Try this function CButton::SetButtonStyle()
|
|
|
|
|
Can you use CDialog::SetDefID() ?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
HI ,
this is a question purely related to C programming.
I am calculating a division between two float numbers e.g 4.00 / 3.00.
Now if i answer 1.3333 , the functions returns that it is wrong.
i just want to know how to truncate in Float values in C ???
here is the copy of the code:
float d1,d2,d3;
main( )
{
srand(time(0)); // Initialize random number generator.
ans = 1;
while ( ans != 0 )
{
/// starting of For loop ////////////////
wrg =0;
for ( cnt=0;cnt<3;cnt++) {
d1 = float(rand()%x+2 );
d2 = float(rand()%x+2) ;
printf("\n\t Solve this %f / %f :.........\n", d1, d2 );
scanf("%f", &d3);
divid_cheque(d1,d2,d3);
}// ending for loop
printf("\n\t Do you want to continue........\n");
printf("\n\t Type 1 = continue or 0 = to terminate \n");
scanf("\n\t%d", &ans);
}
printf("\n Total number of wrong answers : %d out of %d \n\n", wrg, cnt);
return 0;
}
//////////////////////Division(/) Function defined//////////////////////////////////////////////////////////////////
//unsigned int division( unsigned int y, unsigned int z, unsigned int x )
// unsigned int divid_cheque( unsigned int j, unsigned int k, float l)
// int divid_cheque( float j, float k, float l )
int divid_cheque( float j, float k, float l )
{
float as;
as=j/k;
if ( l== as )
printf("\n \t Right answer..........\n");
if ( l != as ) {
printf(" \n \t << WRONG ANSWER >> \n");
printf("\n \t the right answer is = %f",as);
wrg++ ; // incrementing counter for wrong answers
}
else
return (wrg);
}
////////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
When doing comparisons with calculated float values, you generally need to decide how close is close enough. Take the absolute value of the difference between the two and see if it is less than some epsilon value which is your tolerance for "exactness".
You measure democracy by the freedom it gives its dissidents, not the freedom it gives its assimilated conformists.
|
|
|
|
|
truncate at which decimal place ?
float f1 = 4./3.;
float f2 = (float)((int)(f1 * 1000.0)) / 1000.0;
|
|
|
|
|
The number of digits in a float after the decimal point cannot be truncated.
You can only limit the number of digits that you want displayed.
For example printf("%6.4f", 4.0/3.0); will display 1.3333.
|
|
|
|