473,385 Members | 1,542 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

how to display a number in a messagebox?

How do I display the integer in pt.x in a message box?
I get a error on parameter 2 of MessageBox call:

char str[255];
sprintf(str,"point x is %d",pt.x);
MessageBox(NULL,str,NULL,MB_OK);

Jul 22 '05 #1
3 14552
<sd******@hotmail.com> wrote in message
news:bk********************************@4ax.com...
How do I display the integer in pt.x in a message box?
I get a error on parameter 2 of MessageBox call:

char str[255];
sprintf(str,"point x is %d",pt.x);
MessageBox(NULL,str,NULL,MB_OK);


What is the error message?

-Mike
Jul 22 '05 #2
<sd******@hotmail.com> wrote in message
news:bk********************************@4ax.com...
How do I display the integer in pt.x in a message box?
I get a error on parameter 2 of MessageBox call:

char str[255];
sprintf(str,"point x is %d",pt.x);
MessageBox(NULL,str,NULL,MB_OK);


Probably:

TCHAR str[255];
_stprintf(str, _T("point x is %d"), pt.x);
MessageBox(0, str, 0, MB_OK);

If you're compiling with Unicode support MessageBox is a macro to the
Unicode MessageBoxW.

Make sure to include the correct headers (you can find them on MSDN), and
please direct further Windows questions to
comp.os.ms-windows.programmer.win32.

- Pete
Jul 22 '05 #3
On Sat, 15 Jan 2005 22:31:58 GMT, "Pete" <x@x.x> wrote:
TCHAR str[255];
_stprintf(str, _T("point x is %d"), pt.x);
MessageBox(0, str, 0, MB_OK);


Works great, thanks alot!
Jul 22 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: mo | last post by:
I'm using the query desinger in ASP.NET , however the number of records in the resultset are not displaying, so I cut and paste it into Query analyzer which is silly. How do I set this in the...
6
by: tony wong | last post by:
i wish to count number of characters in textarea box during typing in and display it somewhere in html page. so the number will increase during writing. is it possible to do it by javascript? ...
3
by: Paul Wilson | last post by:
Hi guys, Can someone tell me how i could display a messagebox in ASP.NEt. Following is what i want to do. Validate the user details, & if the user doesn't have requried access rights, then...
1
by: sunilkeswani | last post by:
Hi I am still new to access. I want to know how i can build a query which can display results from 4 different columns/fields Like. Field1 Field2 Field3 Field4 1 2 1 ...
7
by: larry | last post by:
I want to display a message to user when machine is doing background job, when the job is finished the message disappear automatically. Do I have to create a modeless dialogbox to implement it? Is...
5
by: Steve Kershaw | last post by:
Hi, I need to display a messagebox in ASP.NET that includes a textbox for input. There must be an easy way to do this! Thanks Steve
0
by: bay_dar | last post by:
I have an ASP.NET application with vb that I would like to use a confirmation box with, but only if certain conditions are met. In my case I would only want this msgbox to show up if a user entered...
4
by: Button | last post by:
Ok maybe i'm stupid because i want something really simple and can;t figure it out. I would like to display the number of records in a query on a access form. To be precise i made a database...
6
by: AhmedGY | last post by:
Hi, I'm new to C#, and doing a simple calculator application, it's completed now and calculates well, i wanna provide the interface with hotkeys so when the user press a number lets say "1" on the...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.