How do I display a dialog whilst in OnInitDialog ?

I have a program which pastes a bit of information (read from a config 
file) into a listbox whilst in the OnInitDialog part of the program. The 
program then 'acts' on the data and part of it will change depending on 
those actions (network activity, so takes a few seconds).

What I want the program to do is display the original data, then change 
the display to the new data, but at the moment it won't display the 
program until it's finished with the OnInitDialog part of the program, 
so you don't get to see the original data. All you see is nothing for a 
few seconds, then the program starts and displays the second lot of 
data.
Is there any way I can force a screen update before the program goes 
into it's second phase ?

Any help appreciated !


-- 
Phil
0
phil6704 (8)
11/29/2003 9:27:02 PM
vc.mfc 33608 articles. 0 followers. Follow

2 Replies
513 Views

Similar Articles

[PageSpeed] 31

"Phil" <phil@phil.com> wrote in message
news:MPG.1a331f833c4c7d5b9897c6@text.news.ntlworld.com...
> I have a program which pastes a bit of information (read from a config
> file) into a listbox whilst in the OnInitDialog part of the program. The
> program then 'acts' on the data and part of it will change depending on
> those actions (network activity, so takes a few seconds).
>
> What I want the program to do is display the original data, then change
> the display to the new data, but at the moment it won't display the
> program until it's finished with the OnInitDialog part of the program,
> so you don't get to see the original data. All you see is nothing for a
> few seconds, then the program starts and displays the second lot of
> data.
> Is there any way I can force a screen update before the program goes
> into it's second phase ?

Try doing a PostMessage to yourself of a private message from OnInitDialog,
and act on your data in its handler. You could also maybe use a timer to act
in periodic stages, or a 2nd thread that notifies the dialog with a custom
update message.
-- 
Jeff Partch [VC++ MVP]


0
jeffp (1711)
11/29/2003 9:37:09 PM
> > Is there any way I can force a screen update before the program goes
> > into it's second phase ?
> 
> Try doing a PostMessage to yourself of a private message from OnInitDialog,
> and act on your data in its handler.

Excellent, thanks. That did the trick.


-- 
Phil
0
phil6704 (8)
11/30/2003 5:55:36 PM
Reply:

Similar Artilces:

after crash forms display #NAME?
Hello, I was working on my Db when all of a sudden it crashed. I saved a backup and closed it down. I opened the back up and now on my main " Job Information" form, almost all of my text boxes with equations display "#Name?". Some of the text boxes reference other tables, some other forms, and some the same form they are located on. I checked the data source an a select few boxes and all the data, according to my table, is correct. Its worth noting that the entire DB was working perfectly before this crash. Now if i go into design mode for the form, delete any t...

Displaying a List of All VBA Procedures in Excel 2007 fromthe Ribb
How can I make this available to any workbook. For instance, I have a system running and it has around 280 modules. you might see the code at: http://msdn.microsoft.com/en-us/library/dd890502(office.11).aspx or bellow: Option Explicit Private Sub btnClose_Click() Unload Me End Sub Private Sub btnList_Click() ' Declare variables to access the Excel 2007 workbook. Dim objXLApp As Excel.Application Dim objXLWorkbooks As Excel.Workbooks Dim objXLABC As Excel.Workbook ' Declare variables to access the macros in the workbook. Dim VBAEditor ...

Autopopulate Case Resolution Dialog Box
Hi We are aware that we cannot populate the 'Case Resolution Dialog Box' so we have created custom attributes named 'Resolution' , 'Description' and 'Resolved' and inserted these fields on the Case form. We would not like to remove the Case Resolution record or button from CRM however we would like the fields on the 'Case Resolution Dialog Box' to be autopopulated with the information that was captured on the Case form. I attempted to do this using a workflow rule which of course did not work. Is there a supported way that we can achieve this bi...

Hide the Help button from Propertysheet dialog
Hello, Could you tell me, how can I hide the Help button from Propertysheet dialog in the wizard mode? I want to appeare just Back, Next, Cancel and Finish button in the dialog. I don't need to the Help button. By the way, PropertySheet.m_psh.dwFlags &= ~PSH_HASHELP; doesn't work. Thank you so much, Monica. Hello Monica, > By the way, PropertySheet.m_psh.dwFlags &= ~PSH_HASHELP; doesn't work. This should work. You need to remove it from each of the property pages as well. Here is the link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccor...

Is it possible to put a Dialog in a Parent Dialog
Hai Iam looking to put a dialog into a parent dialog and can any one help me in resolving this issue and can i use DialogBars inside a Dialog Thanks and Regards suresh Suresh wrote: > Hai > Iam looking to put a dialog into a parent dialog and can any one help me > in resolving this issue and can i use DialogBars inside a Dialog > Thanks and Regards > suresh > > Dialog-in-dialog is done frequently. What's your issue/problem? Typically one turns off the border and title...

Displaying the zero value in a cell
Is it possible to display a zero at the front of a series of numbers in a cell? Eg. "0123" is displayed as "123". How to display as original "0123"? I've got the 'zero value' checked in Tools - Options - View. That is only for a zero value in a cell without any other numbers in that cell. Thanks in advance!! Sure. Just type it with an apostrophe in front, or format the cells. For a good example, choose Format-Cells, Number tab. Then choose Special-->Zipcode. It shows "00000". So if your numbers are 10-digit account numbers, put "...

Problem displaying data in a Editbox
Hello. I am trying to display serial data in Edit box. The serial handler code is obtained from http://www.codeproject.com/KB/system/serial.aspx. In the serial handler, I use the SetwindowText to display the string but instead I get an occasional first character being displayed in the edit box instead of the full string. I have set the edit box properties with multiline, auto vertical scroll, want return, read only. I have also debug the code and place the string in the watch window and it seem to receive the full character on-screen. Any help please. Thanks Paul <eziggurat@gmail.com...

Modeless Dialog from MFC Regular DLL opened from EXE problems
Hi, Resources for the MFC modeless dialog are in a Regular DLL with MFC statically linked, No message overrides are set with the dialog, it is a generic dialog with only the OK and Cancel buttons. I choose a MFC AppWizard(exe) Dialog based for the calling EXE and used Run-Time Dynamic Linking to the DLL. Tried a couple I different approaches base on what I found on the newsgroup and the usual help sites. I know that I need to keep the modeless dialog from going out of scope after it is created so this is what I tried two different methods so far but I still can't get the dialog to hang ar...

Linked Images (Cheks) Don't Display Properly
Hello, for some strange reason, when I choose to link an image to a transaction, most of what was downloaded shows properly. But the check images themselves does not show. In the recent past this was not a problem. I have checked the associations settings for html etc and set them to view in IE but this did not fix the problem. What am I missing, Please? ...

Display Array from VBA
Hi: At the end of a VBA macro I have a set of results saved in an array e Results (1 to 100). How do I display the results in a specified range in a worksheet? I can do it by looping through and doing each one at a time but wha line of code would do it in one go (if there is one)? Thanks Bil -- Message posted from http://www.ExcelForum.com Hi Bill, Try: Sheets(1).Range("A1").Resize(100,1)=Results --- Regards, Norman "BillS >" <<BillS.163hnd@excelforum-nospam.com> wrote in message news:BillS.163hnd@excelforum-nospam.com... > Hi: > > At the en...

Cash flow forecast chart does not display
Recently my cash flow forecast would not display. I googled the issue and found a solution which sounded reasonable: http://groups.google.com/group/microsoft.public.money/browse_thread/thread/6ab159f49fe90e58/84f31b41ac5d1529?lnk=st&q=microsoft+money+cash+forecast+will+not+open&rnum=2&hl=en#84f31b41ac5d1529 However, I was disappointed when the problem persisted even after following the instructions which had to do with a possible broken bill or deposit. All scheduled bills and deposits were deleted and the cash flow forecast did not correct itself. I figured out what was causing...

How do i make my picture size display in inches rather than cms?
I have inserted an image into exel. I need to resize it to match another image in another program that displays the size as inches. However the Excel image size menu shows the size in centimeters. How do I make it display as inches? Grouge This is a Windows OS setting, not an Excel setting. You would go to Windows Control Panel>Regional and Language Options>Regional Options tab>Customize and set the "measurement system" to U.S. This option will affect all programs. Gord Dibben Excel MVP On Wed, 2 Mar 2005 10:51:04 -0800, Grouge <Grouge@discussions.microsoft.c...

Display GUID
How are you able to view the GUID for each field in MSCRM? Please advise. Thank you in advance for your help. Cayla what are you trying to achieve? Trying to understand what your looking for. -- John O'Donnell Microsoft CRM MVP http://www.mscrmfaq.us "Cayla" <Cayla@discussions.microsoft.com> wrote in message news:7D16B9F7-BD48-44B2-B3BA-576D072AB39B@microsoft.com... > How are you able to view the GUID for each field in MSCRM? > > Please advise. > > Thank you in advance for your help. > Cayla ...

why are my pages displaying in different widths?
I have my documents in landscape, but halfway through the document, the pages switch to a narrower landscape format than the rest. You must have a Section Break in there somewhere with different page setups for some of the Sections in the document. -- Hope this helps. Please reply to the newsgroup unless you wish to avail yourself of my services on a paid consulting basis. Doug Robbins - Word MVP, originally posted via msnews.microsoft.com "woelke" <woelke@discussions.microsoft.com> wrote in message news:581F1425-8EAB-4D50-96E8-6E0472389A0D@microsoft.com....

How to show a Dialog that is in maximed state initially
I am trying to show a dialog when a button is pressed. I know that call Dialog d; d.DoModal(); What else show be do be done in order to show the dialog in a maximized state. I added the properties Minimize/Maximize from the properties . Psl guide. Bhargavi You could use a ShowWindow() call in the OnInitDialog() function for the dialog to show it maximized. http://msdn2.microsoft.com/en-us/library/72szh9c7.aspx Tom "Bhargs" <bhargavi_ks2001@yahoo.com> wrote in message news:1150301229.668141.55560@y43g2000cwc.googlegroups.com... >I am trying to show a dialog when a bu...

Creating a CDialog derived class for a Dialog??
I am trying to convert a project from Win32 to MFC. I created a new dialog resource, but when I try to do the right-click add class thing from the dialog editor, it doesn't do anything. I am using VS.NET 2003 Pro. In the dialog that pops up to create the new class, I change it to derive from CDialog, it already has the ID for my dialogbox resource selected, and I enter a new class name, and it generates the .h and .cpp names. I click Finish and NOTHING happens. I try it again from the main menu, but this time it pops an error box saying "Object Required". I am stumpe...

Outlook 2007 Display Font
Is there a way to change the Outlook 2007 display font? I am talking about the font the program uses for general display, menus, etc. I have finally been able to turn off the clear type, but the font is different than what is used on the rest of the computer. It appears to be something similar to a calibri, but it is difficult to read. The rest of the computer uses Tahoma and is just fine. To test this, I changed the computer font to Times New Roman, and almost everything changed except Outlook 2007. -- Thank you, John Gregory "JGreg7" <JGreg7@discus...

Publishing to Web
I published my website to web then uploaded the index.htm file and created directory for the index_files then uploaded all of the files created by Publisher 2003 to it. However, none of my graphics will display on the website. All that is displayed are the alternate text. The url for this is wsitinc.com Can some one help explain what I did wrong and where to put the graphics to get them to display? thanks! > I published my website to web then uploaded the index.htm > file and created directory for the index_files then > uploaded all of the files created by Publisher 2003...

change all controllers' font in a dialog
Env: WindowsXP, VC+6.00 There are any easy ways to change all controllers' font in a dialog(NOT one by one)? TIA William If you mean to change font for the controls in a dialog, you can enumerate over all the children of the dialog and call SetFont on each of them(Use EnumChildWindows). Another option is to use SendMessageToDescendants. -- Ajay Kalra [MVP - VC++] ajaykalra@yahoo.com "William" <port@mx15.freecom.ne.jp> wrote in message news:u0W39WplHHA.4848@TK2MSFTNGP05.phx.gbl... > Env: WindowsXP, VC+6.00 > > There are any easy ways to change all contro...

OWA (Exchange 2003) Japanese characters not displayed correctly
I am currently running W2K3 with E2K3sp1. I have several Japanese officers in the company that use the Japanese OS and when they are using OWA to check e-mails the japanese characters in the body of the message do not display correctly. When you view the html code the characters are correct. Any ideas? Tom ...

Resizing dialogs
Hi. I have an MFC dialog based app. I want the user to be able to resize the dialog horizontally only. How can I do this? I have tried changing the onsize(...) function without success. The is a very important feature for my application. Please help. Thanks, Blair Blair wrote: >Hi. I have an MFC dialog based app. I want the user to be able to resize the >dialog horizontally only. How can I do this? I have tried changing the >onsize(...) function without success. The WM_SIZE message informs you of a size change that's already occurred, so it comes too late to help. >The is...

To get fomula to display a Zero
I Have a foumula in G35 that takes the sum of 2 other cells(G32).This formula "=SUM(G32,-69.4*113/119)" in G35 generates a number when the sum in the cell G32 is 0, which is probably what I'm telling it to do. But in reality I would like G35 to display a "0" (Doing the formula on my calculator yields -65.9008 which is what excell G35 does.) I have tried using a fix that was supplied to me earlier. Can someone Help please? -- Geo =IF(G32=0,0,SUM(G32,-69.4*113/119) -- HTH RP (remove nothere from the email address if mailing direct) "Geo" <Geo@dis...

Outlook "unable to display the folder....."
Hi...BIG problem... I get the following error message: "Unable to display the folder. Another application closed unexpectedly while using your Personal Folders file C:\DocumentsandSettings\JanetJuneau\LocalSettings\ApplicationData\Microsoft\Outlook\outlook.ost To prevent potential damage to your personal folders file, it will not be available until you close all applications currently using it" HELP HELP HELP!!!!! Tried restarting your computer already? Which version of Outlook are you using? Which applications do you have installed which integrate with Outlook...

display a drop-down list based on the content of another cell
I want to display a drop-down validation list for a target cell only if the vlaue in another cell meets or exceeds a numerical threshold. If the threshold is not met, I want to force the target cell to remain blank. Cell A contents -----> Cell B contents < 100 must be blank >= 100 may only be "red" or "green" or "blue" Using MS Office Excel 2003 Joe, without VBA you can have a Custom data validation with the following formula: =IF(A1<100, B1="", OR(B1="a", B1=...

Display cell formula by function
Hi. Is there a way to perform a function which display the formula of the target cell (NOT the value of the cell)? {Fictitious function} ShowFormula(TargetCell) Eg: A1 = sum(3, 4) A2 = ShowFormula(A1) Answer of A2: sum(3, 4) -- Additional information: - I'm using Office XP - I'm using Windows XP You could copy the equation to the cell and then put " in front of it (short term) "0-0 Wai Wai ^-^" <x@x.com> wrote in message news:%23OeHX84sFHA.2880@TK2MSFTNGP12.phx.gbl... > Hi. > Is there a way to perform a function which display the formula of the >...