Subclass Help

During the desing of my app, I realized that I would need to have a combobox 
with a set of pre-defined values (collected from a database). This combobox 
will be used in many dialogs and for that, I decided to derive my own class.

I want the combobox to be populated when created, but I can't figure out how 
to make it work with DDX. If I "create" it manually, I can do this in 
"OnCreate," but I'm attaching to a dialog. I don't know what gets called 
when DDX does the attaching. Any ideas? Thanks in advanced.

Eddie.


0
drpazz (112)
8/1/2005 1:45:17 AM
vc.mfc 33608 articles. 0 followers. Follow

2 Replies
809 Views

Similar Articles

[PageSpeed] 16

"Eddie Pazz" <drpazz@hotmail.com> wrote in message 
news:%23wzGuqjlFHA.2916@TK2MSFTNGP14.phx.gbl...
> During the desing of my app, I realized that I would need to have a 
> combobox with a set of pre-defined values (collected from a database). 
> This combobox will be used in many dialogs and for that, I decided to 
> derive my own class.
>
> I want the combobox to be populated when created, but I can't figure out 
> how to make it work with DDX. If I "create" it manually, I can do this in 
> "OnCreate," but I'm attaching to a dialog. I don't know what gets called 
> when DDX does the attaching. Any ideas? Thanks in advanced.
>
> Eddie.
>
>

Checkout the CDataExchange class and perhaps the VIEWEX sample from MSDN. 
These should get you started in the right direction for creating your own 
DDX/DDV routines.

-- 
============
Frank Hickman
Microsoft MVP
NobleSoft, Inc.
============
Replace the _nosp@m_ with @ to reply.


0
8/1/2005 3:52:22 AM
Thanks for the reply. I found that PreSubclassWindow is what I was looking 
for.


"Frank Hickman [MVP]" <fhickman3_NOSP@M_noblesoft.com> wrote in message >
> Checkout the CDataExchange class and perhaps the VIEWEX sample from MSDN. 
> These should get you started in the right direction for creating your own 
> DDX/DDV routines.
>
> -- 
> ============
> Frank Hickman
> Microsoft MVP
> NobleSoft, Inc.
> ============
> Replace the _nosp@m_ with @ to reply.
>
> 


0
drpazz (112)
8/1/2005 6:13:59 AM
Reply:

Similar Artilces:

xquery help
(:// start/stop trace:) (: for $x in doc ($doc_name)/ProcessValueTrace/Trace, $y in $x/StartTrace, $z in $x/StopTrace return <Trace> { $y } { $z } </Trace> :) (: open/close logical link by name - input $logicallink_name :) (: for $x in doc ($doc_name)/ProcessValueTrace/Trace, $y in $x/OpenComPrimitive, $t in $x/CloseComPrimitive where (some $z in $y/LogicalLink satisfies contains($z, string($logical_link_name))) and (some $z2 in $t/LogicalLink satisfies contains($z2, string($logical_link_name)) ) return <Trace> { $y } { $t } </Trace>...

Help needed with two problems
#-1 When addressing envelopes, I have double line spacing instead of single - could be an extra paragraph space but I don't see the normal paragraph mark. Problem is that the last line on a long address is cut off. #-2 When importing documents for editing whenever I try to bold, italicize or indent a word or paragraph the whole document is affected; when I hit the redo button the document repairs itself and leaves the desired formating intact. God forbid you should hit the save button before the redo because the whole document is forever changed. Very klutzy. Thanks for any help...

Help!!!... exchange error I can't figure out
Hi I am getting this error every minute in my application log on the exchange server I can see mail boxes etc, but I can't send or receive mail This has been going on for a week already. I even reinstalled exchange, but it did not fix it. I am at the end of my rope here. Please help!!!!!! The MAPI call 'OpenMsgStore' failed with the following error: The attempt to log on to the Microsoft Exchange Server computer has failed. The MAPI provider failed. Microsoft Exchange Server Information Store ID no: 8004011d-0512-00000000 I've recently read something about this looki...

Help in SQL statement
I would like to know if there Sql Query to convert the quantities of Parent item to be Single item , i would explain it with an example single item Itemlookupcode is 123456 and Qty 1 Parent item (outer pack of single item) like 6 cans of cola drink forms a pack which can be sold as single as well as pack item Itemlookupcode 123456-06 Qty 2 I need an sql query to produce result like 123456 QTY = 13 and 123456-06 Qty =0. Formula = Qty of Single item + Number of pieces in a single pack * Qty of parent item it would be great help that if it would be possible in sql ...

Attachement Issues
Please help: I am running Outlook 2002. When I send email with attachments the email does not move from my 'Outbox' to my 'Sent Items' folder, causing the email to be sent multiple times. This does not happen with normal emails. My recipients are receiving multiple copies of the same email and I have no idea what the problem is. Any assistance is greatly appreciated. Jeremy. Does this still happen when you disable the outgoing virusscan? -- Robert Sparnaaij [MVP-Outlook] www.howto-outlook.com Tips of the month: -Backup and Restore -Create an Office XP CD slipstreamed...

SOP HELP!!
I am using GP 9.0 and just started researching the SOP module. I have an invoice that I want to bill for non-inventoried items. However, on this same invoice there are some deductions I want to take off the invoice and code it as an expense. It is for labor. I don't have any idea on how to do this because in the distribution screen when I change the type to OTHER or MISC - it gives me error messages on the edit. Does anyone have any idea on how to do this? Is this possible? Thanks for any input. Barb First of all, you need to understand what the distribution types mean. ...

Help with buttons
How do I disable buttons within the program. That is ghost the button and not allow it to be selected till a certain action has occured? Also how do I change the default button also within the program? Bob m_BUT.EnableWindow(FALSE); -- where m_BUT is control type var. for your button. -- playwin "Bob Parr" <rparr@parrstreet.com> wrote in message news:u66rRl8CFHA.3888@TK2MSFTNGP09.phx.gbl... > How do I disable buttons within the program. That is ghost the button and > not allow it to be selected till a certain action has occured? Also how do > I change the de...

Help #27
I have downloaded a program called "Incredimail". It was great, but now I got difficulties as I need to go back to Microsoft Outlook for business matter. Anyone could help how to transfer my old message from "Incredimail" (ext. imm or something like that). Another thing, how to move the message from "Hotmail" Folder to the Personal Folder's Inbox without moving each message one by one ? Thanks .. ...

Subclassing
Hello, Im very new to c++ programming so pardon me if this is a dumb question and my bad english. I made a subclass from CListBox. I want to handle all the list controls derived from this class on one function, for example, void CListBox_SC::OnRButtonUp(UINT nFlags, CPoint point) { ..... } on this function I want to manage the OnRButtonUp event, and with a switch or if statement, select the code to execute. The following does work: SetCurSel(ItemFromPoint(point, ifp)); but the following comparison is never true, (IDC_LST_TIPO is a resource for one of the ListBoxes) UINT currLst = It...

Charting 3 columns help
I am working on a staffing chart with three columns: Staffing Time Incident 6 3 1234 15 9 1234 I would like a graph to show the "Time" on the left the "Incident" on the bottom and Staffing in the chart I have racked my brain and have not figured out how, to make the chart work that is :o) Do I need to re-arrange the columns? a different way? Any help would be greatly appreciated. Steve In your brief sample, Incident has no variation. How do you want staffing to appear in the cha...

Help with Sorting...
Hello - I need to have Excel sort the following example of cells: 10-10 Apple 3 10-11 Pale Apple 2 10-12 Pale Apple 1 10-3 Garden Hedge 10-4 Silver Birch 2 10-5 Silver Birch 1 10-6 Pale Birch 1-1 Milk Sugar 1-10 White Mint 1-11 Icicle 11-10 Apple 11-11 Pale Moss 2 11-12 Pale Moss 1 1-12 Morning Frost 11-4 Olive 3 11-5 Olive 2 11-6 Olive 1 1-2 Natural White etc... to something like this (small to large): 1-1 Milk Sugar 1-2 Natural White 1-10 White Mint 1-11 Icicle 1-12 Morning Frost 10-3 Garden Hedge 10-4 Silver Birch 2 10-5 Silver Birch 1 10-6 Pale Birch 10-10 Apple 3 10-11 Pale Apple 2 10-...

help 07-13-10
This is a multi-part message in MIME format. ------=_NextPart_000_0038_01CB229F.3BC3E730 Content-Type: multipart/alternative; boundary="----=_NextPart_001_0039_01CB229F.3BC3E730" ------=_NextPart_001_0039_01CB229F.3BC3E730 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable call me asap ------=_NextPart_001_0039_01CB229F.3BC3E730 Content-Type: text/html; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> ...

Formula Help #48
=IF(B3="ALL",SUMPRODUCT(--(G18:G3000=C3),(J18:J3000)),IF(C3="ALL",SUMPRODUCT(--(H18:H3000=B3),(J18:J3000)),IF(B3="ALL",IF(C3="ALL",SUM(J18:J3000))))) The first two parts of this formula work fine. If B3= all or if C3=all, I get the desired result, but if I want both cells to = all then I get $0.00 for an answer. HI Jim Try it like this =IF(AND(B3="All",C3="All"),SUMPRODUCT HTH John "JimS" <jimx22@msn.com> wrote in message news:9sjfn4l3od448148pp7mt0mfq3ck7saa8e@4ax.com... > =IF(B3="ALL",SUMPRODUCT(--(G...

Help......
Hi All, I have 3 seperate excle(Crystal.xls, AMETITSG.xls, ITSGAsia.xls). If any data added in Column A of Crystal.xls and any data added in column D of AMETITSG.xls should be automatically added in Column A of ITSGAsia.xls TIA Kiran, Use one workbook, with one database, with an additional column to show whether the data is Crystal or AMEITTSG or whatever, and use data filters or custom views to show the set off data you are interested in for each. Any other solution is a waste of time and will likely fail over time. HTH, Bernie MS Excel MVP "kiran" <kiran@discussions.mi...

pivot table help #8
Hi, I have a pivot table with following fields: Product, Party, Qty, Rate, Amt Product, Party are row fields, Qty, Rate, Amt are Data fields Everything works fine in the pivot table, and Qty, Rate and Amt have their own subtotal rows. I just want the Rate to have a weighted average. Lets say Hydrochloric Acid (Product) - Party1 - Qty:4 - Rate:100 - Amt:400 - Party2 - Qty:8 - Rate:90 - Amt:720 The subtotals for this row appear as: Subtotal: Qty:12 - Rate:190 - Amt:1120 Qty:12 is correct because qty is 4 and 8 bottles that is 12 Amt:1120 is correct because 400+720 = 1120 But Rate sub...

How to record cash expenditures?? Help?
I'm a new user, so forgive me if this is obvious, but how do I record where I spend cash money? I've downloaded all my bank transactions and labelled them, and that's fine, but I'd like to figure out where the money from "Cash Withdrawls" goes by entering my daily spending from receipts and such. There doesn't seem to be a way to do this... I'm confused about creating a "Cash Account" as one thread suggested, because this is the money from ATM withdrawls, not new income, and I'm concerned treating it like income into a new account is going ...

Lookup / Match help ???
Hi, I have workbook down loaded from a training program and I would like to post the date under a header for this person if he/she has taken this certian training. I want to have this in a different workbook but link to the training download book. TRAINING DOWNLOAD: A B C D E F G 1 SS# JOB# LNAME FNAME TRAINING DATEASS DATECOMP 2 the data for above header names in rows 1-7137 ALL THE DATA IN THIS FORMATE, 7137 ROWS. Each person will be listed many times but with different training names. Now on my sheet I...

Error Message Help!
I have a new Dell 8400; XP Pro; came with no security subscription except the 6 month McAfee Suite trial. My company gave me a Networks Associate Virus Scan 7.0 CD. After the install I realized I need to be connected to our network for the outgoing e-mail scans with Outlook to work. I uninstalled the Microsoft Exchange / McAfee Virus Scan and the 6 month trial provided by Dell. I purchased Norton Systems Works 2005. All is well except when I open Outlook the fhe Error Message indicates: "The add in c:\program files\network associates\virusscan\scanemail.dll could not be instal...

Customising HELP!!
My Quantity Report looks like this - i cannot find a couple of the columns i need, can somebody help with how i should customise this? I have tried to the best of my ability but it just results in errors! I need the 'QTY on Order' 'Last ordered' 'Last Sold' and'Last Received' columns to be on, any pointers would be hugely helpfull! Is there such thing as one report which has every single colum/possibility turned on so you dont need so many different reports all the time!!!? //--- Report Summary --- // Begin ReportSummary ReportType = reporttypeItems ...

help 12-02-07
help On Sat, 1 Dec 2007 18:05:59 -0600, "James Cervantes" <jkhone@verizon.net> wrote: >help "Doctor, I don't feel good. What should I take?" If you have a question about Microsoft Access ask it here. If you have a question about other Microsoft software scroll down the list of newsgroups and ask it in an appropriate newsgroup. John W. Vinson [MVP] ...

HELP! how to turn off synchronization log messages?!
I have outlook XP on win2k, and my deleted items folder is being filled by "synchronization log" messages at the rate of 1 per minute. Where is a setting in outlook where I can disable/change that? Thanks! Rather than trying to turn off the symptom, perhaps you should look at the logs to see what the problem is? Aaron wrote: > I have outlook XP on win2k, and my deleted items folder is being > filled by "synchronization log" messages at the rate of 1 per minute. > > Where is a setting in outlook where I can disable/change that? > > Thanks! There is...

Custom Drawing CEdit : Subclassing
Hello experts, My objective is simple, but I'm not entirely sure what needs tweaking. I am using MSVC 6, and I would like to subclass the CEdit box so that it appears as the color-picker editbox of a PropertyGrid. There is a color box followed by three values. Like this: [###] 255; 192; 192 Where ### is just a color box representation of the value. So thus far, I've made a masked CEdit box, where I can edit the numbers (or click a button that visually sets the numbers from a different window), and I'm happy with that - but what I would like to do next is to subclass the dra...

Macro Box Help
Hello all, I have created a box with a macro assigned to it that will highlight the cells that have changed from one tab to the other. When I click on this box the macro runs but I would also like to be able to click it off. Could someone please help me with this? I have copied the code below that has been used so far in case that helps. Thanks. Sub auditt() Dim sh1 As Worksheet, sh2 As Worksheet Set sh1 = Sheets("Original") Set sh2 = Sheets("Final") For Each r In sh1.UsedRange v1 = r.Value rr = r.Row cc = r.Column v2 = sh2.Cells(rr, cc).Value If v1...

Help with subclassing a RichEditCtrl
Hi folks, I could use some help. As a side project I am trying to write a DLL that will extend the functionality of an existing application that I do not have source code for, i.e., some autocompletion functionality, word lookup, etc. In the actual DLL, I am going to have to inject it into the existing app and then use FindWindow or something like that to subclass the existing RichEditCtrl. I need to be able to process the WM_CHAR and WM_KEYDOWN messages only. I started out by creating my own sample project using a RichEditCtrl in my project to code my object. I've now moved everythin...

HELP ALSO!!!
I have been using Outlook from Office 2K and all of a sudden when I try to get to it I get "Microsoft Program has encountered a problem....." and I can't get the program to execute. I have tried system restore, reinstalling, repair, run virus scans ...you name it nothing works. I also have Outlook Express running and that's OK. I am running XP Pro. Does any one have any idea how I can save my mail logs and address book if I delete the current version and do a fresh install? Have you tried running the install disk and doind a repair or reinstall? That should work and you wo...