|
I need ActiveX because is problem with resource.h - collision in external application
int CMYCtrl::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (COleControl::OnCreate(lpCreateStruct) == -1)
return -1;
// TODO: Add your specialized creation code here
m_pMainDialog= new CCanonCameraXPropPage;
m_pMainDialog->Create(IDD_CANONCAMERA_DIALOG,this);
m_pMainDialog->ShowWindow(SW_SHOW);
return 0;
}
there I created main dialog. Then I created 3 CWnd object:
BOOL CMainDlg::OnInitDialog()
{
CDialog::OnInitDialog();
if ( !CreateCaptureObject()){
return false;
}
m_pCaptureObject->CreateImageObject(rcTmpRect);
m_pCaptureObject->CreateParametersObject(rcTmpRect);
and after clicked on button in these objects is not call event clicked on button...I dont know why..
These Cwnd object are not correct I thing... but I need it..
capture object is created so:
m_pCaptureObject= new CCaptureObject(rcTmpRect,this);
m_pCaptureObject->Create(IDD_CAPTUREOBJECT,this);
this in function Create is Correct??? this have been extern application or ActiveX???
|
|
|
|
|
So thanks, I have got it..
There was problem that dialogs on CWnd objects must properties Control = false and I had true..
Can you tell me as to create ActiveX control from MutiDocument/View project????
Because I have next project which is create on MutiDocument/View architecture and I need reconstruct on ActiveX...
Thanks
|
|
|
|
|
Congrats for that man.
Let's call it a day for today so that you can enjoy what you learnt today.
Let's meet tommorrow.
Take care
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Hi,
I wish you good day . Thanks for the tips from yesterday..
Can you tell me as to create ActiveX control from MutiDocument/View project????
Because I have next project which is create on MutiDocument/View architecture and I need reconstruct on ActiveX...
Thanks
|
|
|
|
|
Hi.
Can you emphasize a bit on what you want to do exaclty in the active x control for the multidocument view architecture. What's the basis of the application you want to build and if you want to use a active x control for what purposes?
Make yourself clear . Maybe I or someone else here can help you on this.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
I need it because I need include this MultiDocument/View application to the large project - therefore
I need create ActiveX control from MultiDocument/View application... Because is problem with resource
between projects.. Sorry, my English is not very good
Do you have any skills about this problem?
|
|
|
|
|
I haven't given a try to something of this sort.But in my opinion you can go for developing a dll instead of a full fledged AXcontrol. You can invoke the methods of the dll which will be a lot more easier. ActiveX Controls are developed more when you need to use them time and again in a certain application.So you start on something and then we can look into what your problem really is.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Hi to all,
I've this problem:
I create a datagram socket. I create datagram socket with function 'Create'. The line of my code when I create is:
m_pSocket->Create(port,SOCK_DGRAM,FD_READ | FD_WRITE | FD_OOB | FD_ACCEPT | FD_CONNECT | FD_CLOSE,strAddress);
Now when I send, I' ve error in runtime at this line:
m_pSocket->SendTo(Response,dwSize,porttx,ipAddress);
the error is 'svchost: sink socket notification'. Where I make an error??I can't find it!!
|
|
|
|
|
m_pSocket is a instance of which class?
|
|
|
|
|
which is the fastest MFC Storage Class while doing large data operations
NiLeSh KoRpE
|
|
|
|
|
MFC storage classes all suck, you should use the standard containers. Then, speed is a function of what TYPE of operations you want to do, that's why there's several type of containers. The same is true of MFC containers, but they were written prior to the standard, and are not designed to compete with it.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
One general piece of advice if you want speed: Make sure, regardless what functions/methods you will use, that (xx)printf functions isn't used.
I once had to optimize a magnetic tape writing piece of code and I increased it's speed by a factor 7, just by omitting one single call to sprintf().
(I replaced it with quite a few strcpy/strcat/itoa).
|
|
|
|
|
NiLeSh KoRpE wrote: which is the fastest MFC Storage Class while doing large data operations
What type of data operation do you want to do?
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
I was told CMaps are faster for any type of operation...
NiLeSh KoRpE
|
|
|
|
|
NiLeSh KoRpE wrote: I was told CMaps are faster for any type of operation...
For Searching Operation!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
OK thank you Alok.
If you have (VC Forum Q&A :- II/ III) link pl send it to me.
NiLeSh KoRpE
|
|
|
|
|
NiLeSh KoRpE wrote: If you have (VC Forum Q&A :- II/ III) link pl send it to me.
The VC Forum Q&A II and III isn't published Yet, they are in pipeline!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
Hai,
I am trying to add contents to list box but i am getting run time error (VC++ Debug Library)
Can anyone help me with this.
I used F10 and checked run time error was generated at this line
status.m_OUT.AddString(e->filename);
void Index :: readFiles (sortentry* e)
{
---
----
----
if ((s = (char*)strrchr(e->filename, '/')) == NULL)
{
CStatusDlg status;
status.m_OUT.AddString(e->filename);
}
}
Regards,
Vinay Charan CN.
|
|
|
|
|
Is the listbox created when you add items to it?
The usual place to intiate controls is in OnInitDialog.
|
|
|
|
|
you use
CStatusDlg status;
status.m_OUT.AddString(e->filename);
I guess m_OUT.m_hWnd is NULL
whitesky
|
|
|
|
|
Hai,
So what shd be done ??? Can u help me with this.
|
|
|
|
|
I tested like this
<br />
CAnswer m_Answer;<br />
m_Answer.m_List1.AddString("A");
hWnd=0x0000 and m_Answer.m_List1 is=0x0000<br />
--------------------
of course CTest2 is CDialog
you can use of course i suggest you created your dialog in one function like OnInitDialog
and you can use from it
<br />
CAnswer m_Answer;<br />
m_Answer.Create(IDD_TEST2);<br />
m_Answer.m_List1.AddString("A");<br />
m_dlg and handle from List is valid
whitesky
|
|
|
|
|
Hai,
I made the changes as below as u said but still i am getting error.
void Index :: readFiles (sortentry* e)
{
FILE *fp;
char *s;
static int fnum = 0;
int wds = 0;
if (e != NULL) {
readFiles (e->left);
fp = fopen (e->filename, "r");
fnum++;
CStatusDlg status;
status.Create(IDD_INDEX_STATUS_DIALOG);
if ((s = (char*)strrchr(e->filename, '/')) == NULL)
{
status.m_OUT.AddString(e->filename);
}
else
{
status.m_OUT.AddString(e->filename);
}
---
=----
}
|
|
|
|
|
what is it sortentry* e?
whitesky
|
|
|
|
|
Hai,
it just Receives file names from other functions.
|
|
|
|