|
I am sorry to say but i am not able to access messenger from my office now...
Post it here,or you can mail me as well..
Will try to reply you as soon as possible....
So what is the problem?
Dick.lee Solucky wrote:
but following your way,i have that dialog and added the class in the right way, but i still can't use this ActiveX control properly
What happend??
|
|
|
|
|
You must be the man God send you to help me!
Now I can describe what happened: I hope maybe can help you to find the problem out:
When I delete the Microsoft DataGrid Control, Version 6.0(OLEDB) from my dialog CDataBindDlg, and select in the menu,
//////////////////////////////////
CDataBindDlg databinddlg;
databinddlg.DoModal();
//////////////////////////////////
And the dialog can come out, and if I insert BreakPoint here :
//////////////////////////////////
BOOL CDataBindDlg::OnInitDialog()
{
CDialog::OnInitDialog();
<-- BreakPoint
…
//////////////////////////////////
It can run here.
--------------------------------------------------------------------------
But when I added the Microsoft DataGrid Control, Version 6.0(OLEDB), then I select in the menu, nothing happened, dialog didn't come out,
And also program didn't stop at my breakpoint,
I don't know where the problem is
following code can run properly in my new build project,it's the code to bind Recordset to DataGrid
////////////////////////////////////////////
CString strConnection = _T("Driver={Microsoft ODBC for Oracle};Server=tzcenter;Uid=voice_call;Pwd=voice_call;");
//strConnection = _T("Driver={SQL Server};Server=sysdevpdc;Trusted_Connection=Yes;Database=sysDev;uid=sa;pdw=");
if(m_pDb.Open(strConnection))
{
m_pRs = CADORecordset(&m_pDb);
if(m_pRs.Open("t_ywdm_576", CADORecordset::openTable))
//if(m_pRs.Open("sysTable01", CADORecordset::openTable))
{
m_datagridctrl.SetCaption("Clients");
m_datagridctrl.SetRefDataSource(NULL);
m_datagridctrl.SetRefDataSource((LPUNKNOWN)m_pRs.GetRecordset());
m_datagridctrl.Refresh();
}
}
else
{
AfxMessageBox(m_pDb.GetLastErrorString());
DWORD dwError = m_pDb.GetLastError();
//
return FALSE;
}
//
return TRUE; // return TRUE unless you set the focus to a control
-------------------------
Best Wishes sehsiW tseB
-------------------------
You will when you believe!
-------------------------
|
|
|
|
|
Dick.lee Solucky wrote:
When I delete the Microsoft DataGrid Control, Version 6.0(OLEDB) from my dialog CDataBindDlg, and select in the menu,
just mean i created a dialog and do nothing, of course it will show when i use "databinddlg.DoModal()"
But when i added the Microsoft DataGrid Control, Version 6.0(OLEDB), dialog didn't come out, and the program also didn't run to -> CDialog::OnInitDialog(); i don't know where it stopped ...
i guess there are some problems of the initialization of Microsoft DataGrid Control, Version 6.0(OLEDB)
-------------------------
Best Wishes sehsiW tseB
-------------------------
You will when you believe!
-------------------------
|
|
|
|
|
- - - - - - - - - - - - - -
Many nights we prayed with no proof anyone could hear, we were moving moutains long before we knew we could !
Yet now i'm standing here, although we know there's much to fear, hope seems like summer bird too swiftly flown away ...
There can be miracles! When you believe, though hope is frail, it's hard to kill!
Who knows what miracles, you can achieve! When you believe, somehow you will ...
YOU WILL WHEN YOU BELIEVE
|
|
|
|
|
when i insert the control in my main form, a MessageBox will appear:
"failed to create new document" (my VC6 is Chinese Edition,i don't know whether it's the right translation)
i trace and find the information is coming from these code:
-----------------------------------------------------------
// This is a part of the Microsoft Foundation Classes C++ library.
// Copyright (C) 1992-1998 Microsoft Corporation
// All rights reserved.
//
// This source code is only intended as a supplement to the
// Microsoft Foundation Classes Reference and related
// electronic documentation provided with the library.
// See these sources for detailed information regarding the
// Microsoft Foundation Classes product.
#include "stdafx.h"
#ifdef AFX_CORE3_SEG
#pragma code_seg(AFX_CORE3_SEG)
#endif
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
....
int nResult =
::MessageBox(hWnd, lpszPrompt, pszAppName, nType);
-----------------------------------------------------------
i don't know whether it can help you to figure it out.
Thanks!!!!!!!!!!!!!!!!!!!!!
Best wishes!
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Many nights we prayed with no proof anyone could hear, we were moving moutains long before we knew we could !
Yet now i'm standing here, although we know there's much to fear, hope seems like summer bird too swiftly flown away ...
There can be miracles! When you believe, though hope is frail, it's hard to kill !
Who knows what miracles, you can achieve! When you believe, somehow you will ...
YOU WILL WHEN YOU BELIEVE
|
|
|
|
|
for the code i can view, i find when the program run here, the MessageBox appeared:
-----------------------------------------------------------
// stepbystep.cpp : Defines the class behaviors for the application.
//
#include "stdafx.h"
#include "stepbystep.h"
......
// Dispatch commands specified on the command line
if (!ProcessShellCommand(cmdInfo))
return FALSE; <-- return FALSE
-----------------------------------------------------------
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Many nights we prayed with no proof anyone could hear, we were moving moutains long before we knew we could !
Yet now i'm standing here, although we know there's much to fear, hope seems like summer bird too swiftly flown away ...
There can be miracles! When you believe, though hope is frail, it's hard to kill !
Who knows what miracles, you can achieve! When you believe, somehow you will ...
YOU WILL WHEN YOU BELIEVE
|
|
|
|
|
I want to change the header control's height. But find I have no way to do this. I haved used the setitem with the HDI_HEIGHT, but also cann't change the header control's height. Is there any function could do this? Please, could any one help me?
Thanks a lot.
|
|
|
|
|
Set a larger font into the header control.
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
Ravi, thanks a lot.
But is there any way to set the header control's height precisely? I want to owner draw the header control and skin the header control with my own bitmap. So I just want to set the header control's height just equal to the bitmap's heigth. Can i do this precisely?
Thanks
|
|
|
|
|
Sorry, I don't know how to do that. I assume it you've already checked out these[^] articles?
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
Hello All,
I am working on VC++ & SQL Server. I have created a
stored procedure and a DTS package in SQL Server, which I
access from my VC++ application. I am using Installshield
to package and deploy the software.
I want to create the stored procedure and DTS package
in the SQL Server at the time of software installation,
How to achieve this. Is there any script Or SQL Command I
have to run to create them????
Regards
Prax.
|
|
|
|
|
i get an error like this shown below......
fatal error C1010: unexpected end of file while looking for precompiled header directive
i dont seem to find the error.....
help....
|
|
|
|
|
Maybe you can try add:
#include "stdafx.h"
at head of your file if there didn't have one.
i met that problem before,but i don't know whether it's the same as yours?
Best wishes,
---------------------------
You will when you believe!
------------------------
|
|
|
|
|
aaaaaah.....but that doesnt work(precomplied header stuff)....i had tried that out when i searched MSDN.....I get more errors (from 3 errors to 47 errorz!!!!!)
the #include<stdafx.h> is already there in the hearder files that i have loaded.....removing that and adding in the correspondin cpp file also doesnt help.....leadz to more.....
sob.....any other ideas.....
thanx a lot all u guyz for ur answerz.....and expecting u could clear it up for me.....
|
|
|
|
|
You have one reply for every one ?!?!?
-prakash
|
|
|
|
|
yes.....everyone has given the same solution!!!!!
|
|
|
|
|
I think if you provide more info then someone could give a different solution to ur problem .
-prakash
|
|
|
|
|
thank you MR prkash for ur time and help.....I found my mistake......
i got a linker errorz(the 20 errorz),but when i linked the lib (which i hadnt )these were gone!!!!!
thank u very much for ur time and help.....
Happy programmin.....
cheerz.....
|
|
|
|
|
wow! so actually turning off the precompiled header i.e. the solution most of them were giving you were actually working but you started getting different error coz you did not link the required lib which turned out to be more no of errors then before, so you thought that these solutions were wrong!
Cool man.
-prakash
|
|
|
|
|
Hi,
Seems that you have deleted some of the needed headers/endif statement.Have a look @ the msdn with the error code C1010
Sujan
|
|
|
|
|
Hi,
It seems that, this error is beacause of precompiled header file,
you can do one thing change the project settings from
setting tab->c++ tab->Category->Precompiled headers->Check not using precompiled headers.
Now build project, it should work !
Best Regards,
Vishal
|
|
|
|
|
aaaaaah.....but that doesnt work(precomplied header stuff)....i had tried that out when i searched MSDN.....I get more errors (from 3 errors to 47 errorz!!!!!)
the #include<stdafx.h> is already there in the hearder files that i have loaded.....removing that and adding in the correspondin cpp file also doesnt help.....leadz to more.....
sob.....any other ideas.....
thanx a lot all u guyz for ur answerz.....and expecting u could clear it up for me.....
|
|
|
|
|
or turn off precompiled header files in the project settings.
-prakash
|
|
|
|
|
aaaaaah.....but that doesnt work(precomplied header stuff)....i had tried that out when i searched MSDN.....I get more errors (from 3 errors to 47 errorz!!!!!)
the #include<stdafx.h> is already there in the hearder files that i have loaded.....removing that and adding in the correspondin cpp file also doesnt help.....leadz to more.....
sob.....any other ideas.....
thanx a lot all u guyz for ur answerz.....and expecting u could clear it up for me.....
|
|
|
|
|