|
This is a header file of a class named CDCDlg.cpp which is derived from CDialog.
"Dream bigger...Do bigger...Expect smaller"
aji
-- modified at 7:26 Monday 3rd July, 2006
|
|
|
|
|
i think file is DCDlg.cpp not CDCDlg.cpp because C DCDlg.cpp is for class
whitesky
|
|
|
|
|
public:
CDCDlg(CWnd* pParent = NULL); // standard constructor
// This is the constructor for your class.
// Dialog Data
//{{AFX_DATA(CDCDlg)
enum { IDD = IDD_DC_DIALOG };
// NOTE: the ClassWizard will add data members here
//}}AFX_DATA
This is where the class wizard adds all the data members that you create using the class wizard (ex CEdit , CButton etc)that is why those //{{ brackets are placed to inform the class wizard where to add the code.
and any overrides ex declaration for PreCreateWindow the declaration is added in the protected section that you do using the class wizard.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
-- modified at 7:28 Monday 3rd July, 2006
|
|
|
|
|
a code (i think create with VC6) and a header for DCDlg.cpp (maybe)
this line CDCDlg(CWnd* pParent = NULL); is like this
CDCDlg::CDCDlg(CWnd* pParent )
: CDialog(CssDlg::IDD, pParent)
{
}
enum { IDD = IDD_DC_DIALOG }; id from your Dialog
<br />
protected:<br />
virtual void DoDataExchange(CDataExchange* pDX);
void CDCDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
}
whitesky
|
|
|
|
|
|
chris175 wrote: I didnt find any function to do this but it might help.
are you sure - report_error looks like it might do the trick - else it points to an include sqlcodes.h that might have the strings in an array you can use
as for i18n .. hmm you might find a german version of the error codes/text somewhere in the install
hth
'g'
|
|
|
|
|
Thanks for the response. I have researched report_error and found tried using it. I am having trouble finding examples on how to use it and what it does exactly. I am guessing it displays a message to the user? I found 1 example searching on google http://webkemper1.informatik.tu-muenchen.de:8080/interna/db2/en_US/index.htm?openup=ad/t0009587.htm[^]. It is not a very good example because I took that same code and placed it into my project and I get and error stating "Unhandled exception in qadocm.exe (DB2QG.dll): 0xC00..005: Access Violation.
Chris
|
|
|
|
|
HI,
I have delevoped a Client Server multithreaded application using CSocket, I am getting Socket Notification Sink error.
Wht iy is ? How can remove this ?
Thanks
Regards.
|
|
|
|
|
look Here[^]
"A winner is not one who never fails...but the one who never quits"
|
|
|
|
|
How does I use .jar lib in visual C++
|
|
|
|
|
Why do you really want to use the java library in C++?
AFAIK , You will need to host the JVM for that ..
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
You can run jar file if and only if you are hosted JVM. But you can open, view, read and modify the Jar file from VC++ since Jar file has the same file format as ZIP file.
http://www.artpol-software.com/index_zip.html
Here is library which can be used for accessing zip archives.
Benoy Bose
|
|
|
|
|
You might want to have a look at Java Native Interface, JNI, found here: JNI
-- modified at 9:22 Monday 3rd July, 2006
fogot to add the link
|
|
|
|
|
I am a beginner. I am trying to display the HWND when i use certain Win32 functions such as GetForegroundWindow() for debugging purposes. When i use MessageBox or OutputDebugString such as below...
m_foreHwnd1 = GetForegroundWindow();
MessageBox(NULL, (LPCSTR)m_foreHwnd1, "INFO", MB_OK);
OutputDebugString("ForeHwnd1: ");
OutputDebugString((LPCSTR)m_foreHwnd1);
OutputDebugString("\n");
... I get errors like the following:
First-chance exception at 0x77e26673 in SendFocusWin.exe: 0xC0000005: Access violation reading location 0x00090548.
Unhandled exception at 0x77e26673 in SendFocusWin.exe: 0xC0000005: Access violation reading location 0x00090548.
Can i display the HWND so i can see what the heck is going on in my code? What is the How To?
|
|
|
|
|
First thing you need to learn is that you do not cast things without knowing exactly what you are doing as you can shoot yourself in the foot, like what you have done here.
m_foreHwnd1 = GetForegroundWindow();
CString szMessage;
szMessage.Format(_T("ForeHwnd1: 0x%08X\r\n"), m_foreHwnd1);
OutputDebugString(szMessage);
|
|
|
|
|
Did you try Format function of CString
else try this
CString strHwnd;
strHwnd.Format(_T("Handle is: %d\n"), m_foreHwnd1);
OutputDebugString(strHwnd);
"Dream bigger...Do bigger...Expect smaller"
aji
|
|
|
|
|
GetForegroundWindow() API will return handle to active window with which user is interacting, so in debugging mode you constantly switch between your app and debug window. so its difficult to know window handle.
Not sure what are you trying to do, but try this to display window handle in output window.
CString str;<br />
str.Format("%x",m_foreHwnd1);<br />
OutputDebugString(str);
Hope this helps
|
|
|
|
|
If u r able to solve ur problem with our answers then please tel it so that we get some confidence
"Dream bigger...Do bigger...Expect smaller"
aji
|
|
|
|
|
I think i posted on the wrong forum. I now see that there is a forum that supports STL questions, which i think would help come up with a ANSI version of the solution you folks provided. Sorry. But thanks for the excellent response!
|
|
|
|
|
HI PLZ TELL ME HOW TO CREATE SPLIT WINDOW IN MFC(SDI)
I CREATE IT BUT IT DOES NOT WORK
I ALREADY PUT MY QUESTION BUT NOBODY SOLVE MY PROBLEM
PLZ SOLVE BY GIVING EXAMPLE
Ashish Dogra
MCA
Noida
|
|
|
|
|
If you really want to split a window and know how it is done a simple way is to Create a new MFC Application and in the fourth or Fifth step(I don't remember exactly) you can choose for Window Explorer view instead of MFC View.
In this way you will be able to see a window split in two parts just like the explorer.
If you want to see the code open the mainframe.cpp file and there you can study
OnCreateClient function
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
thanks sir
but i want to split it into four or more panes and also add scroll bars for each window.
plz tell me sir
Ashish Dogra
MCA
Noida
|
|
|
|
|
You just have to get with that in the same manner as in my previous post.Just pass the number of partitions you create to CreateStatic and that number of classes that are derived from CView will help.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
try this:
BOOL CMainFrame::OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext)<br />
{<br />
BOOL res = m_splilter.CreateStatic(this,2,1);<br />
m_splilter.CreateView(0,0,RUNTIME_CLASS(CsplView),CSize(0, 200), pContext);<br />
m_splilter.CreateView(1,0,RUNTIME_CLASS(COtherView),CSize(200, 200), pContext);<br />
return TRUE;<br />
}
Where CsplView is a default view class generated by Wizard
and COtherView is class derived from Cview.
Hope these help.
|
|
|
|
|
Can we subclass scrollbar of an listbox or combobox into a custom one?
SaRath.
"It is your attitude, not your aptitude, that determines your altitude - Zig Ziglar."
My Blog | Understanding State Pattern in C++
|
|
|
|