|
When I go to reopen my workspace project, I only get "CAboutDlg". The other View,Doc and Frame classes are not there, how do I reopen them as well? When I compile, I get the following message:
Compiling...
Exodus.cpp
StdAfx.cpp
Linking...
Exodus.obj : error LNK2001: unresolved external symbol "public: static struct CRuntimeClass const CExodusDoc::classCExodusDoc" (?classCExodusDoc@CExodusDoc@@2UCRuntimeClass@@B)
Exodus.obj : error LNK2001: unresolved external symbol "public: static struct CRuntimeClass const CMainFrame::classCMainFrame" (?classCMainFrame@CMainFrame@@2UCRuntimeClass@@B)
Exodus.obj : error LNK2001: unresolved external symbol "public: static struct CRuntimeClass const CExodusView::classCExodusView" (?classCExodusView@CExodusView@@2UCRuntimeClass@@B)
Debug/Exodus.exe : fatal error LNK1120: 3 unresolved externals
Error executing link.exe.
Exodus.exe - 4 error(s), 0 warning(s)
Thanks
I am using VC++ 6.0.
|
|
|
|
|
My first thought was that you simply needed to delete the project's CLW and NCB files and let Visual Studio rebuild them. However, the linker errors suggest that the files were somehow removed from the project. Have you tried adding them manually?
|
|
|
|
|
Thanks Dave, you were right...I needed to add the files manually. It appears that hardly any of my files opened. What I don't understand is why VC++ doesn't open all the necessary files with the workspace (.dsw) file. It's kind of misleading.
Question: how do I open ALL my project files at once every time I reopen my project. I'm sure you don't have to manually open 2 dozen files every time you want to reopen your program, or do you?
Thanks much, Dave
I'm using VC++ 6.0
|
|
|
|
|
DaveE9th wrote:
I don't understand is why VC++ doesn't open all the necessary files with the workspace (.dsw) file. It's kind of misleading.
Normally it does. But that's not to say that it doesn't occassionally get confused. For a large project I am working on, I have to remove those temporary files at least once per week, sometimes less.
|
|
|
|
|
I'm having problems getting my spin button to work in my application. I've initialized the common controls before trying to use it, and I've set the base, range, initial position and buddy control (an edit box) for the spinner. When I run my application, I don,t see the current position of my spinner in the edit box, and a call to SendDlgItemMessage() to get the current position invariably returns the same number - the one with which the spinner was initialized. What am I doing wrong?
Cheers, nickelplate.
|
|
|
|
|
Sounds like you didn't set the "set buddy int" style, to make the spinner change the contents of the edit box.
--Mike--
"So where does that leave us? Well, it leaves us right back where we started, only more confused than before." -- Matt Gullett
Ericahist | Homepage | RightClick-Encrypt | 1ClickPicGrabber
|
|
|
|
|
That solved the problem. My game is now complete. Thanks a lot.
Cheers, nickelplate.
|
|
|
|
|
Hi!
I'm having problems with an edit control not responding to ctrl+c, ctrl+v and ctrl+x keystroke combinations when it's residing inside a DialogBar.
The edit control doesn't receive a WM_CHAR message for any of the three keystroke combinations as it does in a regular dialog box, and I assume that's the problem.
Anyone know why?
|
|
|
|
|
The problem is probably that you've got an accelerator table that's stealing the messages. You may need to disable the accelerator table when the edit control has focus (handle EN_SETFOCUS and EN_KILLFOCUS).
Ryan
Being little and getting pushed around by big guys all my life I guess I compensate by pushing electrons and holes around. What a bully I am, but I do enjoy making subatomic particles hop at my bidding - Roger Wright (2nd April 2003, The Lounge)
Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late - John Nichol "Point Of Impact"
|
|
|
|
|
Hi,
I am facing similar problem. pl help me out
I have CComboBox placed on CDialogBar. Here I dont't get the crtl+c, ctrl+v and ctrl+x messages on the ComboBox. But I can rightmouse click on combobox and can copy/paste.
Thanks
Sandeep Naik
|
|
|
|
|
Hi All
im printing some stuff out in landscape mode, i have the below
in my OnBeginPrint function to set the orientation of the paper
LPDEVMODE pDevMode;
pDevMode = pInfo->m_pPD->GetDevMode();
pDevMode->dmOrientation = DMORIENT_LANDSCAPE;
pDC->ResetDC(pDevMode);
first time round, it prints in landscape, but the actual text doesnt stretch across
the whole page like it should, the actual text is in the size of portrait mode on a landscape peice of paper
however if i print again, its all fine
and clues any1 ?
thanks
simon
|
|
|
|
|
hi,
i faced the same problem before and I got the solution by adding this code into my OnPreparePrinting(CPrintInfo* pInfo) which I found in a forum.
{
tagPDA pPrintDlg;
AfxGetApp()->GetPrinterDeviceDefaults (&pPrintDlg);
pInfo->m_pPD->m_pd.hDevMode = pPrintDlg.hDevMode;
LPDEVMODE devMode = pInfo->m_pPD->GetDevMode();
if (devMode)
{
// dmOrientation == DMORIENT_PORTRAIT
// dmOrientation == DMORIENT_LANDSCAPE
if (devMode->dmOrientation != DMORIENT_LANDSCAPE)
devMode->dmOrientation = DMORIENT_LANDSCAPE;
GlobalUnlock (devMode);
}
pInfo->m_bDirect = 1;
int rc = DoPreparePrinting(pInfo);
pInfo->m_bDirect = 0;
return rc;
}
hope this will help you.
regards,
sherryfa
|
|
|
|
|
I have an app which is a Dialog app. It then opens another dialog when I press a button. Now what happens is that it receives information via TCP. Both the dialogs have List controls.
When the TCP info comes in, the Main Dialog which has the object of the 2nd dialog, then takes the information and neatens it and says add the information into the List control of the 2nd dialog like this:
2ndDialog.m_list.AddString(information received).
This gives an ASSERTION FAILURE as in the subject. How can I fix this?
Live in peace
|
|
|
|
|
The list box in the second dialog has not been created yet. Has the dialog been opened yet? If not, then you can't add strings to the list box.
Ryan
Being little and getting pushed around by big guys all my life I guess I compensate by pushing electrons and holes around. What a bully I am, but I do enjoy making subatomic particles hop at my bidding - Roger Wright (2nd April 2003, The Lounge)
Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late - John Nichol "Point Of Impact"
|
|
|
|
|
Well the listbox, is declared in the class of the dialog. Okay, the dialog is not opened at that stage. I will try opening it then, and then try DoModal. But I know if will fail at the point when I try AddString. Let me test first then tell u......
DoModal works fine. But now its all a matter of adding to the list when the dialog is opened. Lets try that.
Live in peace
|
|
|
|
|
It does not work at all.
2ndDialog.DoModal()
takes away the execution from the main dialog, so I am not able to addString from the main dlg.
How else can i do it?
Live in peace
|
|
|
|
|
Make an array of strings in your second dialog that the first dialog can add into, then in the second dialog's OnInitDialog() function, add the strings from the array into the list box. CArray will be fine.
Ryan
Being little and getting pushed around by big guys all my life I guess I compensate by pushing electrons and holes around. What a bully I am, but I do enjoy making subatomic particles hop at my bidding - Roger Wright (2nd April 2003, The Lounge)
Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late - John Nichol "Point Of Impact"
|
|
|
|
|
Well, I understand the OnInitDialog is not defined, only as virtual funtion it is defined. Now if I do use that function, without defining anything, the system crashes.
Problem is that the ListBox seems to be in the wrong context. This inevitebly causes the assertion fail. I hope that is correct reasoning though.
How does one use a richedit control, without using a richedit view?
Live in peace
|
|
|
|
|
Ohhh! Thanks I now understant your explanation. I need to define the OnInitDialog function. I see. And then I do what I need to do now.
Thanks
Live in peace
|
|
|
|
|
Does any1 knows anything more (like syntax) then they are ADODB functions?
Nothing in MSDN, NOTHING!!!
Love is the law, love under will.
|
|
|
|
|
|
The names suggest that they are wrapper for the Collection property.
inline _variant_t Recordset15::GetCollect ( const _variant_t & Index ) {
VARIANT _result;
VariantInit(&_result);
HRESULT _hr = get_Collect(Index, &_result);
if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
return _variant_t(_result, false);
}
inline void Recordset15::PutCollect ( const _variant_t & Index, const _variant_t & pvar ) {
HRESULT _hr = put_Collect(Index, pvar);
if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
}
I suppose the valuje of Index depends on the context of the Collection
Michael
'War is at best barbarism...Its glory is all moonshine. It is only those who have neither fired a shot nor heard the shrieks and groans of the wounded who cry aloud for blood, more vengeance, more desolation. War is hell.' - General William Sherman, 1879
|
|
|
|
|
I always get these two errors when trying to include commctrl.h in my application.
c:\program files\microsoft visual studio\vc98\include\commctrl.h(26) : error C2146: syntax error : missing ';' before identifier 'HRESULT'
c:\program files\microsoft visual studio\vc98\include\commctrl.h(26) : fatal error C1004: unexpected end of file found
Error executing cl.exe.
I've added comctl32.lib to the list of library modules in my project settings, but it wouldn't resolve the problem. I use MS Visual C++ 6.0.
Any ideas?
Cheers, Blackmesa.
|
|
|
|
|
Blackmesa wrote:
I've added comctl32.lib to the list of library modules in my project settings, but it wouldn't resolve the problem. I use MS Visual C++ 6.0.
Any ideas?
Your problem has nothing to do with linker settings. The problem is that you need some header included before commctrl.h. What type of project is this MFC, ATL, Win32 API... ?
John
|
|
|
|
|
It's a WIN32 API project.
Cheers, Blackmesa.
|
|
|
|