|
i want to make a application which show image by using drag and drop mechanism,
and am new with this type of application i have no idea about this so can anybody have idea how is it possible please answer me .
Bankey Khandelwal
Software Engineer
|
|
|
|
|
Take a look at WM_DROPFILES
This[^] will help you too.
Nibu thomas
Software Developer
|
|
|
|
|
thanks for giving some information,
but right now i am trying to rebuild this project this give errors if you have any idea to remove these errors please give me ASAP.
Compiling...
MyDropTarget.cpp
E:\Tool_Bankey\drag_drop\MultiFiler_demo\Dialog with drop target\MyDropTarget.cpp(61) : error C2065: 'CLSID_DragDropHelper' : undeclared identifier
E:\Tool_Bankey\drag_drop\MultiFiler_demo\Dialog with drop target\MyDropTarget.cpp(61) : error C2065: 'IID_IDropTargetHelper' : undeclared identifier
E:\Tool_Bankey\drag_drop\MultiFiler_demo\Dialog with drop target\MyDropTarget.cpp(70) : error C2027: use of undefined type 'IDropTargetHelper'
E:\Tool_Bankey\drag_drop\MultiFiler_demo\Dialog with drop target\MyDropTarget.h(22) : see declaration of 'IDropTargetHelper'
E:\Tool_Bankey\drag_drop\MultiFiler_demo\Dialog with drop target\MyDropTarget.cpp(70) : error C2227: left of '->Release' must point to class/struct/union
E:\Tool_Bankey\drag_drop\MultiFiler_demo\Dialog with drop target\MyDropTarget.cpp(107) : error C2027: use of undefined type 'IDropTargetHelper'
E:\Tool_Bankey\drag_drop\MultiFiler_demo\Dialog with drop target\MyDropTarget.h(22) : see declaration of 'IDropTargetHelper'
E:\Tool_Bankey\drag_drop\MultiFiler_demo\Dialog with drop target\MyDropTarget.cpp(107) : error C2227: left of '->DragEnter' must point to class/struct/union
E:\Tool_Bankey\drag_drop\MultiFiler_demo\Dialog with drop target\MyDropTarget.cpp(137) : error C2027: use of undefined type 'IDropTargetHelper'
E:\Tool_Bankey\drag_drop\MultiFiler_demo\Dialog with drop target\MyDropTarget.h(22) : see declaration of 'IDropTargetHelper'
E:\Tool_Bankey\drag_drop\MultiFiler_demo\Dialog with drop target\MyDropTarget.cpp(137) : error C2227: left of '->DragOver' must point to class/struct/union
E:\Tool_Bankey\drag_drop\MultiFiler_demo\Dialog with drop target\MyDropTarget.cpp(163) : error C2027: use of undefined type 'IDropTargetHelper'
E:\Tool_Bankey\drag_drop\MultiFiler_demo\Dialog with drop target\MyDropTarget.h(22) : see declaration of 'IDropTargetHelper'
E:\Tool_Bankey\drag_drop\MultiFiler_demo\Dialog with drop target\MyDropTarget.cpp(163) : error C2227: left of '->Drop' must point to class/struct/union
E:\Tool_Bankey\drag_drop\MultiFiler_demo\Dialog with drop target\MyDropTarget.cpp(173) : error C2027: use of undefined type 'IDropTargetHelper'
E:\Tool_Bankey\drag_drop\MultiFiler_demo\Dialog with drop target\MyDropTarget.h(22) : see declaration of 'IDropTargetHelper'
E:\Tool_Bankey\drag_drop\MultiFiler_demo\Dialog with drop target\MyDropTarget.cpp(173) : error C2227: left of '->DragLeave' must point to class/struct/union
Error executing cl.exe.
MultiFiler.exe - 12 error(s), 0 warning(s)
Bankey Khandelwal
Software Engineer
|
|
|
|
|
// app
#include <windows.h>
extern "C" void fun();
main()
{
fun();
}
// dll
#include <iostream>
extern "C"
{
_declspec(dllexport) void fun()
{
std::cout<<"fun() call in Dll\n";
}
}
_stdcall DllMain()
{
std::cout<<"dllmain() \n";
}
|
|
|
|
|
derek7 wrote: _stdcall DllMain()
This is not the signature for DLLMain
BOOL WINAPI DllMain(
HINSTANCE hinstDLL,
DWORD fdwReason,
LPVOID lpvReserved
); More Information[^]
Nibu thomas
Software Developer
|
|
|
|
|
hi,
Here i need small information. That i need to insert the static control as item in to the list view control. And assign the resource id to those static controls. how can i do that. Here i have to do it ,by using win32.
Plz suggest me any solution?
spend every mintue for success
|
|
|
|
|
Hi all, please help me for this problem.
I want exchange data between two MDI form(VC++/MFC), ex:
Note: F1 and F2 is extended from CFormView, not from Dialog
In Form1(name=F1) i have:
a CEdit(name=txtT1), a Button(name=cmdC1)
In Form2(name=F2) i have:
a CEdit(name=txtT2), a Button(name=cmdC2)
Now i want, when i show F1, input a text (ex: "abcd") into txtT1, and then click cmdC1. When click cmdC1, i will show F2 and transmit the text("abcd") to F2, on F2 form i have a function to receive this text and display this text on txtT2(this text can be changed).
When i click cmdC2, i want to transmit this text in txtT2 back to F1 and on F1 i have a function to receive this value and display on txtT1.
Please give me some code(in MFC)
Thanks very much
|
|
|
|
|
pjmvn wrote: form i have a function to receive this text and display this text on txtT2(this text can be changed).
Pass this data as an argument to this function of F2 from F1.
pjmvn wrote: on F1 i have a function to receive this value and display on txtT1.
Pass this data as an argument to this function of F1 from F2.
Nibu thomas
Software Developer
|
|
|
|
|
I have done that but not success, here is my code:
//FrmTrans.cpp
#include "stdafx.h"<br />
#include "Test MFC.h"<br />
#include "ChildFrm.h"<br />
#include "MainFrm.h"<br />
#include "ChildFrm.h"<br />
#include "Test MFCDoc.h"<br />
#include "Test MFCView.h"<br />
#include "FrmTrans.h"<br />
#include "FrmReceive.h"<br />
<br />
#ifdef _DEBUG<br />
#define new DEBUG_NEW<br />
#undef THIS_FILE<br />
static char THIS_FILE[] = __FILE__;<br />
#endif<br />
<br />
<br />
IMPLEMENT_DYNCREATE(FrmTrans, CFormView)<br />
<br />
FrmTrans::FrmTrans()<br />
: CFormView(FrmTrans::IDD)<br />
{<br />
}<br />
<br />
FrmTrans::~FrmTrans()<br />
{<br />
}<br />
<br />
void FrmTrans::DoDataExchange(CDataExchange* pDX)<br />
{<br />
CFormView::DoDataExchange(pDX);<br />
DDX_Control(pDX, ID_txtTrans, txtTrans);<br />
}<br />
<br />
<br />
BEGIN_MESSAGE_MAP(FrmTrans, CFormView)<br />
ON_BN_CLICKED(ID_cmdTrans, OncmdTrans)<br />
ON_BN_CLICKED(ID_cmdTest, OncmdTest)<br />
END_MESSAGE_MAP()<br />
<br />
<br />
#ifdef _DEBUG<br />
void FrmTrans::AssertValid() const<br />
{<br />
CFormView::AssertValid();<br />
}<br />
<br />
void FrmTrans::Dump(CDumpContext& dc) const<br />
{<br />
CFormView::Dump(dc);<br />
}<br />
#endif //_DEBUG<br />
<br />
<br />
<br />
FrmReceive* frmReceive;<br />
<br />
void FrmTrans::OncmdTrans() <br />
{<br />
frmReceive=new FrmReceive();<br />
CMultiDocTemplate* frm;<br />
frm= new CMultiDocTemplate(<br />
IDR_TESTMFTYPE,<br />
RUNTIME_CLASS(CTestMFCDoc),<br />
RUNTIME_CLASS(CChildFrame),
frmReceive->GetRuntimeClass());<br />
<br />
CDocument* pDoc;<br />
POSITION pos = frm->GetFirstDocPosition();<br />
if (!pos){<br />
pDoc = frm->OpenDocumentFile(NULL, TRUE);<br />
pDoc->SetTitle("Form Trans");<br />
}<br />
else<br />
{<br />
pDoc = frm->GetNextDoc(pos);<br />
pos = pDoc->GetFirstViewPosition();<br />
if (pos)<br />
{<br />
CView* pView = pDoc->GetNextView(pos);<br />
CFrameWnd *pFrame = pView->GetParentFrame();<br />
if (pFrame)<br />
pFrame->ActivateFrame();<br />
}<br />
}<br />
<br />
frmReceive->SetParrentForm(this);<br />
<br />
CString temp;<br />
GetDlgItemText(ID_txtTrans, temp);<br />
frmReceive->SetTextValue(temp);<br />
}<br />
<br />
void FrmTrans::OncmdTest() <br />
{ <br />
CString temp;<br />
temp.Format("%u", frmReceive->parrentForm);<br />
AfxMessageBox(temp);<br />
}<br />
Here is Receive form.
<br />
#include "stdafx.h"<br />
#include "Test MFC.h"<br />
#include "FrmReceive.h"<br />
<br />
#ifdef _DEBUG<br />
#define new DEBUG_NEW<br />
#undef THIS_FILE<br />
static char THIS_FILE[] = __FILE__;<br />
#endif<br />
<br />
<br />
IMPLEMENT_DYNCREATE(FrmReceive, CFormView)<br />
<br />
FrmReceive::FrmReceive()<br />
: CFormView(FrmReceive::IDD)<br />
{}<br />
<br />
FrmReceive::~FrmReceive()<br />
{}<br />
<br />
void FrmReceive::DoDataExchange(CDataExchange* pDX)<br />
{<br />
CFormView::DoDataExchange(pDX);<br />
DDX_Control(pDX, ID_txtReceive, txtReceive);<br />
}<br />
<br />
<br />
BEGIN_MESSAGE_MAP(FrmReceive, CFormView)<br />
ON_BN_CLICKED(ID_cmdReceive, OncmdReceive)<br />
END_MESSAGE_MAP()<br />
<br />
<br />
#ifdef _DEBUG<br />
void FrmReceive::AssertValid() const<br />
{<br />
CFormView::AssertValid();<br />
}<br />
<br />
void FrmReceive::Dump(CDumpContext& dc) const<br />
{<br />
CFormView::Dump(dc);<br />
}<br />
#endif //_DEBUG<br />
<br />
<br />
void FrmReceive::SetParrentForm(FrmTrans* parrentForm)<br />
{<br />
this->parrentForm=parrentForm;<br />
CString temp;<br />
temp.Format("%u", this->parrentForm);<br />
AfxMessageBox(temp);<br />
}<br />
<br />
void FrmReceive::OncmdReceive() <br />
{<br />
CString temp;<br />
temp.Format("%u", this->parrentForm);<br />
AfxMessageBox(temp);<br />
AfxMessageBox(this->text);<br />
}<br />
<br />
void FrmReceive::SetTextValue(CString text)<br />
{ <br />
this->text=text;<br />
}<br />
<br />
void FrmReceive::OnActivateView(BOOL bActivate, CView* pActivateView, CView* pDeactiveView) <br />
{ <br />
CFormView::OnActivateView(bActivate, pActivateView, pDeactiveView);<br />
}<br />
<br />
void FrmReceive::OnUpdate(CView* pSender, LPARAM lHint, CObject* pHint) <br />
{ <br />
}<br />
<br />
void FrmReceive::OnInitialUpdate() <br />
{}<br />
When i click on the cmdReceive, the message box show the value diffrent with "the first" and this-text is null ("").
I don not know why ???
Please correct it for me.
Thanks very much
-- modified at 2:39 Monday 6th March, 2006
|
|
|
|
|
|
There is a activex written using MFC and COM .
The main class inherits
CComObjectRootEx
IDispatchImpl
CComCoClass
IObjectSafetyImpl
Now 2threads are created inside this class in the constructor.
When IE is refreshed/reloaded, I loss the pointer of the process and
threads are not deallocated.
So what I did is, made thread ID's as static in the class and
deallocate them in the constructor before creating new threads.
When I WaitforSingleObject() I always get time out(258).
so I call TerminateThread().
I know this is wrong way.
Now this method is leaving lot of leaks.
Please suggest me a remedy so that I can trap the refresh ask my thread
to exit gracefully.
Thanks a lot in advance.
-Harish-
|
|
|
|
|
#include <winbase.h> // error
main()
{
::LoadLibrary("dll.dll");
typedef void(WINAPI *fun)();
}
#include <windows.h> // work
main()
{
::LoadLibrary("dll.dll");
typedef void(WINAPI *fun)();
}
|
|
|
|
|
Do not include winbase.h directly in your code. Include windows.h which indirectly includes winbase.h. Windows.h declares a bunch of stuff that winbase.h needs.
You may be right
I may be crazy
-- Billy Joel --
Within you lies the power for good - Use it!
|
|
|
|
|
I use mouse_event() function to write a script in windows. It worked well, but in many games, it didnt worked. How could I make it work in games (using DirectX, i think) ????
|
|
|
|
|
if static libary or import libary, it is easy.
how about dll that dynamicly loaded by API in runtime? in adding to search each piece of code ( it is error-easy )are there any way?
|
|
|
|
|
Hi i'm making a dvd database and i need some help on the coding.
If you could help that would be great
heres the link for the vb files that i've alrdy created.
http://rhys100.250free.com/dvddatabase.zip
I don't know how to set it up so that when i add a entry it adds it to the .dat file and when i want to search for it it indexes properly
thanks for any suggestions
'
rhys
|
|
|
|
|
I am developing a download manager in C#.NET. How do u find what is the current network bandwidth ?
|
|
|
|
|
Wrong forum!
Post it here (C# Forum[^])
Nibu thomas
Software Developer
|
|
|
|
|
Advance thanks for the suggestions.
Currently I am trying to port my 32-bit sample application (created and maintained for x86 platform) to Itanium machines. I am using the SDK to build it for itanium system.
Since i am not having Visual studio for my 64 bit platform, I am not able to debug in the Itanium machine.
Could u please guide me with the resources and links available along with your suggestins to debug in 64 bit environment.
Regards,
Prabhu elangovan
|
|
|
|
|
|
hi all,
i have successfully used CXImage class and i have loaded gif images in the array of Cximage class and now i am not able to show this image on picture box.
so please anybody know how to this image can show on picture box please answer mw ASAP and if anybody have source code for this please give me .
Bankey Khandelwal
Software Engineer
|
|
|
|
|
i have done this don't west ur time.
Bankey Khandelwal
Software Engineer
|
|
|
|
|
Hi
I am developing the application in VC++.net.
I have created the tab control on the dialog box. and i have two picture controls on it. The tab settings for picture control i have set it to 1 abd 2.
I have set the image to the picture control.Muy problem is that when I don't set the image to the picture control I can see the Tab Control but when the image is set I can't see the Tabcontrol.
Any kind of help is appreciated.
Cheers
"Peace of mind through Technology"
|
|
|
|
|
<vector>
what's the use of this in a code of programs?
i'm just asking because it was used in the code of magic square..
|
|
|
|
|
not insane yet! wrote: what's the use of this in a code of programs?
i'm just asking because it was used in the code of magic square..
Your question is not clear!
Are you asking about this keyword?
this pointer is a pointer that is accessible within member functions (that are not static) of a class. It denotes the object for which the member function was called.
Nibu thomas
Software Developer
|
|
|
|