Click here to Skip to main content
15,887,596 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: _Connection as parameter in IDL file Pin
MrKBA27-Oct-09 9:44
MrKBA27-Oct-09 9:44 
GeneralRe: _Connection as parameter in IDL file Pin
MrKBA27-Oct-09 10:45
MrKBA27-Oct-09 10:45 
GeneralRe: _Connection as parameter in IDL file Pin
Stuart Dootson27-Oct-09 13:06
professionalStuart Dootson27-Oct-09 13:06 
QuestionMy texture Problem Pin
Archy_Yu25-Oct-09 21:43
Archy_Yu25-Oct-09 21:43 
AnswerRe: My texture Problem Pin
Cedric Moonen25-Oct-09 22:01
Cedric Moonen25-Oct-09 22:01 
GeneralRe: My texture Problem Pin
Archy_Yu26-Oct-09 4:43
Archy_Yu26-Oct-09 4:43 
GeneralRe: My texture Problem Pin
Cedric Moonen26-Oct-09 4:59
Cedric Moonen26-Oct-09 4:59 
QuestionHow can i Get viewtype from Dialog? Pin
002comp25-Oct-09 21:29
002comp25-Oct-09 21:29 
Hello Friends
From last some weeks I m tryiny to solve How to restore viewtype in a dialog.
Now,Using lpfnhook I m able to set the viewtype in a Dialog and here is the code below:
void test()
{
OPENFILENAME ofn; 
ofn.Flags = OFN_PATHMUSTEXIST | OFN_FILEMUSTEXIST | OFN_EXPLORER | OFN_ENABLEHOOK ;
ofn.lpfnHook = HookProcCenterDialog;
}

UINT_PTR CALLBACK HookProcCenterDialog( HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam )
{
	enum LISTVIEWCMD
	{  ODM_VIEW_ICONS = 0x7029,
	  ODM_VIEW_LIST  = 0x702b,
	  ODM_VIEW_DETAIL= 0x702c,
	  ODM_VIEW_THUMBS= 0x702d,
	  ODM_VIEW_TILES = 0x702e,
        };
	
	if ( message == WM_INITDIALOG ) 
	{
	        HWND hParent = GetParent( hDlg );
		HWND pshell = GetDlgItem(hParent,0x0461);
		PostMessage(hDlg,MYWM_POSTINIT,0,0);
				
	}
	if ( message == MYWM_POSTINIT ) 
	{
		HWND hParent = GetParent( hDlg );
		HWND pshell = GetDlgItem(hParent,0x0461);
		if(pshell)
		{
		SendMessage(pshell,WM_COMMAND,0x702D,0);//LINE 1
                }
		
	}
	if ( message == WM_CLOSE) 
	{
		

	}
	return FALSE;
}


on line 1 I m setting the thumbnail view using 0X702D,Similar I m having other command ID like 0X702B,0X702C for other view.

Now,my prob is how can I get the viewType on Wm_CLOSE so tht i can set it next time dialog is open.

I tried like this to get this value:
int ID;
view = (int) SendMessage(pshell,WM_COMMAND,ID,0);
but in ID,it is always returning same value for all views.
Plz suggest me some solution.

Thx in Advance.
AnswerRe: How can i Get viewtype from Dialog? Pin
Richard MacCutchan25-Oct-09 22:31
mveRichard MacCutchan25-Oct-09 22:31 
GeneralRe: How can i Get viewtype from Dialog? Pin
002comp25-Oct-09 22:35
002comp25-Oct-09 22:35 
GeneralRe: How can i Get viewtype from Dialog? Pin
Naveen25-Oct-09 23:34
Naveen25-Oct-09 23:34 
GeneralRe: How can i Get viewtype from Dialog? Pin
David Crow26-Oct-09 3:43
David Crow26-Oct-09 3:43 
GeneralRe: How can i Get viewtype from Dialog? Pin
002comp26-Oct-09 19:56
002comp26-Oct-09 19:56 
AnswerRe: How can i Get viewtype from Dialog? Pin
David Crow27-Oct-09 3:05
David Crow27-Oct-09 3:05 
QuestionListBox Pin
MsmVc25-Oct-09 20:57
MsmVc25-Oct-09 20:57 
QuestionHow to print whole dialog box in vc++,mfc Pin
prerananit25-Oct-09 20:54
prerananit25-Oct-09 20:54 
AnswerRe: How to print whole dialog box in vc++,mfc Pin
Code-o-mat25-Oct-09 22:27
Code-o-mat25-Oct-09 22:27 
Question[Message Deleted] Pin
eswar pothula25-Oct-09 20:03
eswar pothula25-Oct-09 20:03 
AnswerRe: how to convert tiff to pdf and pdf to tiff Pin
Game-point25-Oct-09 20:37
Game-point25-Oct-09 20:37 
GeneralRe: how to convert tiff to pdf and pdf to tiff Pin
eswar pothula25-Oct-09 21:35
eswar pothula25-Oct-09 21:35 
AnswerRe: how to convert tiff to pdf and pdf to tiff Pin
Game-point25-Oct-09 20:49
Game-point25-Oct-09 20:49 
GeneralRe: how to convert tiff to pdf and pdf to tiff Pin
eswar pothula25-Oct-09 23:57
eswar pothula25-Oct-09 23:57 
QuestionList Control Selection Pin
hellogany25-Oct-09 19:37
hellogany25-Oct-09 19:37 
AnswerRe: List Control Selection Pin
Code-o-mat25-Oct-09 22:20
Code-o-mat25-Oct-09 22:20 
QuestionCreating objects in a thread. Pin
Nikz225-Oct-09 16:19
Nikz225-Oct-09 16:19 

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.