Click here to Skip to main content
       

C / C++ / MFC

 
You must Sign In to use this message board.
Search this forum  
    Spacing  Noise  Layout  Per page  Show 
AnswerRe: How to get which Radio button is Checked?group_AnsHUMAN_ 10 Oct '12 - 2:29 
Group boxes might be causing the issue.
See here
You talk about Being HUMAN. I have it in my name
AnsHUMAN

QuestionRe: How to get which Radio button is Checked?memberDavidCrow10 Oct '12 - 2:38 
Do you have the WS_GROUP style set correctly? That style should be set only for the first radio button in the group.
 
Anurag Kela wrote:

I m using GetCheckedRadioButon(1stRadioID, LastRadioID) but m not getting anything from that?
So it's returning 0?

"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

"Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous


AnswerRe: How to get which Radio button is Checked?member«_Superman_»10 Oct '12 - 19:48 
I'm assuming you're using an MFC based dialog application.
If this assumption is right, read on.
 
For the first radio button of each group, set its Group property to True.
Right click on this radio button and select Add Variable and create an integer variable.
The above step is only possible with a radio button whose Group property is set to True.
 
To get the user selection, simply call UpdateData() and the integer variable will contain the 0-based index of the selected radio button.
«_Superman 
I love work. It gives me something to do between weekends.


Microsoft MVP (Visual C++)

Polymorphism in C

Questionfile is getting deletedmembersarfaraznawaz10 Oct '12 - 0:29 
hi,
every one i have created the file using the createFile.
HANDLE temp_file = CreateFile(sourceFileName,GENERIC_WRITE|GENERIC_READ,/*FILE_SHARE_WRITE|FILE_SHARE_READ*/NULL,NULL,CREATE_ALWAYS,FILE_ATTRIBUTE_HIDDEN /*FILE_ATTRIBUTE_NORMAL*/,NULL);
 
in windows vista i have created but its getting deleted in windows 8 and windows xp .
what will be the reason .
Thanking you
Sarfaraz
AnswerRe: file is getting deletedmembersirama200410 Oct '12 - 0:33 
FILE_ATTRIBUTE_HIDDEN .
Make sure you can view the hidden files!

GeneralRe: file is getting deletedmembersarfaraznawaz10 Oct '12 - 2:06 
ya i did
QuestionRe: file is getting deletedmemberDavidCrow10 Oct '12 - 2:40 
sarfaraznawaz wrote:
...but its getting deleted in windows 8 and windows xp .
Which means it is indeed getting created. At what point does the file get deleted?

"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

"Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous


AnswerRe: file is getting deletedmembersarfaraznawaz10 Oct '12 - 3:17 
My application am creating the file.i am calling the exe for the preview of the file after closing the exe the file is getting dleted,its working fine on windows 7 and vista even am not use the delete file API not the exe which am calling has no dletefile API ...
 

what would be the problem ...
 

Best Regards
Sarfaraz
GeneralRe: file is getting deletedmemberAndrew Cherednik10 Oct '12 - 11:32 
Make sure you call ::CloseHandle(temp_file) after you have done working with it
GeneralRe: file is getting deletedmembersarfaraznawaz10 Oct '12 - 19:28 
ya i am closing handle, if i not close the handle it unable open it its show the message that its has been in use ...
 

 
thats not the problem its getting deleted as i close the preview exe...
 

 
Best Regards
sarfaraz

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   


Advertise | Privacy | Mobile
Web04 | 2.6.130523.1 | Last Updated 25 May 2013
Copyright © CodeProject, 1999-2013
All Rights Reserved. Terms of Use
Layout: fixed | fluid