Newbie needs help for programming in MFC for Windows CE.

See i want to create a program where i have a dialog box with two
editboxes and a button called "Add" .My edit boxes should accept
integer values and my 'Add' button must add those two values.I had
already created a code where i can enter a string into an edit box and
get it dispalyed through a message box in pocket pc 2003 .Now i tried
declaring two integers and using GetDlgItemInt to read those integers
from the editbox and get it displayed in a message box in the same way
as above but cant get my code to work,am i wrong in doing so,pls pls
help me out......i am using Evc++ 4.0 and pocket PC 2003 emulator.thanx
in advance.


void CAddDlg::OnButton1()
{
int a,b,c;
GetDlgItemInt(IDC_EDIT1, a);
GetDlgItemInt(IDC_EDIT2, b);
c=a+b;
MessageBox(c);
}

0
1/17/2006 11:29:41 AM
vc.mfc 33608 articles. 0 followers. Follow

0 Replies
346 Views

Similar Articles

[PageSpeed] 45

Reply:

Similar Artilces:

Need help with http://support.microsoft.com/?kbid=212686
I am trying to use the KB article at http://support.microsoft.com/?kbid=212686 to increment an Invoice number automatically. I am confused about where they want me to put the code. They make refference to storing the code in a "Protected form template" I don't know what this is. Can someone please help Thanks That's for Word isn't it. Try John's solution at http://www.mcgimpsey.com/excel/udfs/sequentialnums.html -- HTH RP (remove nothere from the email address if mailing direct) "John" <anywhere@s.com> wrote in message news:OwiWKS0pFHA.1948@...

Program Ambassadorship
Old Integrator-DNS//browers 95-98 manuel/old fashion way read don/t write my personal and business and private foundation web Maybe appearence commerical design may leave domain to real time owners still with all the bugs- another divide ? Don't think so, need fixed real bad. to go out and buy a whole brawser is nuts or could take some more time with reference ? not welcome any suggestions ...

Newbie, accnts. payable & accnts.receivable sample DB
Hi guys, I�m running access 2003, windows xp pro SP2 I've been commission in my work to do a small application to track and report the accounts payable and accounts receivable movements, I'm not an accounting savvy person :(, does anyone know of a link or sample access database that can help me with the basic structure of the tables and reports?, any help would be greatly appreciated. Thanks ...

I need help to display a dialog from a resource-only DLL
Hi, I created a resource-only Dll to store string, dialog, icon and bitmap. With loadstring function i can load a string from this dll, but i don't know how dipslay a dialog from it. here is my code : UINT CDataResource::GetResourceDialog(int ResourceID) { // load resource LPCDLGTEMPLATE lpDialogTemplate = NULL; HGLOBAL hDialogTemplate = NULL; HINSTANCE hInst = AfxFindResourceHandle(MAKEINTRESOURCE(ResourceID), RT_DIALOG); HRSRC hResource = ::FindResource(hInst, MAKEINTRESOURCE(ResourceID), RT_DIALOG); hDialogTemplate = LoadResource(hInst, hResource); if (hDialogTemplate != NULL) ...

Help needed in print
hi I am displaying lot of labels and progress bars in side form view. I want to print all the label and progress bar as it looks in the form view. thanks in advance with regards Harish Harish, You might be interested in Joe Newcomber's site, here: http://www.flounder.com/mvp_tips.htm#Bitmap%20series where you'll find code for screen copying and bitmap printing. Johan Rosengren Abstrakt Mekanik AB "Harish" <harish.k at sify.com> a �crit dans le message de news:OCcSb3u5DHA.2580@TK2MSFTNGP11.phx.gbl... > hi > > I am displaying lot of labels and progress...

Visio Newbie
Hello all, this is my first time using Visio for drawing a floor plan and I have a quick question. Yesterday, (Using a tape measure) I mapped out the floor plan of an office my company might be moving into. I wrote everything down in Inches. Is there a way once I get a room shape kinda close to teh measurements, that I can manually type in teh length for each wall? if not in inches, at least in feet. For example, I have one wall that is 154 inches ( 12.83 ft) Then the next wall is 242 incehs( 20.1 ft) The opposite wall of the first measurement is 288 inches, third wall 100 inches, then 13...

C++ / Access Newbie
Hi Folks... I have a small commercial package written in C++ (targeted to Windows platforms) that uses its own proprietary database. We are just starting to investigate the option of replacing our database with a commercial package, such as Access or MySQL. Can anyone recommend informative reading that provides details on programming C++ with either of these two databases? At this stage we have no (any I mean ZERO) experience such programming. Any information would be helpful: recommendations for Access over MySQL (or vice versa), sources of such comparisons, licensing considerations, OD...

Exchange newbie problem
Hi all; A user on our domain was deleted when he should not have been. His mail box was not deleted. When his account was recreated, we tried to reconnect the old mailbox. But when selecting a user in the "Select a new user for this mailbox" dialog a message comes back saying that the user cannot be found. We tried several different users a none can be found even though they can get there mail just fine. We need to get the messages from this mailbox. Any ideas would be great -- Craig in the High Desert. craig@craignet.com But it's a dry heat. you should be able to reconnec...

Auto-scroll in the Word window
Hi all, Does anyone here know whether it is possible have the Word window auto-scroll (by vba)? I'm asking this is because I woule like to keep looking at the same position all the time while typing, so there are always, let's say 10 (or any other number to be set) lines above the cursor automatically. Cheers, Shirley Nomey "Nomey" <newsgroups@nospam.invalid> wrote in message news:qQI1n.34304$%54.11941@newsfe22.ams2... > Hi all, > > Does anyone here know whether it is possible have the Word window > auto-scroll (by vba)? I'm asking this...

accessing autosaves after closing program?
Recently I’ve managed to close a few documents (excel and word) without saving them. Not very clever I know. I know as you are working in these programs you can autosave, which saves the document in a temporary file. But when you close a document the temporary file gets deleted / is not obviously accessible. 1. is it possible to access these so I could open the last autosave? Or 2. is it possible to change some setting / autosave location so these autosaved files are available after I close the program? Actually, autosave just overwrites the file in place but it has to be saved at least...

Jscript Assistance Needed
Hi We need to auto calculate what percentage of the damaged amount has been recovered.We manually calculated that the field named Percentage equals the Recovered Amount divided by the Damaged Amount multiplied by 100. We wrote the following Jscript; crmForm.all.new_percentage.DataValue = crmForm.all.new_recoveredamount.DataValue / crmForm.all.new_damagesamount.DataValue * 100 to do this for us. After using the OnSave event, we continue to receive an error stating that ' This control only accepts strings or null as an input'. I am not sure where I am going wrong and would real...

Freight allocation to Inventory cost
Landed cost does not work for our company. We need the ability to apply an average Freight cost or a percentage to every item in inventory at the time it is received in. The cost could be applied by the weight of the product or a simple % increase. ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" button in the message pane. If you do not see the button, follow this link to open the suggestion in the Microsoft Web-based Newsreader and then click "...

Help with Excel ActiveX listbox controls
Hi! I�m trying to create listboxes that displays data from a named range spanning multiple columns. I am able to populate the listbox with data and use it without any problems. However, if the sheet that contains the listboxes changes, the size/dimensions of the listbox unexpectedly also changes. Since I have not written any procedures that control the height/width properties of the listboxes, I cannot determine why the dimensions of the listboxes are changing. I have attached a spreadsheet that illustrates this problem. When you open the spreadsheet, you should see two listboxes named Lis...

Basic installation program
Hi to all, I need a basic installation program that is easy to use and to understand and that has the ability to: - package files; - create directories; - create shortcuts; - register itself in the "Add or Remove Programs"; - uninstall. Do you have any suggestions? Thank you in advance. Johnny >I need a basic installation program that is easy to use >and to understand and that has the ability to: >- package files; >- create directories; >- create shortcuts; >- register itself in the "Add or Remove Programs"; >- uninstall. > >Do you have any ...

Need help finding the right function, please
The cells in Col A contain one of four values. The cells in Col D contain dates. I want to return the highest date for each of the four values. I'm having a difficult time understanding how the different look up functions work to allow me to get =(MAX(all dates in Cold D where Col A = "x")). The Help files for both LOOKUP and VLOOKUP indicate the values in the column to be searched must be sorted in ascending order. That can't happen in this sheet. I'm stuck with them as they are. A drop-kick in the right direction would be much appreciated!! Ed Try =MAX(IF(A1:A...

newbie
joining the group Hey Newbie where are you from and what versiona re you using? Fliehigh "cthomas23@hotmail.com" wrote: > joining the group > ...

HELP: Sheet embedded comboboxes
Hi all, I am assisting somebody with their excel project and they have a sheet with comboboxes in it. When a value is selected, it populates cells underneath, however when the data is freshly loaded, the cell underneath is given the value but the combobox does not update to this value. I have tried to click on the box to edit it, however no matter how many times i click i cannot seem to get it to recognise i've clicked. In other words, the resizing box does not come up and i have no right-click menu. All i can do is select from the drop down list without any editing of the proper...

Using OLE DB in MFC Project
Hi, I have developed an MFC application. I now want to add database functionality to it. I have had a look at the various database technologies and have decided to try using direct OLE DB rather than ADO as it is faster. However I have noticed that in tutorials it is recommended to use the wizards in an ATL project. As i have said before my application has been written in MFC. I was wondering how easy it is to add direct OLE DB to my MFC application. I would appreciate suggesstions on how i can manage this, Thanks In Advance Macca ...

Codes needed to update wages
Hi, Column A of Sheet1 holds the identity numbers of about 200 casual members of our staffs. Column F shows their current weekly wages. I need a simple macro that allows me to update the weekly wages for some of these members by 4.5% from a list of their identity numbers shown in Column A of Sheet2. Any help is much appreciated. TIA Tom Here one shot at it: Sub payBoost() Dim lr As Long, sh As Worksheet, rng As Range Dim fRng As Range Set sh = ActiveSheet lr = sh.Cells(Rows.Count, 1).End(xlUp).Row Set rng = sh.Range("A2:A" & lr) Set...

Need expert coding help with a debugging issue.
I've got a piece of code in a form on my front end db that updates a record in a table based on certain criteria. My problem is that this code seems to have a flaw in it that allows multiple instances of this code, running on different machines, to access the exact same record in the table, if the following conditions are met: 1. The code is executed at the exact same time 2. The record being updated in the target table has no current value The table has three fields: Bin Number, Vendor Name, and Count. My problem is that when Vendor Name is empty when the code is run by two users a...

Need to seperate alpha numeric data in a cell
I have a number of cells that contain words and numbers. How can I ge rid of or seperate the numbers form the data. e.g Cell A1 contains - Bridge Terminal 123456 I need to just get 123456 Please note numbers can be anywhere in the data and are differen lengths. Thanks in advance Andre -- Message posted from http://www.ExcelForum.com I think you need a user defined function (UDF) for this. Go to the VB editor, insert a new module and enter the following: Function OnlyNumber(xstrIn) Dim i As Integer Dim strReturn As String For i = 1 To Len(xstrIn) If IsNumeric(Mid(xstrIn, i, 1)) Then st...

need a macro...
hi am i the need of a mactro My requirement is to check whether the review sheets are complete.Certain columns should be filled after review,both by the reviewer and the one whose work is being reviewed. my input is an excel sheet with a column containing the name of the review sheets. My macro should open these sheets one by one and check whether those columns are filled properly,if not indicate by some means. to automate the manual checking whether the review sheets are completely filled... can anyone help in this ...

Help with calculation #3
On sheet2 I have a list of dates where A1 is 01 Jan 2004, A2 is 01 Feb 2004 etc through to 01 Oct 2005, against each date is a column of figures. So A1 is the date and B1 is the volume. On sheet1 I want to have a formula that will calculate the total volume between 2 dates selected by the user, where D7 is the earliest date and D9 is the latest date. So after they have input the dates the volumes between those dates will be totaled and shown in E10.(They will only be able to input dates for the 1st of the month - so as to match the data held on sheet2.)As you appreciate there will be more tha...

Real Newbie newbie question
Hi All - I hope you can help me! I have Finepix M603 camera and although I take reasonable shots in daytime, I'm not able to produce anything at night. eg On The Thames on New Years Eve, may people were using digital cameras and their screens should clear bright picture - mine was black! What setting should I set on mine? Any advice really appreciated. --- David Scott Hampshire, England Wrong group. Sorry....... -- --- David Scott Hampshire, England "Dave" <cadasco@SUPERhotmail.com> wrote in message news:50kuejF1fh28sU1@mid.individual.net... > Hi All - I hope...

Change external drivenames in Windows 7
How does one change the names of external drives in windows 7? I renamed the drives in computer management, and they appear with the new names whenever I bring up computer manaagement. But elsewhere, such as Computer in the start menu they appear with the default "pendrive". I made the changes (in computer management) logged in as administrator (I think). This is a Windows XP newsgroup. Try: Windows 7 forums http://social.technet.microsoft.com/Forums/en/category/w7itpro/ "bob525" <bob525@comcast.net> wrote in message news:heWdnQ9JCt6IhJrWnZ2...