Changing button region in Dialog

HI,
 Is there any way to assign my button a region, after 
dialog has been displayed?

 I dont want to use PreCreateWindow()

 Actually, I have 2 buttons, when user clicks first 
button, the second button's region changes, I did the 
following

void CMyDialog::OnFirstButton()
{

  CButton *pButton = (CButton*) GetDlgItem(IDC_SECOND);
  CRGN myrgn;
  myrgn.CreateEllipticRgn(10,10,33,39);
  
  pButton->SetWindowRgn(myrgn,TRUE);

}
 
but above code doesnt change the button's region.

Any idea?
I need to change the region of control after Dialog has 
been displayed.

Thanks in advance

Fahad Ashfaque
fahad_ashfaque@yahoo.com 
0
10/13/2003 5:20:20 AM
vc.mfc 33608 articles. 0 followers. Follow

0 Replies
620 Views

Similar Articles

[PageSpeed] 31

Reply:

Similar Artilces:

change Colomn name automatically
Hi i have two different table Table1 and Table2 : Table1 is like: field1 field2 field3 .........fieldn A B C N A1 B1 C1 N1 ............................. Table2 is like this ID_name Name .... address tel 1 pippo 2 pluto ... ... n paperino the goal is to change the colomn name of the first table1 with the fields of table2 (field Name). The results should be like pippo pluto ......... paperino A B ...

Change window title in dialog app...
I'm using AfxMessageBox to inform my users as to some action. How do I change the title (it's usually the project name) of the window that's created? In a normal SDI or MDI I can go to the string resource and change the AFX_IDS_APP_TITLE, but there is no string resource for a dialog based app. Any clues? Thanks, Fred you can use ::MessageBox instead "sftwrdvlpr" <bogus@news.com> wrote in message news:LYNdb.4962$%U5.2113@newssvr29.news.prodigy.com... > I'm using AfxMessageBox to inform my users as to some action. How do I > change the title (it'...

Changing opertation mode from Mixed to Native...
We are building one more mail server and we would like to take all to- be-discovered advantages of Exchange 2007 since we have purchased software assurance. We figured out it is a requirement that the Exchange organization needs to be under native mode, in order to deploy Exchange 2007. We have no more 5.5 server and I verified having Exchange 2000 and 2003 co-exist is not a problem in changing the mode. My concern is about our AD, it is still under mxied mode. So my question being, is it nessasary to change the mode of AD to native, before I could change the mode of Exchange to native? ...

change spaces to _
Is there a way for access to return what was being input into a text box I am having trouble with trailing spaces (access text box removes it) therefore I am thinking to format it to "_", therefore I am still able to preserve the length -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/Forums.aspx/access-modules/201005/1 Help wrote: >Is there a way for access to return what was being input into a text box > >I am having trouble with trailing spaces (access text box removes it) >therefore I am thinking to format it to "_"...

Excel 2002
I have a user using Excel 2002 on windows. Just this month whenever she enters a date formatted for any day in 2004 it automatically changes the month to the day. We've checked the cell format and even tried to change it to a different format and it still occurs. (ie 01/04/2004 to 1/4/2004). The vesion of excel is Excel 2002 (10.3506.3501) SP-1. I searched the Microsoft site for an upgrade but there wasn't another SP version listed for Excel 2002. Any one else come across this problem? Thank you! Rebecca http://www.geekmom.net/downline --- Message posted from http://www.ExcelFor...

Re: How to change the AutoNumbers inID field in my finished database?
"hans" <hans@post.letnet.dk> skrev i meddelelsen news:... > > "hans" <hans@post.letnet.dk> skrev i meddelelsen news:... >> >> "Tom van Stiphout" <no.spam.tom7744@cox.net> skrev i meddelelsen >> news:m5pfq3pe0q7ugf4usd088p7gupfiv0fh2u@4ax.com... >>> On Mon, 4 Feb 2008 19:48:01 -0800, Jako >>> <Jako@discussions.microsoft.com> wrote: >>> >>> Define "different". >>> -Tom. >>> >>> >>>>This may be a simple question but... >>>>...

display text with button
I have multiple buttons and one text field (unbound). What I want to do is when user click on the button. It will display a message in the unbound text field. ie. My first button is Product and when the user click on the product button to open the product tab control the unbound text field will show Product. When the user click another button label Milk, the unboud text will show only Milk. Thanks. ...

subform data changes after each line input
In my subform I enter the data through text box entries as well as combo box selections. After I finish a line and go to the next one when I select in a combo box my selection is cascaded up to all the previous selections. The data from the previous lines is entered into the tables correctly it just gets changed in the view of the subform. Sorry I am new to Access programming. Any help Paul, It sounds like the combo box is unbound. In design view (of the form) look at the combo box. Open properties. Click on the DATA tab. The "Control Source" property is the field the data is...

changing from 2 dongles (2 databases) to 1 dongle (2lanes)
We recently bought MS RMS 1.3a, even bought support on it. But, our needs have changed we went from thinking we would have 2 seperate databases to just 1 database and needing 2 lanes. Now, our reseller who thought Microsoft would accept a return and exchange us or allow us to buy the 2 lane dongle informs us Microsoft has denied our return request. Has anyone else had similiar problems? I want to know before i call MS myself to discuss their reason for denying us. I had not know MBS to be unreasonable to customers but this is flat out rude to not allow us to do what we need and wast...

How to input "Keep the Change" transactions with Bank of America
I just signed up for the BofA "Keep the Change" program and need to figure out the easiest way to set this up in MS Money 2006 Deluxe. This program rounds up my debit card transactions to the nearest dollar and puts the difference in my savings account. They match 100% for the first 3 months, and then 5% thereafter So...how do I do this? My first thoughts are... 1. Create the Savings Account in MS Money--Doh! :) 2. When entering the transaction, I enter it as a SPLIT..for example.. A purchase of 99.01 at WalMart for FOOD would be split as: Food: $99.01 Transfer : BofA Saving...

Excel automatically changes the formatting of the cell to "Time"
Hello, I have a long column of numbers [dates in the YY:DD format]. I wanted to replace ":61" to ":59". Even though the cells are initially formatted as Text, as soon as I make the change, Excel changes the formatting to Time, and the cell with the change now has text ":59:00" in it. Is it possible to force Excel to keep the cells formatted as Text? Thank you! Sam, If the cells are truly formatted as text (Format - Cells - Number - Text), the formatting should never change, and you should always see exactly what you've typed. Give us an example...

How do I change the Customized Entity icon?
Hi All, The customized entities have a default icon, any idea how to change that? Nir. Settings-->Customization-->Customize Entities. Select your custom entity in the list. On the toolbar, click More Actions-->Update Icons. Then you can browse for a suitable image. Dave "Niel100" <niryon5@gmail.com> wrote in message news:1146051234.267479.244180@i39g2000cwa.googlegroups.com... > Hi All, > > The customized entities have a default icon, any idea how to change > that? > > Nir. > ...

Publish w/o having to manually change links to get them to work
To get my web links (to my pages) to work, I have to manually type the whole url and file name to get them to work on the uploaded page. When I do this, the selected state feature no longer works. Answered in the Publisher web group... DavidF "ummibra" <ummibra@discussions.microsoft.com> wrote in message news:91940BCC-3958-4E4A-B8F6-CC97ED741887@microsoft.com... > To get my web links (to my pages) to work, I have to manually type the > whole > url and file name to get them to work on the uploaded page. When I do > this, > the selected state feature no...

how can i change the traditional chinese font to simplified chine.
how can i change the traditional chinese font to simplified chinese font in Excel 2003? ...

Pass changing values to parameter to Crystal Report scroll thru re
Hello Community In a C# and ASP.NET app I embed a Crystal Report. In the Crystal Report I create a parameter field named id. Then I read one id from a table and I pass the id from the table to Crystal Report where Crystal Report creates the report successfully. The problem is that now I am reading atleast 5 id’s each containing a different value from the table and I want Crystal Report to create a report for each one of the id’s such that the user can use the carat and scroll thru all of the reports from the first one to the last. Crystal Reports creates reports like...

Can we change line spacing in Excel? (Not row height.)
If the text is too widely spaced apart between sentences in a cell, is there a way we can scrunch them closer together similar to what we can do in a word-processing program when we change line height? Tx. :oD StargateFanFromWork wrote: > If the text is too widely spaced apart between sentences in a cell, is there > a way we can scrunch them closer together similar to what we can do in a > word-processing program when we change line height? Tx. :oD I think you mean character (horizontal) spacing, not line (vertical) spacing. I don't think you can do that with Excel. But yo...

how to redraw the bitmap in a dialog box
hello, Can someone tell how to do this since i have been struggling with it for more than 2 weeks. My application draws a series of bitmaps on the dialog box one after the other. Its something like an animation where i read the bitmaps from a file and draw each one subsequently in a specified region of the dialog box using "dc.bitblt" in a while loop in the OnPaint message handler.Everyhtin is working fine but the problem arises when i move this dialog box outside the client area of the application and then move it back in or minimise the application and maximise it again. Then the O...

Registry change after upgrade to 2007?
I had changed my Publsiher registry to allow printing of the entire mail merge file when I had Publisher 2003. We have upgraded to 2007. Must the registry be changed again? If so, does the same fix apply? Thank you! ...

Changing users Email Address, problems...
I have a user that has an email address bcastillo@domain.com. He wants his email to be billy@domain.com so I went into the AD Users & Computers and added billy@domain.com to his email addresses. I then set it as the primary, and it looked like it took it. Then twenty seconds later it changed it back to bcastillo. Any idea why this would happen? Thank you, Douglas Your default recipient policy is probably setting it back to the format specified. You can change the recipent policy or uncheck the box that automatically updates email addresses according to the recipient policy. Th...

Custom number format button
I'd like to create a toolbar button linked to a custom number format so that clicking on the button would re-format the active cell or range to my custom format. Hi Ken, Alt-F11 to enter the VBE Insert | Module Paste the following code: '===========>> Public Sub aTester() Selection.NumberFormat = "#,##0_);[Red](#,##0)" End Sub '<<=========== Alt=F11 to return to Excel View | Toolbars | Customize | Select 'Commands' tab Select 'Macros' in the left-hand Categories window Drag the smiley icon ftom the commands window to your toolbar Ri...

Tracking changes
I have an excel file that is password protected and will be shared by 5 people. I know that shared workbook and tracking changes doesn't work on a password protected file. Is there any other way of tracking changes made by 5 different people? You can't change the sheet protection in a shared workbook, but AFAIK you can share an Excel file that is password protected. Did you try it, and encounter some problems? tthomas@lcor.com wrote: > I have an excel file that is password protected and will > be shared by 5 people. I know that shared workbook and > tracking chang...

How to change location A1 cell from upper right to upper left?
My excel work sheets are showing the A1 cell in the most upper right hand corner in stead of the most upper right hand corner. It is like the worksheet is mirrored. Does anyone know how to fix this problem? Hi Doug check the settings under tools / options / international tab Cheers JulieD "Doug@Peacock" <Doug@Peacock@discussions.microsoft.com> wrote in message news:B1B950C0-9B71-42E3-B000-A3517444D999@microsoft.com... > My excel work sheets are showing the A1 cell in the most upper right hand > corner in stead of the most upper right hand corner. It is like the &g...

changing default font
i tried to instructions on http://www.publishermvps.com/Default.aspx?tabid=77 to no avail. maybe it's because the "apply" is grayed out on the change screen under modify style. another idea? Is this the tutorial you followed? Setting Text Defaults using Normal.pub by Brian Kvalheim http://ed.mvps.org/Static.aspx?=Publisher/normal.pub -- Mary Sauer MVP http://msauer.mvps.org/ "lpete" <lpete@discussions.microsoft.com> wrote in message news:944A1C33-9844-4ED9-85A6-23CEBE7E8CAC@microsoft.com... >i tried to instructions on http://www.publishe...

How to preserve CListbox contents between dialogs
In my MFC based application that shares code between PC and PocketPC I have three CListBox type objects that I want to be able to share between different Dialogs that are invoked with DoModal at different times. CListBox contents are pretty much static, but it takes a long time (especially on older PocketPCs) to initialize them with information. I wanted to Create global CListBox windows and then share them between dialogs as needed. So in InitDialog I create listboxes (WS_CHILD|LBS_NOTIFY...) if they are not windows yet and fill them with their content. Otherwise I just set the dialog as thei...

changing email addresses to firstname.lastname@example.com
Hi all, Our Exchange 2003 SP1 / Windows 2000/2003 company has email addresses in the form firstinitiallastname@example.com (like jsmith@example.com). We would like to change our email addresses to firstname.lastname@example.com (like john.smith@example.com). How can we do this while still keeping the original email address as a secondary? First names and last names are already in the Active Directory, so hopefully this can done without brute force. Do we need to change each person manually, or can we apply a policy for this? thanks Karnov Hi Kanov, In AD go to the user's profile pr...