Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

 
 
Thread Tools Display Modes
Prev Previous Post in Thread   Next Post in Thread Next
Old Jul 13th, 2005, 7:53 PM   #1
dc2000
Newbie
 
Join Date: Jun 2005
Location: Portland, OR
Posts: 12
Rep Power: 0 dc2000 is on a distinguished road
Center MessageBox() in Win32

Hi everyone:

I seem to be stumped by the simplest -- I have a Win32 program and I need to display a message box centered by the parent window. Here's the example:

MessageBox(hParentWnd, "Message to display", "Program Name", MB_ICONERROR | MB_OK);

Well, the problem is that it is centered in the middle of the screen and it's position has nothing to do with the parent window. I stepped through the entire AfxMessageBox() in MFC, which by the way places it's message box in the middle of a parent window, and found absolutely nothing.

Can someone tell me what am I doing wrong?
dc2000 is offline   Reply With Quote
 

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 12:13 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC