Click here to Skip to main content
16,009,728 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Problem in - typeid - in Release version Pin
Stephen Hewitt17-Apr-06 19:33
Stephen Hewitt17-Apr-06 19:33 
GeneralRe: Problem in - typeid - in Release version Pin
Sarvan AL17-Apr-06 20:12
Sarvan AL17-Apr-06 20:12 
AnswerRe: Problem in - typeid - in Release version Pin
David Crow18-Apr-06 3:02
David Crow18-Apr-06 3:02 
QuestionCHotKeyCtrl and "space" Pin
Abin17-Apr-06 17:50
Abin17-Apr-06 17:50 
AnswerRe: CHotKeyCtrl and "space" Pin
Branislav17-Apr-06 23:04
Branislav17-Apr-06 23:04 
QuestionHow to add drag/drop to the CTreeCtrl. Pin
megzhou17-Apr-06 17:45
megzhou17-Apr-06 17:45 
AnswerRe: How to add drag/drop to the CTreeCtrl. Pin
Hamid_RT17-Apr-06 19:46
Hamid_RT17-Apr-06 19:46 
QuestionHow to integrate the Simulink in the VC environment? Pin
megzhou17-Apr-06 17:26
megzhou17-Apr-06 17:26 
Hi, friends,
I used to integrate the simulink package to my project, that is, I opened a
Simulink window and moved the window to the related view, assumed to be the CMHCSimPlatformView, the codes are referred to as follows:

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void CMHCSimPlatformView::OnStartMatlabEngine()
{
...
m_hSimulink = ::FindWindow(NULL,"Project_1 ");
if(::IsWindow(m_hSimulink))
{
//Set the CMHCSimPlatformView is the parent window for the simulink one
::SetParent(m_hSimulink,this->GetSafeHwnd());
CWnd * pWnd = NULL;
pWnd = FromHandle(m_hSimulink);
CRect rect;
GetClientRect(&rect);
//move the simulink window to the related area, that is to the
//client area of the CMHCSimPlatformView.
pWnd->MoveWindow(&rect,false);
//delete the catpion of the simulink interface
pWnd->ModifyStyle(WS_CAPTION|WS_BORDER,0);
//delte the system menu of the simulink interface
pWnd->SetMenu(NULL);
//delete the system toolbar of the simulink interface
HWND handToolbar = ::FindWindowEx(m_hSimulink,NULL,_T ToolbarWindow32"),NULL);
CWnd* pToolWnd;
pToolWnd = FromHandle(handToolbar);
pToolWnd->ShowWindow(FALSE);
CFrameWnd * pFrame=(CFrameWnd *)AfxGetMainWnd();
pFrame->GetActiveFrame()->UpdateWindow ();

UpdateData(true);
}
...
}
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
where, Project_1 is the name of a simulink file opened before, and m_hSimulink is a variable of HWND.

Surely, the simulink window was moved to the CMHCSimPlatformView client area when the above codes are executed. However, after later opertions, the simulink window was often covered with the CMHCSimPlatformView window.

Sleepy | :zzz: How to ensure that the simulink window always stays on the top ?and how to
change the simulink window according to the CMHCSimPlatformView area?

Regards.

zhou_rusheng
AnswerRe: How to integrate the Simulink in the VC environment? Pin
megzhou18-Apr-06 15:19
megzhou18-Apr-06 15:19 
QuestionHow to achieve this?? About zoomin/zoomout in CEditView or CEdit... Pin
figer17-Apr-06 16:25
figer17-Apr-06 16:25 
AnswerRe: How to achieve this?? About zoomin/zoomout in CEditView or CEdit... Pin
bob1697217-Apr-06 17:14
bob1697217-Apr-06 17:14 
AnswerRe: How to achieve this?? About zoomin/zoomout in CEditView or CEdit... Pin
bob1697217-Apr-06 17:34
bob1697217-Apr-06 17:34 
GeneralRe: How to achieve this?? About zoomin/zoomout in CEditView or CEdit... Pin
figer18-Apr-06 15:36
figer18-Apr-06 15:36 
GeneralRe: How to achieve this?? About zoomin/zoomout in CEditView or CEdit... Pin
figer18-Apr-06 18:38
figer18-Apr-06 18:38 
GeneralRe: How to achieve this?? About zoomin/zoomout in CEditView or CEdit... Pin
bob1697219-Apr-06 17:14
bob1697219-Apr-06 17:14 
Questionhow to integrate google with VC? Pin
includeh1017-Apr-06 15:58
includeh1017-Apr-06 15:58 
AnswerRe: how to integrate google with VC? Pin
ThatsAlok18-Apr-06 7:43
ThatsAlok18-Apr-06 7:43 
QuestionWindows Media Player Pin
Harshabhi17-Apr-06 15:23
Harshabhi17-Apr-06 15:23 
AnswerRe: Windows Media Player Pin
Stephen Hewitt17-Apr-06 16:23
Stephen Hewitt17-Apr-06 16:23 
QuestionRe: Windows Media Player Pin
Harshabhi18-Apr-06 14:19
Harshabhi18-Apr-06 14:19 
AnswerRe: Windows Media Player Pin
Stephen Hewitt18-Apr-06 14:22
Stephen Hewitt18-Apr-06 14:22 
QuestionRe: Windows Media Player Pin
Harshabhi19-Apr-06 6:38
Harshabhi19-Apr-06 6:38 
AnswerRe: Windows Media Player Pin
Stephen Hewitt19-Apr-06 13:46
Stephen Hewitt19-Apr-06 13:46 
QuestionRe: Windows Media Player Pin
Harshabhi20-Apr-06 7:09
Harshabhi20-Apr-06 7:09 
Questionproblem exporting static template data members, but not methods Pin
Marcello17-Apr-06 14:40
Marcello17-Apr-06 14:40 

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.