|
Is it possible to use the VC++ 2008 compiler with Visual Studio 2005, so that you benefit from the smaller code produced by the VC++ 2008 compiler, but yet keep compatibility with Win98 (ie. still use VC++ 2005 runtime libraries) ?
|
|
|
|
|
as long as you don't call specific APIs which Win98 weren't providing yet, yes, you can...
|
|
|
|
|
Do you just copy the relevant compiler files:
c1.dll
c1xx.dll
c2.dll
cl.exe
or should the whole bin folder be copied ?
|
|
|
|
|
either provide every linked dll or static link the dependencies...
but don't copy the compiler itself !!!
humm, it seems i misunderstood your original question. unfortunately, no, you can't use VC++2005 compiler with VS2008 (or vice versa). but you still can compile an application targetting Win98 with VC++2005 or VC++2008
|
|
|
|
|
|
Just use your 2008 and set the _WIN32_WINNT and WINVER variables to indicate that you want to target Win98 (0x0410)
Judy
|
|
|
|
|
|
Didn't notice that change for 2008. Sorry
|
|
|
|
|
Be aware that the smaller code in VS 2008 is probably due to the NOWIN98 linker setting being automatic. In VS 2005 you can set this in the linker optimization properties. Your app will run slightly slower on Windows 98 as a result, but it will run.
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|
|
Hi, In the past I've used a tool that analyzes a visual studio project's resource.h/rc files to ensure that they are not corrupted. (IE: No two resources share the same the ID.)
Does anyone else know of this tool? I forgot its name.
Thanks!
|
|
|
|
|
|
Hello,
Can anyone please tell me how to add my MDI child windows to the task bar so that when a user has multiple documents open they all appear in the task bar like in Word or Excel. I've tried setting the WS_EX_APPWINDOW style of my CMDIChildWnd derived classes but this doesn't seem to work.
Thanks!
Sylv
|
|
|
|
|
|
Hello,
In eVC++ with WinCE5 on ARMV4I, the application is developed.
In my Property Sheet, in a page, on a button click the program executes the following code.
void CPPage1::GetData() {
bool result = true;
CString csValue;
GetDlgItem(IDC_OpNo_EDIT)->GetWindowText( csValue );
m_opNo = atoi((char*)(LPCTSTR)csValue);
csValue.Format(_T("%d"), m_opNo);
AfxMessageBox(csValue);
OperatorDetails od;
od = g_db->GetOperDetails(m_opNo);
CString s(_T("Map Count = "));
s.Format(_T("%s %d \n %s %s"), s, g_db->GetOperMapCount(), _T("Page1::Got OD"), od.GetOperName());
AfxMessageBox(s);
if (od.GetOperatorNo() == 0 && od.GetOperName() == "") {
AfxMessageBox(_T("Operator No Not found. Check Out!"),MB_ICONWARNING);
result = false;
} else if (od.GetOperName() == "") {
AfxMessageBox(_T("Error Reading Data!"),MB_ICONWARNING);
result = false;
}else {
CString nm = od.GetOperName();
m_name = nm;
GetDlgItem(IDC_NAME_LABEL)->SetWindowText(nm);
AfxMessageBox(nm);
EnableConfirm(true);
}
if (result == false) {
m_opNo = 0;
GetDlgItem(IDC_OpNo_EDIT)->SetWindowText(_T(""));
GetDlgItem(IDC_OpNo_EDIT)->SetFocus();
}
return;
}
g_db is an extern variable pointer to an object. I don't get any compiler/liner etc error or warnings. OnApply is called, everything is executed & then I get "Fatal Application Error" window saying application has performed an illegal operation & will be shut down. If problem continues contact vendor. Exception: 0xC000001D Address: 0050328.
If I avoid the above code, then I don't get this exception. Since it is a WincE with eVC application, I can't debug more to know where & what excatly the error line is. Can anyone help me know, what is illegal in the above code which happens to raise this exception.
Thanks
Terry
|
|
|
|
|
Trupti Mehta wrote: Since it is a WincE with eVC application, I can't debug more to know where & what excatly the error line is.
No, I don't quite get it. Can't you use ActiveSync and debug the application straight from your IDE? You could as well use simple message boxes or a log file to analyze at what point the application terminates.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
Rajesh, I use eVC++ & run the application via ActieSync. But I believe that I cannot debug in this scenario. Like On Abort/Retry/Ignore, press Retry & the debugger will come on the error line. No that's not possible.
What all AfxMessageBox, you see all are for debugging purpose only mainly.
Thanks
Terry
|
|
|
|
|
Trupti Mehta wrote: ...then I get "Fatal Application Error" window saying application has performed an illegal operation & will be shut down.
Before or after the calls to AfxMessageBox() ?
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
<pre>
BOOL CPPage1::OnApply()
{
// TODO: Add your specialized code here and/or call the base class
AfxMessageBox(_T("CPPage1:: OnApply\n"));
g_pView->SendMessage(WM_USERAPPLY);
return TRUE; //CPropertyPage::OnApply();
}
LRESULT CMC_AppView::OnUserApply(WPARAM wParam, LPARAM lParam)
{
TRACE(_T("VIEW::OnUserApply - wParam %x\n"), wParam);
CString t("Operator No = ");
AfxMessageBox(t); // m_sheet.m_page1.m_opNo);
// m_sheet.SetAttributes();
m_sheet.EndDialog(IDOK);
return 0;
}</pre>
OnApply calls the OnUserApply. I get the "Operator No = " AfxMessage & then the fatal error comes.
Thanks
Terry
|
|
|
|
|
Trupti Mehta wrote: AfxMessageBox(t);
m_sheet.EndDialog(IDOK);
What happens if you remove either of these two statements?
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Afx.. was from first. Error is coming from the code attached in first message & in the mean while had also added EndDialog. Will try removing EndDialog & check out next week.
On research I have known that this exception stands if soething is not closed properly. Do you see any other possibility in the attached code or eVC has any internal problem accessing an more than 1 external object which does all database related activitlies. But the methods used here just does retriving objects from map which has all records read from the file.
Thanks
Terry
|
|
|
|
|
I believe WinCE5 uses Unicode, and you have MOST of your code set for that (by using the _T macro).
However, this line
Trupti Mehta wrote: m_opNo = atoi((char*)(LPCTSTR)csValue);
is not Unicode. Use
m_opNo = _tstoi((LPCSTSTR)csValue); instead.
Hope that helps.
Karl - WK5M
PP-ASEL-IA (N43CS)
PGP Key: 0xDB02E193
PGP Key Fingerprint: 8F06 5A2E 2735 892B 821C 871A 0411 94EA DB02 E193
|
|
|
|
|
krmed wrote: is not Unicode. Use
m_opNo = _tstoi((LPCSTSTR)csValue);
Or even better use no explicit cast:
m_opNo = _tstoi(csValue);
Steve
|
|
|
|
|
Hi all,
I'm looking for some snippets of code that show me how to get the individual pixel colors out of a bitmap or other graphic file format. So if it is given a file, it would find out what color each pixel is, and maybe output it to a text file or something.
Any ideas? This is for a really cool project for little kids, and I'm excited to get started. Any guidance would be great.
Thanks for your time,
Michael Fritzius
|
|
|
|
|
matrix2681 wrote: his is for a really cool project for little kids, and I'm excited to get started. Any guidance would be great.
Using GetPixel[^] is an option. Also you can use ::LoadImage to load a bitmap from file.
Nibu babu thomas
Microsoft MVP for VC++
Code must be written to be read, not by the compiler, but by another human being.
Programming Blog: http://nibuthomas.wordpress.com
|
|
|
|