Radio Buttons, Grouping, and Control Variables

I need to create a control variable for each radio button in a group. However, I am only able to do this for the first one in the group because the others' resource IDs aren't available in the 'Add Variable...' dialog box. Why can't I create a control variable for every radio button in a group? And how do I get around it

Related question: How can I change the 'Visible' property during run-time of a control for which I've created a control variable? There should be a method function or flag...
0
anonymous (74722)
2/11/2004 6:21:06 PM
vc.mfc 33608 articles. 0 followers. Follow

2 Replies
701 Views

Similar Articles

[PageSpeed] 38

"voidxor" <anonymous@discussions.microsoft.com> skrev i en meddelelse
news:BA170796-8E16-47D2-A30D-C9715C174C27@microsoft.com...
> I need to create a control variable for each radio button in a group.
However, I am only able to do this for the first one in the group because
the others' resource IDs aren't available in the 'Add Variable...' dialog
box. Why can't I create a control variable for every radio button in a
group? And how do I get around it?
>
> Related question: How can I change the 'Visible' property during run-time
of a control for which I've created a control variable? There should be a
method function or flag...

To add member variables for all radio buttons, give them an ID which is not
ID_STATIC. If you want, you can afterwards set them back.

To change the visibility, call the ShowWindow() function with SW_SHOW or
SW_HIDE.
-- 
Bjarne Nielsen


0
2/11/2004 7:19:48 PM
Bjarne Nielsen wrote:

> "voidxor" <anonymous@discussions.microsoft.com> skrev i en meddelelse
> news:BA170796-8E16-47D2-A30D-C9715C174C27@microsoft.com...
> 
>>I need to create a control variable for each radio button in a group.
> 
> However, I am only able to do this for the first one in the group because
> the others' resource IDs aren't available in the 'Add Variable...' dialog
> box. Why can't I create a control variable for every radio button in a
> group? And how do I get around it?
> 
>>Related question: How can I change the 'Visible' property during run-time
> 
> of a control for which I've created a control variable? There should be a
> method function or flag...

To get around it: Temporarily turn on the Group style for each radio 
button.  Create the control variables.  Turn off the Group style (except 
the first, of course).

-- 
Scott McPhillips [VC++ MVP]

0
scottmcp8856 (490)
2/11/2004 11:37:38 PM
Reply:

Similar Artilces:

How to reflect variable supplier costs?
Hello. My company deals with many overseas vendors and as a result, the "cost" for many of my items has a surcharge applied to it, based on the current Euro rate -- thus the true cost of these items is always changing each time I place an order. What's the best way reflect this curreny exchange rate discount in my cost for each item? The only thing I can think of is using a formula in excel and then uploading it to the db each time I get an invoice, but maybe there's a better way within RMS? Thanks in advance! -- R. Mullen Clovis CA ...

Navigating to next control in CDialogBar
I have an application which has Tab key assigned to one of the application menus (via accelerator table). The application also has a dialog bar (CMyDialogBar). I want the Tab key to be handled by the dialog bar (to navigate from control to control in the dialog bar) whenever the dialog bar has the focus and via the accelerator when the dialog bar does NOT have the focus. So I tried the following code in CMyDialogBar: BOOL CMyDialogBar::PreTranslateMessage(MSG* pMsg) { if (pMsg->wParam == VK_TAB) { if (GetFocus() == (CWnd *) &m_edit1) { TRACE("Tab key pressed in edit 1\n&...

Group Header 03-08-10
I have a text box named "txtCount" and the control source it is counting tranches for each customer. I want this report to look at the highest number of tranches for each customer. So ABC company has the highest number of tranches I want that many rows for each customer. Can this be done? I was thinking in the On Format of the group header. ...

Controling font size from derived CEdit CtlColor
I have a derived CEdit class that adds ON_WM_CTLCOLOR_REFLECT() to the Message map and implements CtlColor as follows... HBRUSH CMyEdit::CtlColor(CDC* pDC, UINT nCtlColor) { // set text color pDC->SetTextColor(m_crText); // set the font pDC->SelectObject(&m_font); // for the background to show behind the text, // background mode must be transparent pDC->SetBkMode(TRANSPARENT); // return the brush used for background return m_brBackGnd; } The problem is that for large fonts, the text gets clipped on the ...

ActiveX Control: Installation Fails
Hi, I am wondering if anyone can assist with a problem I am having with an ActiveX control failing to install on some occasions. My ActiveX control makes use of libcurl, which makes use of zlib1.dll I have been able to reproduce the problem of a failed installation by removing 'zlib1.dll' from my \windows\system32 directory. The ActiveX control is already packaged with this file however, and the .inf file contains: --------- .... [DefaultInstall] CopyFiles=install.files .... [install.files] zlib1.dll=zlib1.dll .... [DestinationDirs] install.files=11 --------- I even tried inclu...

Voting button dissappear in Outlook 2003 (version 11.8002.6568)
Hello, I have just recently upgraded my Outlook 2003 to version 11.8002.6568 using the online update. However, I notice the voting button will not be visible anymore if I receive email which has voting buttons. It was ok before when i was using 11.6568.6568. It is only recently happen if I have upgraded to this version 11.8002.6568. Any clue how to fix this? thanks. ...

Tab control within a tab control
Hi I have created a Case Management Database which has 5 themed sections: Personal Information, Personal Assessment, Personal Plans, Case Notes, and Other. I also have created almost 30 forms dealing with different information that must be collected on each participant. Withing the Personal Information themed section, there are at least 8 forms. In Personal Assessment, there are 8 forms, and etc. Is it possible to create a tab control within a tab control or should I create a subform which includes all the forms for each section and then put these subforms into the tab...

Group rights on Public Folder
Hi, Does anyone have a solution for my problem: I have a group of users who want to have a shared mailbox and a folder on my fileserver to which only they have access. I use Windows 2003 Server and Exchange 2003 I created the group and put the users in it I created a Public Folder Then I wanted to add the group to the Public Folder, but the group isn't vissible, because the group doesn't have an email-address assigned to it. I don't want to just assign an address to the group, because all the mail sent to the group would end up in every members personal mailbox. Now I coul...

Print a Variable
I have a routine programmed in the a footer section of my report. I have a variable Dim CurrentClient as string CurrentClient = "[Client]" I would like to be able to print the variable currentClient in the footer on the report. I tried in the control source =[CurrentClient] Does not work Any help would be appreciated Stefan You will probably need a simple public function that returns the variable like: Public Function GetCurClient() as String GetCurClient= CurrentClient End Function You can then set a control source to the function. -- Dua...

Sum variable range of column entries in offset cell #2
Hi chaps, Many thanks those of you who tried to help with this question last week, but my simplified example wasn't good enough. I'll ask the question again but with a more detailed explanantion. Sorry for any induced headaches in advance. I have 900 lines of data (A3:AT902). Below this I am using an INDIRECT formula to pull down (copy) certain lines from this mass of data (depending on certain entries within the data) into 60 separate tables below. First table (A915:AT943), second table (A951:AT979), etc. Much of the lines of data copied down into my 60 tables is numeric, and o...

First / Last nav button disable
I am having trouble with my code. When I open the form, and there is only one record, only my Next and Last Nav Buttons are disabled, when all of them should be. Any help would be appreciated. ------------- Private Sub Form_Load() Dim rst As DAO.Recordset Dim lngCount As Long Set rst = Me.RecordsetClone With rst .MoveFirst .MoveLast lngCount = .RecordCount End With If Me.CurrentRecord = lngCount Then Me.cmdLastRecord.Enabled = False Me.cmdNextRecord.Enabled = False Me.cmdPreviousRecord.Enabled = True Me.cmdFirstRecord.Enabled = True ElseIf Me.CurrentRecord = 1 Then ...

Button Text
Can you change the text of a dialog button during run time ? There doesn't seem to be anything about doing it under the MSDN CButton help... -- Lordy "Lordy" <spam@recycle.bin> wrote in message news:MPG.1a8f677777d87d9a989918@text.news.ntlworld.com... > Can you change the text of a dialog button during run time ? I think you can use SetWindowText. -- Jeff Partch [VC++ MVP] As mentioned by Jeff, you can use SetWindowText. CButton is derived from CWnd and SetWindowText is a public method in CWnd. Alternativcely, you can use SendMessage w/WM_SETTEXT. -- Ajay K...

Disaster Recovery Storage Group
Two database in tow strorage group. it�s possible? Thanks One at a time only. Nue "Guillermo Garate Pasquin" <ggarate@terra.es> wrote in message news:eQ$CQ7tbGHA.5104@TK2MSFTNGP03.phx.gbl... > Two database in tow strorage group. it�s possible? > > Thanks > On Wed, 3 May 2006 20:24:24 +0200, "Guillermo Garate Pasquin" <ggarate@terra.es> wrote: >Two database in tow strorage group. it�s possible? > >Thanks > One RSG per server. You can have up to 5 databases in a RSG however. ok i think that is right, and two database in the s...

EDITLABELS issue with list control
hi there i have a listview control with LVS_EDITLABELS style turned on everything works fine except for one thing: if the list is UNfocused, and i use the mouse to select the list to bring it back into focus, AND the mouse clicks on the currently selected item when doing this, it goes immediately into EDITLABELS mode (ie an edit control with the item label in it) i want to change this so it doesn;t go into EDITLABELS mode if the selection of the current item is purely to set the focus back to the list (try it in Windows Explorer, it doesn;t do it there) as an aside, i have a tree view con...

How do I group multiple lines so that they stay together during a.
I have a spreadsheet set-up in which information for one product, in some instances, takes up five lines. I need to be able to sort the worksheet, but I can't figure out how to keep the information grouped together during a sort function. Is it possible to group multiple lines together and then sort them? Hi AFAIK this is not possible. -- Regards Frank Kabel Frankfurt, Germany rgilles wrote: > I have a spreadsheet set-up in which information for one product, in > some instances, takes up five lines. I need to be able to sort the > worksheet, but I can't figure out...

report spam button in Outlook
I'm not interested in blocking spam. I want a utility in Outlook or Outlook Express that works like SpamCop. I want to be able to select multiple spam emails and then press a button that automatically reports spam to the network administrator of the internet service provider the spammers are using. Is there an add-in or VBA code for Outlook to do this? I currently use www.spamcop.net to do this, but this is not practical for reporting more than 20 spam emails at a time because you have to send the reports one by one. Jeff No, currently Microsoft leaves this market to third parties....

POReceipt Template-Enable Grouping w.r.t. Department/ItemClassLook
I am using RMS v2.0. I want to modify PORcv.xml (accessed at SO Manager | Transfer-Out Issue window | Print button), such that it could show PO entries grouped by department first, and then by ItemClassLookupcode. I have consulted with RMS Customization Guide but could not find any related help. I have also consulted Customer Source for Modified Store Operations Reports but did not find any such report which enables grouping of items. Your kind help is needed and will be much appreciated. Thanks. You can sort the list of items before you print by clicking on the column header ...

I cannot get my Excel sheets to "Group". (Student version 2003)
The "group" choice is "whited out" (Dim), and does not allow me to choose this. Nel post news:B307C0F0-2C75-4ED7-AF63-49A179EAEC13@microsoft.com *OLD Jim* ha scritto: > The "group" choice is "whited out" (Dim), and does not allow me to > choose this. If you mean the option under Data, Group an Outline, Group, I think it shoul be because you have to select something (rows o columns) that Excel can group, or maybe it's due to your Student version... -- (I'm not sure of names of menus, options and commands, because translating from ...

Switching text on a command button
Hi All, Is it possible to have a command button on form 1 that when pressed opens form 2, and displays 1 of 3 captions that are dependent on a text box in form 2. Form 1 = "Customer_Scheduling" with command button to display "Stock Available", "Part Stock" and "No Stock" This command button opens form 2 ("Allocated_Stock") Form 2 = "Allocated_Stock" with text box, Dropdown selection of "Stock Available", "Part Stock" and "No Stock". Thanking you in advance Bazmac Bazmac, Yes...

Mail undelivered in certain groups
Hi, I got this problem with Exchange 2003. When I sent an email to certain Distribution Groups, the mail never is delivered and I don't get any message of error. I created a brand new group and send Test mails, and it works fine, the mail is delivered. Actually, I got like 10 different groups, and only 4 of them are having this problem, any idea? Thank you. Ciryus � wrote: > Hi, I got this problem with Exchange 2003. When I sent an email to > certain Distribution Groups, the mail never is delivered and I don't > get any message of error. > > I created a brand ne...

checkbox control greyed out on some records
I have a table with a series of checkboxes. In datasheet view, some of the checkboxes are greyed out....can anyone tell me why? If you check you will find they have a Null value. I imagine the field was added after those records were added or those records were appended as Null. -- Build a little, test a little. "Marge" wrote: > I have a table with a series of checkboxes. In datasheet view, some of the > checkboxes are greyed out....can anyone tell me why? ...

Word 2007 Convert Button Not Working Properly
My understanding is that if you want to convert a Word 2002 file from .doc to be a Word 2007 .docx file, you have two options - use Save As or the Convert button (after you click the Office Button). Save as will create the ..docx file and keep the .doc file in tact. Convert is supposed to convert the actual file from being a .doc file to a .docx file -- leaving you with one file. We want to be able to "Convert" some of our files, but when we click the button to convert the file and then click the Save button for it to take affect (the file extension then changes to ....

Viewing Access 2003 Group Permissions
I have a secure Access 2003 database with multiple users and groups.There are lots of forms, reports, queries, etc. When I go to Tools->Security->User and Group Permissions and click on Groups there is alistbox of group names and a listbox of object names. Does anyoneknow if there is a way to sort the list of object names by name? Ibelieve it may have been sorted that way originally, but over timewith new versions of many objects created or imported, the list is nolonger in any meaningful order. There also appears to be no way toincrease the width of the listbox to view the entire na...

Viewing Control Characters
Hi, I want to view and edit control characters such as <tab> and <LF> in text files that I import into Excel 2007 on a Windows XP laptop. I'm not able to view or edit them even though I can verify their presence using LEN and CODE functions. It works on Excel 2007 on an XP desktop at work. The control characters show up as boxes or boxes around symbols. Is there a setup option on XP, Office, or Excel that I need to select? Thanks, Paul Try the Terminal font. For example: =CHAR(1) should display a smilelyface. -- Gary''s Student - gsnu201001 ...

Why is Close Group option greyed out?
Why is Close Group option greyed out on the Windows taskbar for PowerPoint 2007? PowerPoint 2007 and Word 2007 both have the Advanced Option to show all windows in the taskbar, but if I have 7 Word files open and they are grouped on the taskbar, I can right click the taskbar and choose "Close Group". All of the Word files close (as long as I don't need to save changes to any of the files, of course). This "Close Group" option is greyed out for PowerPoint 2007. How do I "ungrey" this option? You probably can't since microsoft blows. &quo...