tristate check box #2

I have a tristate check box.The default behavour of tristate check box
in windows is that, the grayed check box will become unchecked after
click on grayed check box.
But i want , the grayed check box will become checked after click on
grayed check box in VC++ .Pls help me its urgent.

0
jcsunil (3)
9/15/2006 1:42:59 PM
vc.mfc 33608 articles. 0 followers. Follow

3 Replies
678 Views

Similar Articles

[PageSpeed] 39

Well, for Win32, you can always SendMessage the button a BM_GETSTATE.  I'm 
sure with MFC there's a function that will permit this; it could be as simple 
as button_name.GetState().

Well, for the event OnClick for that button, you can get the state of the 
button and then either run it through some if-statements or you can run it 
through a switch statement.  Once you find the state of the button, you can 
then set the state of the button using, again, a SendMessage(BM_SETSTATE...), 
or, again, I'm sure MFC has a function on the button that will permit you to 
do the following...  button_name.SetState(BST_X);

I hope that helps.

Saul775

"sunil" wrote:

> I have a tristate check box.The default behavour of tristate check box
> in windows is that, the grayed check box will become unchecked after
> click on grayed check box.
> But i want , the grayed check box will become checked after click on
> grayed check box in VC++ .Pls help me its urgent.
> 
> 
0
Saul775 (62)
9/15/2006 2:02:01 PM
Thanks for ur reply,but i have already tried this.......but it is not
working.
See my code, so that u will get an idea abt my problem.
CButton *l_CheckBox = (CButton
*)GetDlgItem(IDC_ACCESS_AUTHORITY_SELECT);
if(BST_INDETERMINATE == l_CheckBox->GetCheck())
{
	l_CheckBox->SetCheck(TRUE);
}

Saul775 wrote:
> Well, for Win32, you can always SendMessage the button a BM_GETSTATE.  I'm
> sure with MFC there's a function that will permit this; it could be as simple
> as button_name.GetState().
>
> Well, for the event OnClick for that button, you can get the state of the
> button and then either run it through some if-statements or you can run it
> through a switch statement.  Once you find the state of the button, you can
> then set the state of the button using, again, a SendMessage(BM_SETSTATE...),
> or, again, I'm sure MFC has a function on the button that will permit you to
> do the following...  button_name.SetState(BST_X);
>
> I hope that helps.
>
> Saul775
>
> "sunil" wrote:
>
> > I have a tristate check box.The default behavour of tristate check box
> > in windows is that, the grayed check box will become unchecked after
> > click on grayed check box.
> > But i want , the grayed check box will become checked after click on
> > grayed check box in VC++ .Pls help me its urgent.
> > 
> >

0
jcsunil (3)
9/15/2006 2:21:09 PM
sunil schrieb:
> Thanks for ur reply,but i have already tried this.......but it is not
> working.
> See my code, so that u will get an idea abt my problem.
> CButton *l_CheckBox = (CButton
> *)GetDlgItem(IDC_ACCESS_AUTHORITY_SELECT);
> if(BST_INDETERMINATE == l_CheckBox->GetCheck())
> {
> 	l_CheckBox->SetCheck(TRUE);
> }

Do not use the BS_AUTOCHECKBOX and BS_AUTO3STATE sytle for the checkbox and do 
the check mark handling manually in your OnClick handler.

Norbert
0
nunterberg (207)
9/16/2006 9:24:55 AM
Reply:

Similar Artilces:

HOW DO I DELETE THE EXCEL RESEARCH POP-UP BOX?
Want to permanently get rid of that annoying pop-up 'research' box that appears everytime I try to copy/paste using Excel in Windows XP Professional. Please help. "JON" wrote: > Want to permanently get rid of that annoying pop-up 'research' box that > appears everytime I try to copy/paste using Excel in Windows XP Professional. > Please help. Jon, I too suffered with this. Click the down arrows at the end of the standard toolbar, select add or delete buttons, select standard toolbar click on the highlighted "research" icon to deacti...

Adding a logo to the Personal Information dialog box?
MS Publisher 2003 I want to add a logo to the Personal Information dialog box but the logo area is greyed out? Everything else in the Personal Information dialog box is available. -- Thanks in advance for your time. Pamela Edit a logo for a personal information set http://office.microsoft.com/en-us/publisher/HP030713481033.aspx?pid=CH062524721033 -- Mary Sauer MSFT MVP http://office.microsoft.com/ http://msauer.mvps.org/ news://msnews.microsoft.com "Proicere" <Proicere@discussions.microsoft.com> wrote in message news:020BB7AB-1676-4D8E-87BF-CB85F68D0A63@microsoft.com...

How to suppress zero value check checks and remittance
Any one knows how to avoid printing the zero value remitances during the checks run in PM. GP7.5 Thanks in Advance. ...

extract value from cobmo boxes
Dear Friends I have combo box in my form which contaims 3 columns I want to full the value of column 2 of above to another combo box on got focus event. ie on focus 2nd combo box to be filled with text value of of 2nd column of the 1st combo box. This must happen only if the second combo is null Please guide me how to write code for the same Thanks & reagrds Ramesh shetty On Fri, 25 Jan 2008 13:30:10 +0530, "Shetty" <rameshmshetty@gmail.com> wrote: >Dear Friends > >I have combo box in my form which contaims 3 columns > >I want to full the value ...

Name Drop-Down Box
I've got a 50 sheet excel document and i want to create names to get m to A1 on every page, so I don't have to scroll left and right all th time. So, here's my problem. I would like to increase the number of names shown when i click th drop down box. Right now it shows 7, in Office 2003. I would love t increase that to show 50, or else I�m not really getting th functionality I�m looking for. I think this will take some kind of registry tweak. Does anyone know how/where I can? Thanks in advance, Chri -- cbh3571 ----------------------------------------------------------------...

SPELL CHECK
I am unable to use spell check in outlook express....get the message...."an error occurred while the spelling was checked".... any help would be appreciated..thnx...sam If you are on exchange try and remove your profile folder from both the server and the client machine. Had the same problem last week. >-----Original Message----- >I am unable to use spell check in outlook express....get >the message...."an error occurred while the spelling was >checked".... > >any help would be appreciated..thnx...sam >. > Owen <ohein@sasktel.net> wro...

How to manually void a check
A vendor of our recently requested that we send them a voided check so that electronic payments could be processed to our company. Can anyone out there tell me how to go into GP and manually void this check #? It sooooo tempting to say something like "Just write void on it"...looking at the title of your question :) When you print the next batch of checks, it presents the next check number in the sequence. Change this check number to account for the skip. -- Richard L. Whaley Author / Consultant / MVP Documentation for Software Users Get our Free Tips and Tricks Newsle...

Spell check with protection on
I have a worksheet that I have protected and allow users to access on the unlocked cells to enter data. My users want to use the spell check function, but it is not allowing them to spell check. Any ideas? Mona, here is one way using a macro to unprotect the sheet run spell check and the protect the sheet, I am not sure but I think in later versions of excel there might be a option for this when you protect the sheet Sub Spell_Check() 'spell check a protected sheet ActiveSheet.Unprotect password:="123" Cells.CheckSpelling CustomDictionary:="CUSTOM.DIC", Ignor...

sockets in MFC #2
Greetings, I am new to Socket programming. I have a couple of questions. Is there any good book which I could use to do Socket Prog. in MFC. Also if I have a piece of code that needs to communicate to more than one piece of code (say 4), do I need to create 4 socket objects. thanks in advance, best regards Quinn and Shute, Windows Sockets Network Programming Comer and Stevens, Internetworking with TCP/IP Vol III (Windows edition--there's also a Unix edition, make sure you get the right one). Pieces of code do not require sockets. You need to state what you are doing more clearly. Not...

Net 2.0 client calling Axis WS -- send document problem
I am calling an Axis web service from a Net 2.0 client. To be helpful, the developers on the Axis side sent a test client that they created, with snippets below. What I am trying to do is add a document to a workplan object, and return the object. I can return the object okay, but do not see how I can do this with .NET. I was expecting something like an attachfile method that returns an array of bytes. I have the WSE 3.0 installed. Thanks, David private WorkPlanDocumentTO addWorkPlanDocument(Long workPlanId) { (Axis call.registerTypeMappings ) call.setOperationName("ad...

File Dialog Explorer style + manipulate existing controls #2
First, thx for your replies on my first question. I ave another question: in my application I have an online-language-switch option, where the user can switch between the languages German, English and French. Can i manipulate the buttons and labels of the modern file-open-dialog at runtime? I don't want to add new controls only manipulate the existing one (setting correct language texts). Is this possible with the file dialog which uses explorer style? thx ...

Vlookup from Combo Box
Hello, I am trying to use the Vlookup function from a Combo Box. The combo box will contain currencies (USD, JPY, EUR). Once a user selects a currency, the lookup will use that currency to find the exchange rate from a table. Something like this =VLOOKUP("Forms.ComboBox1",Currency!A1:B4,Currency!B18,FALSE) Any help would be much appreciated. Thanks ACase If it's a Combo Box from the Control Toolbox toolbar, you can set the "LinkedCell" property (right-click on the combo box and go into "Properties") to a worksheet cell. When the user makes a select...

More than 2 filters
Is it possible to do more than 2? How? AutoFilters? One per worksheet. -- Jim Rech Excel MVP Sorry, I didn't state the question properly. What I do now is turn on Autofilters and under custom I can specify 2 conditions for each column. I need now to be able to sort for 3 or more conditions. Is that possible? "Jim Rech" <jrrech@hotmail.com> wrote in message news:OI2Hdxs2DHA.2500@TK2MSFTNGP10.phx.gbl... > AutoFilters? One per worksheet. > > -- > Jim Rech > Excel MVP > > No, you can use helper columns with formulas that returns one condition ...

Check Verification Check Authorization
I'm looking for a way to help me with all the hot checks we've been getting lately. We have a Vital credit card processor and we'd like to run checks like we do credit cards (where the funds are guaranteed and immediate) We want it to integrate with POS and not be on a seperate terminal. I haven't had much luck finding a processor that can do this for us. Any help would be greatly appreciated. Thanks! I have a client with a similar need. Have you received any feedback to this request? -- Greg Staples Automated Options, Inc. Spokane, WA "David" wrote: ...

Combo Box on Form does not save correctly to table
I got a combo box on my form. The combo box lists our suppliers. When I save the form and check the table to ensure the info was stored properly, it shows the Supplier ID in the column instead of the name. I have deleted and rerun this combo box a dozen times and can not fiqure out where my error is. I have another form that I created with the combo box listing the suppliers using the same table. That second form saves the supplier info correctly. I have looked at properties in both forms to see if I see the problem, but I do not. Can someone please help me? -- Bandit Assuming...

Spreadsheet with boxes
I have an Excel document with check boxes throughout the document but when I print the document, all of the check boxes move over to the far left side of the page and are all squished together. Help! Have a read here...... http://support.microsoft.com/?kbid=838910 Gord Dibben Excel MVP On Fri, 11 Jun 2004 11:31:29 -0700, "Help!" <anonymous@discussions.microsoft.com> wrote: >I have an Excel document with check boxes throughout the >document but when I print the document, all of the check >boxes move over to the far left side of the page and are >all squi...

money vs. quicken #2
any idea how I can change my options so that when i export my transactions from my bank-I can save the file to manipulate as I want to instead of Money intercepting it? I can't seem to find the option to turn this off, or the file to edit... In microsoft.public.money, Nancy wrote: >any idea how I can change my options so that when i >export my transactions from my bank-I can save the file >to manipulate as I want to instead of Money intercepting >it? I can't seem to find the option to turn this off, or >the file to edit... Start->Settings->ControlPanel...

Statement Completion not working in a particular project
Strangest thing, Statement Completion isn't working in a particular project. The check boxes ARE checked in 0ptions, Editor Tab. It still works in other projects. I unchecked them, saved the project, reopened the project, and restarted Visual C++, but it still doesn't have statement completion. Yasoo wrote: > Strangest thing, Statement Completion isn't working in a particular project. The check boxes ARE checked in 0ptions, Editor Tab. It still works in other projects. I unchecked them, saved the project, reopened the project, and restarted Visual C++, but it still doesn...

Checking Balance and Online Update
I'm trying to understand what went wrong with my checking balance and online updates. I manually put a bill in the register that I wrote a check for. I used the online update to sync my balance several times, and when the check finally cleared, my balance ended up off (positive) by the amount of the check. Money correctly identified it as the same trasaction. I could tell that this transaction is the issue, as it was a unique amount, and the balance is now off by exactly that amount. My question is twofold: first, what did I do wrong? Second, what is the proper way to correct this....

List Box 01-26-08
Hi Everybody! I need an answer, I have a problem with showing a field when I create List Box, Example: I start wizard for creating list box, then i choose which field should be showing ( Name, Surname and ID) but the surname field does not show, who can help me resolving this problem. Thank you valdet_shala32@hotmail.com Hi Say you have a table called tblClients In the table you have: ClientID 1stName Surname Your list box will show these fields (if you want) BUT It is the first field that the list box will display that has a column width more than 0 So to show these fields in the ...

Finding duplicates #2
I am using Excel 2007. One of my columns has a long list of numbers in it like what you see below. How can I see if there are any duplicates in the list? Is there a function or something that will do this? Many thanks. 22505505102 22505508413 22505504908 22505504822 22505505102 22505504954 22505514093 22505504840 22505514155 22505504917 22505504892 22505685859 22505505001 22505504933 22505508409 22505504844 22505504937 22505504893 22505505024 22505504937 22505504815 22505508448 "John Menken" <menken.john@gmail.com> wrote in message news:f3a66cd6-3b7d-4d39-b665-f95d1692ae8...

Changing the text box default fonts
I have searched and searched for this. MS offers an answer and gives a web link which then sends you back to the original web page. ie no answer. There has to be a way to do this. Their help doesn't work. Has anyone found a way to do this. I hate Times New Roman fants and want all my text boxes to come up with Arial 12 point and I'm tired of changing it. Dr Hammer wrote: > I have searched and searched for this. MS offers an answer and gives > a web link which then sends you back to the original web page. ie no > answer. There has to be a way to do this. Their h...

Recording multiple checks in a single deposit
This seems like it's probably brutally simple, but I can't figure it out: how do I record multiple check numbers in a single deposit? The deposit consists of a couple checks from my primary checking account which I'm depositing, along with some cash, as a single deposit transcation in a different checking account. Using MS Money Deluxe 2003. - sph In microsoft.public.money, hodgdon wrote: >This seems like it's probably brutally simple, but I >can't figure it out: how do I record multiple check >numbers in a single deposit? > >The deposit consist...

Date delimiter changes
Version: 2008 Operating System: Mac OS X 10.6 (Snow Leopard) Processor: Intel I open a worksheet with cells formatted for date, and tab to one of the date cells and all of the date cells change the '/' delimiter instantly. The '/' becomes a '1'. For instance 2/2/99 becomes 212199 across the entire worksheet. Plus, in the list of date format types, all the '/' are showing as '1'. <br><br>This only happens on my iMac. If I save and send the file to a PC user, the date format is normal. <br><br>This problem does not happen i...

Checks in check register
We have some checks in the check register that did not post to GL. I can find them in the CM20200 table with the same AUDITTRAIL code. How can I correct this? -- Rich I would just make a GL entry to correct your account. "Richard" <rwrenchjr@hotmail.com.(donotspam)> wrote in message news:F53394E2-25AD-4030-BF62-2A3C9A999E5E@microsoft.com... > We have some checks in the check register that did not post to GL. I can > find them in the CM20200 table with the same AUDITTRAIL code. How can I > correct this? > -- > Rich Thanks Carmie - what can we do to p...