visual-c++-6

Is it time to say goodbye to VC6 compiler?

≯℡__Kan透↙ 提交于 2019-12-03 03:30:35
Of late I'm facing the issues that points finger to VC6 compiler. Few of them are: A function-try-block doesn't work. Related Q in-class constant doesn't work. __FUNCTION_ (Macro to get function name) doesn't work The latest addition is it doesn't allow void functions to be passed as part of for_each. The below example is not compiling with VC6 compiler. It says "error C2562: '()' : 'void' function returning a value". It looks like VC6 doesn't like void functions to be passed to for_each. class Temp { public: Temp(int i):m_ii(i) {} int getI() const { return m_ii; } void printWithVoid() { cout<

The compilation process

安稳与你 提交于 2019-12-02 21:16:13
Can anyone explain how compilation works? I can't seem to figure out how compilation works.. To be more specific, here's an example.. I'm trying to write some code in MSVC++ 6 to load a Lua state.. I've already: set the additional directories for the library and include files to the right directories used extern "C" (because Lua is C only or so I hear) include'd the right header files But i'm still getting some errors in MSVC++6 about unresolved external symbols (for the Lua functions that I used). As much as I'd like to know how to solve this problem and move on, I think it would be much

CHtmlView Navigate2 and ExecWB Execution

北城余情 提交于 2019-12-02 16:22:57
问题 This is Linking to my previous question. I have managed to make a new view derived from the CHtmlView for the new type of View for the my application generated reports but I find soem problem in the new View class CMyHtmlView : public CHtmlView { protected: // create from serialization only CMyHtmlView(); DECLARE_DYNCREATE(CMyHtmlView) // Attributes public: CReportDoc* GetDocument(); CString m_sFileName; // Operations public: // Overrides // ClassWizard generated virtual function overrides //

How to make an MDI child window stay on top of its siblings?

最后都变了- 提交于 2019-12-02 12:34:41
问题 This question is related to my previous one. I have an MFC (VC6) MDI Application which has several MDI child windows acting as different views for one document. Is it possible to set one of those frames to stay on top of the others? I have tried to call SetWindowPos( &GetParentFrame()->wndTopMost, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE); and ModifyStyleEx(0, WS_EX_TOPMOST); from the CMDIChildWnd but neither appears to work. 回答1: In your CMDIChildWnd class (usually CChildFrame), add a static HWND

CHtmlView Navigate2 and ExecWB Execution

自古美人都是妖i 提交于 2019-12-02 08:12:16
This is Linking to my previous question. I have managed to make a new view derived from the CHtmlView for the new type of View for the my application generated reports but I find soem problem in the new View class CMyHtmlView : public CHtmlView { protected: // create from serialization only CMyHtmlView(); DECLARE_DYNCREATE(CMyHtmlView) // Attributes public: CReportDoc* GetDocument(); CString m_sFileName; // Operations public: // Overrides // ClassWizard generated virtual function overrides //{{AFX_VIRTUAL(CMyHtmlView) public: virtual void OnDraw(CDC* pDC); // overridden to draw this view

How to make an MDI child window stay on top of its siblings?

回眸只為那壹抹淺笑 提交于 2019-12-02 02:51:19
This question is related to my previous one. I have an MFC (VC6) MDI Application which has several MDI child windows acting as different views for one document. Is it possible to set one of those frames to stay on top of the others? I have tried to call SetWindowPos( &GetParentFrame()->wndTopMost, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE); and ModifyStyleEx(0, WS_EX_TOPMOST); from the CMDIChildWnd but neither appears to work. In your CMDIChildWnd class (usually CChildFrame), add a static HWND m_hTopWnd . Set it equal to the HWND of the child you want to be always on top. Handle WM_WINDOWPOSCHANGED

Array of structs - initialization errors

岁酱吖の 提交于 2019-12-01 20:21:36
问题 I'm creating some data structures here (with MFC), compiling in MS Visual C++ 6.0 (yes, it's old). struct SOpcodeData { BYTE m_byDataType; DWORD m_dwMinValue; DWORD m_dwMaxValue; WORD m_wRepeat; }; const BYTE DATA_U8 = 0; const BYTE DATA_U16 = 1; const BYTE DATA_U32 = 2; SOpcodeData MY_BYTE = { DATA_U8, 0, UCHAR_MAX, 1 }; SOpcodeData MY_WORD = { DATA_U16, 0, USHRT_MAX, 1 }; SOpcodeData MY_DWORD = { DATA_U32, 0, UINT_MAX, 1 }; This code compiles with no errors or warnings. But when I try to

Cannot convert from 'const wchar_t *' to '_TCHAR *'

时光毁灭记忆、已成空白 提交于 2019-12-01 17:04:56
_TCHAR* strGroupName = NULL; const _TCHAR* strTempName = NULL; //Assign some value to strTempName strGroupName = _tcschr(strTempName, 92) //C2440 I get an error at the above line while compiling this code in VS2008. In VC6 it compiles fine. Error C2440: '=' : cannot convert from 'const wchar_t *' to '_TCHAR *' What seems to be the problem and how do I fix it? Try casting it as strGroupName = (_TCHAR*)_tcschr(strTempName, 92); Seems to me that VS2008 got a little more strict on type casts, and won't automatically do them in some cases. strGroupName = const_cast<_TCHAR*>( _tcschr(strTempName, 92

vc++ 6.0 serial communicaton

拟墨画扇 提交于 2019-12-01 14:57:24
In vc++ i am using MScomm for serial communication, i received data in this format 02120812550006050.0, i am not gettng how to read this ,in which format it is, begning starting frame and at the end ending file, remaing i dont know. EDIT 1: it contains date time and data how i can seperate this one The funny characters are markers indicating things like record start, record end, field separator and so on. Without knowing the actual protocol, it's a little hard to tell. The data is a lot easier. Between the 000f and 0002 markers you have a date/time field, 2nd of December 2008, 12:55:00.

VC++6 error C2059: syntax error : 'constant'

丶灬走出姿态 提交于 2019-12-01 08:10:47
Made this simple class with MSVC++ 6.0 class Strg { public: Strg(int max); private: int _max; }; Strg::Strg(int max) { _max=max; } Sounds good if I use it in : main() { Strg mvar(10); } But Now If I use it in an another class : class ok { public: Strg v(45); }; I get message error : error C2059: syntax error : 'constant' Could you tell me more please ? Should be: class ok { public: Strg v; ok() : v(45) {} }; Non-static member variables that don't have default constructors (v in this case) should be initialized using initialization lists . In functions (like main) on the other hand you can use