Thread: Dialog opens properly in winxp, but Freezes in win98se

  1. #1
    Registered User
    Join Date
    Mar 2004

    Dialog opens properly in winxp, but Freezes in win98se

    "MyDlg" is a dialog class derived from CDialog
    "pg_price" is a derived CPropertyPage

    on pressing a button pg_price(derived from CPropertyPage), domodal is called
    void pg_price::OnBUTTON() 
    	MyDlg MyDlg_obj;

    OnInitDialog of MyDlg (derived from CDialog):
    BOOL MyDlg::OnInitDialog() 
    	return TRUE;  // return TRUE unless you set the focus to a control
    	              // EXCEPTION: OCX Property Pages should return FALSE
    now, the problem is that on winxp there isnt any problem. MyDlg_obj.DoModal(); displays the resource of MyDlg

    but on win98se, the whole application hangs and become non-responsive upon clicking the button
    MyDlg never appeared

    so i ran a debugger and found out that the application has no problem running up to "BOOL MyDlg::OnInitDialog()" and returns it without any problem. I hit "f5" again and the application hangs. no assert/buffer overflow problems error messages were given, the whole application simply hangs there. i believe that's because the user interface thread got into something it cant get out of

    doing a "step over" on the debugger in win98se i got the following

    doing a "step over on debugger in winxp

    i really got no idea how this happened
    how is it possible that this app works well on winxp but not win98se?
    i need that application on win98se platform

    using vc++6.0 SP6

    please assist
    Last edited by hanhao; 07-09-2005 at 11:16 PM.

  2. #2
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    Perhaps you run out of memory.

    Seek and ye shall find. quaere et invenies.

    "Simplicity does not precede complexity, but follows it." -- Alan Perlis
    "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
    "The only real mistake is the one from which we learn nothing." -- John Powell

    Other boards: DaniWeb, TPS
    Unofficial Wiki FAQ:

    My website:
    Projects: codeform, xuni, atlantis, nort, etc.

  3. #3
    Registered User
    Join Date
    Mar 2004
    Quote Originally Posted by dwks
    Perhaps you run out of memory.
    but i dont think so
    winxp and win98se are ran on the same computer (with 2 different drives)
    i also ran the same program on other independent computers (my friends') and it gives the same result

    most likely it's the main user interface thread got stuck some where and hence the application freezes
    i got no idea how to address this problem

  4. #4
    Registered User
    Join Date
    Mar 2004
    after some research, i discovered that because the button was located on a CPropertySheet and the domodal is launch from it
    this CPropertySheet is one of the pages in the tabs area
    this tab area is on my main dialog

    anyone have problems doing domodal on CPropertySheet ?
    how to solve this problem?

  5. #5
    Registered User
    Join Date
    Mar 2004
    problem solved

    there's a stupid bug in MFC CPropertySheet for win98se
    can be fixed by shifting keyboad focus away from any control objects on propertysheet
    ::setfocus( topwindow_hwnd)

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 9
    Last Post: 02-13-2008, 02:59 PM
  2. make Child Dialog not Popup?
    By Zeusbwr in forum Windows Programming
    Replies: 5
    Last Post: 04-08-2005, 02:42 PM
  3. Getting the position of a dialog without parent on the screen
    By stormbringer in forum Windows Programming
    Replies: 1
    Last Post: 08-27-2003, 02:59 AM
  4. Dialog box height/width differs in winXP
    By LuckY in forum Windows Programming
    Replies: 7
    Last Post: 05-04-2003, 03:13 PM
  5. Tab Controls - API
    By -KEN- in forum Windows Programming
    Replies: 7
    Last Post: 06-02-2002, 09:44 AM