Click here to Skip to main content
15,891,473 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRe: Class Constructor Problem Pin
Maximilien7-Dec-07 7:18
Maximilien7-Dec-07 7:18 
GeneralRe: Class Constructor Problem Pin
Lea Hayes7-Dec-07 7:50
Lea Hayes7-Dec-07 7:50 
GeneralRe: Class Constructor Problem Pin
led mike7-Dec-07 8:28
led mike7-Dec-07 8:28 
GeneralRe: Class Constructor Problem Pin
cp98767-Dec-07 9:45
cp98767-Dec-07 9:45 
Generalkeyboard buffer Pin
RomTibi7-Dec-07 6:40
RomTibi7-Dec-07 6:40 
AnswerRe: keyboard buffer Pin
Nathan Holt at EMOM7-Dec-07 7:23
Nathan Holt at EMOM7-Dec-07 7:23 
GeneralRe: keyboard buffer Pin
RomTibi9-Dec-07 4:29
RomTibi9-Dec-07 4:29 
General(Dundas Grid related) Modal dialog called from an event in the grid is not modal at all. [modified](SOLVED) Pin
Maximilien7-Dec-07 5:45
Maximilien7-Dec-07 5:45 
(also posted on the dundas forum)
I'm using the Dundas grid to display a simple grid.

In one of the cell, I use the Ellipsis Cell type, it's a cell type with a "..." button to call up a dialog.

When I click on the "..." button my dialog is called, but it's not "modal", the grid still has focus and I can click the button again and again. seems the dialog message loop is overridden for at least one message, if I click on the dialog, the dialog really become modal.

This code is copied from the cell type Dundas sample. ( and I tried the same thing with the dundas demo to see if the problem is in my code )

int CMbJobInfoGrid::OnEllipsisButton(long ID,int col,long row,long msg,long param){

	CUGCell cell;
	GetCell(col,row,&cell);
	int nCellTypeIndex = cell.GetCellType();

	if(msg == UGCT_ELLIPSISBUTTONCLICK)
	{
	  CMbEditCommentDialog dlg();
	  dlg.DoModal();
	}

	return TRUE;
}


It's a small problem, but it's bugging and I'm not certain why the DoModal does really eat the messages, and there's one message that get handled by the underlying grid.

Thanks.

Solution : There was SetCapture that was not supposed to be there. I removed it, tested all relevant code and behaviour and now everything is ok; no need to disable parent window or do other things, DoModal works as is should.




Maximilien Lincourt
Your Head A Splode - Strong Bad

modified on Friday, December 07, 2007 3:51:44 PM

GeneralRe: (Dundas Grid related) Modal dialog called from an event in the grid is not modal at all. Pin
James R. Twine7-Dec-07 6:14
James R. Twine7-Dec-07 6:14 
GeneralCObject (CView - CDoument) callbacks Pin
Tony Teveris7-Dec-07 4:48
Tony Teveris7-Dec-07 4:48 
GeneralRe: CObject (CView - CDoument) callbacks Pin
led mike7-Dec-07 6:04
led mike7-Dec-07 6:04 
GeneralRe: CObject (CView - CDoument) callbacks Pin
Mark Salsbery7-Dec-07 6:24
Mark Salsbery7-Dec-07 6:24 
GeneralRe: CObject (CView - CDoument) callbacks Pin
Tony Teveris7-Dec-07 6:51
Tony Teveris7-Dec-07 6:51 
GeneralRe: CObject (CView - CDoument) callbacks Pin
Mark Salsbery7-Dec-07 7:11
Mark Salsbery7-Dec-07 7:11 
GeneralRe: CObject (CView - CDoument) callbacks Pin
Tony Teveris7-Dec-07 7:18
Tony Teveris7-Dec-07 7:18 
GeneralRe: CObject (CView - CDoument) callbacks Pin
Mark Salsbery7-Dec-07 7:34
Mark Salsbery7-Dec-07 7:34 
GeneralRe: CObject (CView - CDoument) callbacks Pin
Tony Teveris7-Dec-07 8:03
Tony Teveris7-Dec-07 8:03 
GeneralRe: CObject (CView - CDoument) callbacks Pin
Mark Salsbery7-Dec-07 8:18
Mark Salsbery7-Dec-07 8:18 
GeneralRe: CObject (CView - CDoument) callbacks Pin
Tony Teveris7-Dec-07 8:23
Tony Teveris7-Dec-07 8:23 
GeneralRe: CObject (CView - CDoument) callbacks Pin
Mark Salsbery7-Dec-07 8:29
Mark Salsbery7-Dec-07 8:29 
GeneralExecutable application Pin
llp00na7-Dec-07 4:28
llp00na7-Dec-07 4:28 
GeneralRe: Executable application Pin
led mike7-Dec-07 4:59
led mike7-Dec-07 4:59 
GeneralRe: Executable application Pin
llp00na7-Dec-07 5:09
llp00na7-Dec-07 5:09 
GeneralRe: Executable application Pin
led mike7-Dec-07 5:31
led mike7-Dec-07 5:31 
GeneralRe: Executable application Pin
Eytukan7-Dec-07 5:20
Eytukan7-Dec-07 5:20 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.