Click here to Skip to main content
15,890,579 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionOpen Office SDK [modified] Pin
Kamen28-Aug-06 1:07
Kamen28-Aug-06 1:07 
AnswerRe: Open Office SDK Pin
Dave Calkins28-Aug-06 7:59
Dave Calkins28-Aug-06 7:59 
QuestionDifferece between static library and shared DLL [modified] Pin
Anu_Bala28-Aug-06 0:10
Anu_Bala28-Aug-06 0:10 
AnswerRe: Differece between static library and shared DLL Pin
Emilio Garavaglia28-Aug-06 1:36
Emilio Garavaglia28-Aug-06 1:36 
AnswerRe: Differece between static library and shared DLL Pin
Hamid_RT28-Aug-06 7:55
Hamid_RT28-Aug-06 7:55 
QuestionSyncronization question Pin
Kiran Pinjala27-Aug-06 23:59
Kiran Pinjala27-Aug-06 23:59 
AnswerRe: Syncronization question Pin
kakan28-Aug-06 0:51
professionalkakan28-Aug-06 0:51 
QuestionHow to prevent drag and drop Pin
huynhnb27-Aug-06 23:22
huynhnb27-Aug-06 23:22 
Hi, All
I have one problem with rich edit view
My Frame:
BOOL CMainFrame::OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext)
{
// TODO: Add your specialized code here and/or call the base class
int nID = AFX_IDW_PANE_FIRST; //50421
if (!m_wndSplitter.CreateStatic(this, 1, 3, WS_CHILD|WS_VISIBLE|WS_BORDER, nID)) //50421
return FALSE;

if (!m_wndSplitter.CreateView(0, 0, RUNTIME_CLASS(CTreeView), CSize(100, 100), pContext) ||
!m_wndSplitter.CreateView(0, 1, RUNTIME_CLASS(CRichEditView), CSize(400, 400), pContext)||
!m_wndSplitter.CreateView(0, 2, RUNTIME_CLASS(CHtmlView), CSize(0, 0), pContext))
{
m_wndSplitter.DestroyWindow();

return FALSE;
}
}

After run application, when i drag and drop file in to RichEditView window, program will terminate.
I want to prevent drag and drop item (file, text) in to RichEditView.
I OverWrite OnDragEnter of View and return DROPEFFECT_NONE but this function not effect.
I have debuged and found :
STDMETHODIMP CRichEditView::XRichEditOleCallback::GetDragDropEffect(
BOOL fDrag, DWORD grfKeyState, LPDWORD pdwEffect)
{
if (!fDrag) // allowable dest effects
{
DWORD dwEffect;
// check for force link
if ((grfKeyState & (MK_CONTROL|MK_SHIFT)) == (MK_CONTROL|MK_SHIFT))
dwEffect = DROPEFFECT_LINK;
// check for force copy
else if ((grfKeyState & MK_CONTROL) == MK_CONTROL)
dwEffect = DROPEFFECT_COPY;
// check for force move
else if ((grfKeyState & MK_ALT) == MK_ALT)
dwEffect = DROPEFFECT_MOVE;
// default -- recommended action is move
else
dwEffect = DROPEFFECT_MOVE;

if (dwEffect & *pdwEffect) // make sure allowed type
*pdwEffect = dwEffect;
}
return S_OK;
}
Help me slove this problem. Thank for reading.

Huynhnb

.: Your success is also mine :.



QuestionSearching in SDK Pin
shadrach_india27-Aug-06 23:13
shadrach_india27-Aug-06 23:13 
AnswerRe: Searching in SDK Pin
Prakash Nadar27-Aug-06 23:22
Prakash Nadar27-Aug-06 23:22 
GeneralRe: Searching in SDK Pin
ThatsAlok28-Aug-06 0:50
ThatsAlok28-Aug-06 0:50 
AnswerRe: Searching in SDK Pin
toxcct27-Aug-06 23:25
toxcct27-Aug-06 23:25 
GeneralRe: Searching in SDK Pin
shadrach_india27-Aug-06 23:33
shadrach_india27-Aug-06 23:33 
GeneralRe: Searching in SDK Pin
toxcct27-Aug-06 23:39
toxcct27-Aug-06 23:39 
GeneralRe: Searching in SDK [modified] Pin
shadrach_india27-Aug-06 23:44
shadrach_india27-Aug-06 23:44 
GeneralRe: Searching in SDK [modified] Pin
toxcct27-Aug-06 23:46
toxcct27-Aug-06 23:46 
GeneralRe: Searching in SDK Pin
shadrach_india28-Aug-06 0:12
shadrach_india28-Aug-06 0:12 
GeneralRe: Searching in SDK Pin
shadrach_india28-Aug-06 0:42
shadrach_india28-Aug-06 0:42 
GeneralRe: Searching in SDK Pin
David Crow28-Aug-06 3:55
David Crow28-Aug-06 3:55 
QuestionMS VS 2005 C++ Issue Pin
Programm3r27-Aug-06 22:32
Programm3r27-Aug-06 22:32 
AnswerRe: MS VS 2005 C++ Issue Pin
Dave Calkins28-Aug-06 5:10
Dave Calkins28-Aug-06 5:10 
QuestionRe: MS VS 2005 C++ Issue Pin
Hamid_RT28-Aug-06 8:10
Hamid_RT28-Aug-06 8:10 
QuestionCSortListCtrl Line Color Pin
mikobi27-Aug-06 21:31
mikobi27-Aug-06 21:31 
AnswerRe: CSortListCtrl Line Color Pin
_AnsHUMAN_ 27-Aug-06 22:00
_AnsHUMAN_ 27-Aug-06 22:00 
AnswerRe: CSortListCtrl Line Color Pin
Hamid_RT27-Aug-06 22:25
Hamid_RT27-Aug-06 22:25 

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.