dynamically created subclassed CComboBox doesnot recieve CBN_SELCHANGE in Activex Control

   Please ignore this post if a similar one appears. I posted yesterday 
and the post has not appeared on the NG yet.

That said, let me explain the problem :
I subclassed the CComboBox and am placing it on a CToolBar derivative. 
Both the combobox and the toolbar are created dynamically. I wish to 
trap the CBN_SELCHANGE message of the combobox and do some action in 
there. But the combobox doesnot seem to recieve the message (more 
precisely, the handler is never called).All this is in a classwizard 
generated MFC based Activex Control.

Here is what I do:
1. In the main COleControl derived control class of the activex, create 
the toolbar dynamically
	//create the chart tool bar
	if (!m_wndMyToolBar.CreateEx(this, TBSTYLE_FLAT,
		TRACE("Failed to create toolbar %d\n",GetLastError());
		return -1;      // fail to create
2. The m_wndMyToolBar is a CToolBar derivative
	class CToolBarEx : public CToolBar {

3. Create the combobox as the child of this toolbar
	BOOL bRet = false;
	bRet = m_wndChartOptionsComboBox.Create(
4. The m_wndChartOptionsComboBox is a CComboBox derivative and looks thus
class CChartPropsCombo : public CComboBox {
5. I add the reflection message to the combobox
    BEGIN_MESSAGE_MAP(CChartPropsCombo, CComboBox)
6. When the selection is changed the OnSelChange function is not called :(

I sifted through the google groups and found a post which said that that 
any messages from the combobox sent to the parent (the toolbar) are not 
reflected but are sent to the toolbar's parent. So I tried with placing 
the message handler in the main COleControl derivative, but no avail.

Can someone please point to what I am doing wrong here.
thank you
gangadhar npk

11/18/2003 3:42:12 AM
vc.mfc 33608 articles. 0 followers. Follow

0 Replies

Similar Articles

[PageSpeed] 49


Similar Artilces:

service calendar in MS Dynamics 4.0
Does anyone knows how we can achieve the following requirement with MSCRM 4.0 In the service calendar in MS Dynamics 4.0 you are able to create new appointments and service activities. Appointments and Service Activities which are created will be present in the Service Calendar. To see all details of such a record[Subject(default Value)] you must open it. But by moving your mouse on the concerning appointment or service activity, a text-box-view appears with primary information. With appointments the content of the following fields is displayed: 'show time as', 'subject...

dynamic resource
Hi, Anybody know how to load e.g. bitmap into resource dynamicaly? The bitmap file will be downloaded by application itself , so it has to be somehow inserted into resource and displayed. thanks What do you mean by "into resoure dynamically"? Do you want to load a ..bmp file and display it? If yes, take a look at GDI+, which is by far the easiest way to achieve this. ---------- Ajay Kalra ajaykalra@yahoo.com I misspelled this, yes I'd like to load new bitmap on the fly. But resource file looks like is static. I use ATL/MFC applicatation. "Ajay Kalra" <aja...

Dynamic sum in Chart
Hello: So I've got this pivot chart that I've created, and it's great, EXCEPT when I select different categories to show up, I want to show a SUM of the categories, not the values of each category. I would appreciate any help/advice you may have. Thank you! Michelle In the pivot table you can select different thing like count and SUM etc. If you right click in the upper left vacant square and chose field settings, then select what you want to see in your data section. Misha wrote: > Hello: > > So I've got this pivot chart that I've created, and it's great...

Tab seq dynamically...
I have a button which added dynamically to a property sheet. Now for setting the tab sequence with this new button, Am using SetWindowPos() method. Now tab sequence is proper. THE PROBLEM IS Through the arrow keys, I could not navigate to the last button for which I called SetWindowPos. where as through tab keys I could go to the last control. I will appreciate ur help in this. DETAILED DESCRIPTION I have three buttons (OK,Cancel, Help)on the property sheet. I added a button "Default" to the property sheet and positioned between Cancel and Help. I set the tab sequence as ...

Problems opening a Workbook created by Excel 2002
hi everyone can someone explain to me why i have problems opening an excel workboo created in excel 2002 with excel 2003? aren't the latest version b able to open files created by any lower version? also, i aske previously can i have 2 version of excel running and a kind sou answered my question but i already have my 2003 installed an running... how can i install the 2002 now? does that i have t uninstall 2003 first, then install 2002, then 2003...? because the sol given to me was to install them in chronological order... is there an other way out because by uninstalling 2003 first, i wou...

Create a report showing investment commissions?
Is it possible in MS Money Premium 2006 to create a report that shows the amount of commissions charged in an investment account? My broker is indicating that commissions = X and I want to see if it's accurate. Thanks, Miles In microsoft.public.money, Miles wrote: >Is it possible in MS Money Premium 2006 to create a report that shows the >amount of commissions charged in an investment account? My broker is >indicating that commissions = X and I want to see if it's accurate. Go to the Investment Transactions report. Customize for the dates and accounts you want. Right-...

Tab Control Issue
Hi-- Can anyone help with why this code causes the subform inside of a tab control page to disappear? Forms!frmPurchaseOrder!pgCurrent.Visible = True Forms!frmPurchaseOrder.Section(acFooter).Visible = True Forms!frmPurchaseOrder!pgCurrent.SetFocus Forms!frmPurchaseOrder!pgAddEdit.Visible = False At first, I had 2 subforms inside of a main form. When a button was clicked, one form was hidden and the other visible. That was causing the subform to turn completely white and become useless. I decided to try tabs thinking this might solve the probl...

SharePoint Alternate Access Mapping to my Dynamics GP BP site
Hello, If I have posted this question in the wrong forum please let me know! I’m looking for some guidance on changing the Alternate Access Mapping for my Dynamics Business Portal site. So I can implement Single Sign On via ISA Server which is supported on one web listener. Present configuration: Default Zone: http://geneva:222 I would like to add: Internet Zone: http://dynamicsbp.proclub.com I presently have another SharePoint Collection (The Main Portal) http://geneva configured which listens on Port: 80. I tried to add the Alternate Access Mapping http://dynamicsbp.proclub.com...

dynamic charting #2
Hi I have to update a weekly spreadsheet With week numbers in column B x series and three y series percentages in G,H,I columns. Could someone please help I need these to update automatically. If someone can explain in detail I would appreciate 39 2097 2165 68 1770.7 97 96.86 118.43 40 2443.15 2201 -242.15 1548.93 97 111.00 157.73 41 2162.83 2259 96.17 1600.78 97 95.74 135.11 42 2163.08 2241 77.92 1545.1 97 96.52 140.00 43 2137.5 2271 133.5 1664.6 97 94.12 128.41 44 2160.67 2298 137.33 1455 97 94.02 148.50 Ta Brian ...

Mail Merge
Hi I am the admin on the crm 4.0 environment here. Whenever i do a mail merge through outlook or through the web client i dont get the create activites dialog box. Instead i always get a pop up saying "Opening this document will run a SQL command and data from the database will be placed into your document" When i click yes to continue , I get a pop saying mail merge can not find the data source... and then two options to remove all merge info or remove data header source.. any ideas what i could do to fix this? regards Snow White ...

Advice for creating search?
Hi I am trying to plan the best way to handle the following scenario: Table tblStories has 2 fields, StoryIDNumber and StoryNarration. E.g. 234, "Once upon a time Joe was travelling to town when he saw a poodle. He then kept walking till he reached the bakery." 235, "Many years ago, Fred found a wild elephant in his back yard. The elephant was very heavy." 288, "Mary had a Doberman dog. It chased a creature with a big gray trunk." .... ... Table tblAnimals has 4 fields. Title, Description, DangerLevel and Keywords. "Elephant", &q...

Need a method to Dynamicly change the X axis Scale on a chart. #2
I dynamically change the amount of data on a chart. This causes the X axis Scale to either to either show too few values or too many values ( a solid black line if too many). I would like a method to dynamically change the scale values in relation to the data span. Joe - Do you want to limit the number of points displayed? http://peltiertech.com/Excel/Charts/Dynamics.html http://pubs.logicalexpressions.com/Pub0009/LPMArticle.asp?ID=246 Or do you want to link the axis scales to something you calculate in the sheet? http://peltiertech.com/Excel/Zips/SwitchXYAxes.zip - Jon ----...

How do I create a double sided postcard
I am creating a graduation announcement. One side has all the details. On the other side I wanted to be able to type in my return address, so all I would have to do is address them and stamp them. How can I do this? Open the file; now do an Insert, Page. You now have a second page which is the back side of your postcard. -- Don Vancouver, USA "Meghan" <Meghan@discussions.microsoft.com> wrote in message news:EF24C43E-487B-4932-B1BD-74B7EAECF87D@microsoft.com... >I am creating a graduation announcement. One side has all the details. On > the other side I want...

Dynamically populate a drop down list
Hi, I'm trying to dynamically populate a drop down list in MS CRM (1.2) based on certain parameters. I suppose I could do it using a SQL stored procedure, but I would prefer to use standard/supported CRM customizations. Any assistance in this would be greatly appreciated. Thanks! -Dave- Dave, You can do it in 3.0 pretty easily based upon an example in the SDK... Here are some pretty pictures... http://blogs.msdn.com/midatlanticcrm/archive/2005/12/04/499868.aspx I have not tried it with 1.2, but it could probably work... Thanks Ben "Dave" <renor321@yahoo.com> wrot...

How do create a basic line chart using Excel?
I am trying to create a basic 2 dimensional line chart using the following data: X-axis Y-axis DATA DATA "Rating" "Time" "Rating" "Time" 5 02:00.0 5 02:00.0 4 02:04.7 5 02:08.6 3 02:09.5 4 02:17.2 2 02:14.2 4 02:19.1 1 02:18.9 4 02:28.0 02:23.7 4 02:28.2 02:28.4 4 02:29.2 02:33.2 4 02:33.1 02:37.9 3 02:36.9 02:42.6 3 02:41.2 02:47.4 3 02:42.1 02:52.1 3 02:44.2 02:56.8 3 02:48.8 03:01.6 3 02:48.9 03:06.3 3 02:50.6 03:11.1 3 03:00.2 03:15.8 3 03:02.9 03:20.5 3 03:04.9 03:25.3 3 03:05.7 03:30.0 ...

Create an SMTP connector that uses authentication to 'smart host'
Let me just say this right out of the box; there's a lot of things in 2003 that seem to really suck compared to 2000. I just spent hours trying to delete all messages in the outbound smtp queue because there is no longer an option to just click on the 'queue' folder and select 'delete all', you have to go domain by domain searching for files and deleting them individually etc. LAME. I finally figured out a way to make them all end up in the same location so that if someone sends another 3 meg email to a thousand people, I can get them all in one shot, but I can't use it...

CRM Integration with MBS/Dynamics products
Hi, Anyone know anything about the integration between CRM 3.0 and ...say.... Dynamix AX/Axapta? I'm thinking sharing of customer data and such.... Jeppe Jespersen Denmark There is nothing available yet. You would need to build it. -- Matt Parks MVP - Microsoft CRM "Jeppe Jespersen" <jdj curly jdj dot dk> wrote in message news:OAfVImWLGHA.3276@TK2MSFTNGP09.phx.gbl... Hi, Anyone know anything about the integration between CRM 3.0 and ...say.... Dynamix AX/Axapta? I'm thinking sharing of customer data and such.... Jeppe Jespersen Denmark ...

Dynamics GP 10 and Dynamics AX 4.0
just a half year ago, our company has started to work with Dynamics AX 4.0. Now i am doing some programming in X++ and almost customizing reports. Accidently, i stumpled on Dynamics GP 10.0 and i am wondering what s the difference between AX and GP? What stands GP for? Maybe GP is to replace AX, and our company backs to wrong horse? Does GP 10 contains AX 4.0? I have learnt lot of X++ programming, would it be possible to using X++ in the GT 10 field, too? Great Plains (GP) is another ERP system that Microsoft acquired a few years ago when it acquired the company of the same name. GP ...

Can't open XLS file I created
Window XP Sp2 - MS Ofc 2000 / Excel I created a list in Excel by doing a copy/past from a web site. (List of name, address, phone, website) I did a save when done and then tried to disable all the hyperlinks on the page. Followed directions I got off the web, F11/Macro to remove hyperlinks. I closed and saved and then when I tried to re-open it but got the following error msg: 'The workbook contains a type of Macro (MS Excel ver. 4 macro) that cannot be disabled nor signed. Therefore, this workbook cannot be opened under High Security Level.' This is all Greek to me, please help s...

Dynamic Range
Hi All, I have the following two dynamic ranges =OFFSET(PBR!$A$1,0,0,COUNTA(PBR!$A:$A),1) =OFFSET(PBR!$A$1,0,0,COUNTA(PBR!$A:$A),2) Note: there will be two ranges namecount & namelist The formula which would be using the above range is =IF(MAX(namecount)<ROW(1:1),"",VLOOKUP(ROW(1:1),namelist,2)) Big question!!!, can I join these ranges together in to one statement. if so than how ??? Thansks, Rashid Hi! If I follow what you want: Named range: List Refers to: =OFFSET(PBR!$A$1:$B$1,,,COUNTA(PBR!$A:$A)) Then: =IF(MAX(INDEX(List,,1))<ROW(1:1),"",VLOOKUP(R...

dynamic menus
I want to be able to create a hierarchy of menus under the view menu. I don't know at design time how many items will be under each submenu. I have been able to access and add to the view menu itself. By I have not been able to add anything under that added menu. I know it shuold be a popup menu. but when I make it a popup, I get an assert when I try to open the view menu. Here's what I have so far (some experimentation still remains): m_pWndMenu = GetMenu(); //int count = m_pWndMenu->GetMenuItemCount(); //CString string; //m_pWndMenu->GetMenuString(2, string, MF_BY...

Creating Alias to MX record???
Hello, My question is I am trying to allow people to access their business email from remote locations. I created an MX record (IP based) via Exchnage Server; so, what users currently do is open their browser and type in the ipaddress/exchange. then a box will open for them to input their username and password. What I want to happen is instead of typing in the IP address everytime, I would like users to type the following: http://mail.nmwa.org/exchange versus http://XXX.XXX.XXX.XXX/exchange. Can anyone help me out? Thanks, Devin You need to register a FQDN. You probably cannot use mai...

Can I create a golf handicap calculator
Has any one already created one and can I get a copy of it Doug, I've never seen, or heard, of an existing template for golf handicapping. You might try your local amateur golf association. In Northern California that would be the NCGA. If you find one, please post back. I'd very much like to see it. -- Sincerely, Michael Colvin "Doug B" wrote: > Has any one already created one and can I get a copy of it ...

Dynamics Workflow windows in Dynamics
Hi there I have installed Dynamics Workflow for Dynamics version 10 successfully. I have created a simple Purchase Order workflow. I have clicked the Activate Workflow button in this company. However when the users capture a Purchase Order it does not have the additional workflow compnonents on the Purchase Order window e.g. Submit etc. I have logged out and back in again. What am I missing? Regards Robin The workflow functionality in GP 10 requires the deployment of MOSS 2007 (Enterprise Edition). Not a trivial thing. "Robinv" wrote: > Hi there > > I have ...

Creating a dynamic chart
I posted here a few days ago and was given some ideas on how to do this. However, I seem lost. I have a main worksheet which is updated from several worksheets by using code. On this worksheet is approximately 15-20 columns something like this. trimester year RW RW% WIW WIW% etc 1st 2001 80 89% 79 75% 2nd 2001 90 89% 84 87% 3rd 2001 87 88% 92 89% 1st 2002 88 88% 90 88% etc etc What I would like to do is create one chart and by selecting the title of the column from either a combo box or by using a bu...