|
Are other applications crashing? I have been using VC++ 6.0 on XP for some time with no problems. Are you using any addins?
John
|
|
|
|
|
John M. Drescher wrote:
Are other applications crashing?
Nope, nothing has been observed yet.
John M. Drescher wrote:
Are you using any addins?
No, nothing, a naked VC6.0++
~RaGE();
|
|
|
|
|
Did you reinstall VC6 after upgrading to XP?
You can try to apply patch as well
|
|
|
|
|
AlexO wrote:
Did you reinstall VC6 after upgrading to XP?
Yes.
AlexO wrote:
You can try to apply patch as well
What do you mean ?
~RaGE();
|
|
|
|
|
I meant SP (preferably latest, I think it is SP6, but I am not sure). We had some problems with "raw" VC6 as early as NT 4.
|
|
|
|
|
I always apply all the latest service packs before I use my system so I have not tried an unpatched version on XP...
John
|
|
|
|
|
Rage wrote:
VC6.0 without any SP
Stop whatever you're doing and install SP 5. I've seen VC be flaky with its compiles on 2K and XP (the dreaded internal compiler error on perfectly normal code) in the pre-SP5 builds.
--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
|
|
|
|
|
Michael Dunn wrote:
Stop whatever you're doing and install SP 5. I've seen VC be flaky with its compiles on 2K and XP (the dreaded internal compiler error on perfectly normal code) in the pre-SP5 builds.
I couldn't agree more. I had the exact same problem with VS6 before I installed SP5.
// Afterall, I realized that even my comment lines have bugs
|
|
|
|
|
Hi all,
I would like to have a listctrl with multiline support. ie, each report (entry) can have mulitple lines.
how can i do that? any links ?
thanks in advance
hari
Hari Krishnan
|
|
|
|
|
|
I want to load the Accelerator that I have stored in a DLL in the EXE that link it. So I can, for example, press the Accelerator "F1" stored in the DLL and answer to the relative message in the EXE. Is it possible ?
Thank you for any answer.
Andrea
|
|
|
|
|
You can do *anything*. Some ideas on your particular problem include:
In your app init instance, load the dll(s) and extract the custom accelerator tables into a variable (or list, as appropriate).
Override the CWinApp::PreTranslateMessage(). In that handler, call TranslateAccelerator, passing the handle to your custom accelerator table. If you have more than one custom accelerator table, iterate through your list, calling TranslateAccelerator() until either your list members are exhausted or TranslateAccelerator returns non-zero. If TranslateAccelerator() returns non-zero, break and return TRUE from the PreTranslateMessage(). If your list is exhausted before PreTranslateMessage() returns a non-zero value, call the base (CWinApp::PreTranslateMessage()).
Example:
member: CPtrList m_oCustomAcceleratorList;<br />
<br />
BOOL CMyApp::InitInstance()<br />
{<br />
LoadDLLAcceleratorTables(&m_oCustomAcceleratorList);<br />
}<br />
<br />
BOOL CMyApp::PreTranslateMessage(MSG *pMsg)<br />
{<br />
HACCEL hAccel;<br />
POSITION pPos = m_oCustomAcceleratorList.GetHeadPosition();<br />
while (pPos)<br />
{<br />
hAccel = (HACCEL)m_oCustomAcceleratorList.GetNext(pPos);<br />
if (hAccel)<br />
{<br />
if (::TranslateAccelerator(m_pMainWnd->GetSafeHwnd(),hAccel,pMsg))<br />
return TRUE;<br />
}<br />
<br />
return CWinApp::PreTranslateMessage(pMsg);<br />
}
onwards and upwards...
|
|
|
|
|
Thank you very much basementman, I tried and it works. It's perfect for my problem.
Thanks a lot
Andrea
|
|
|
|
|
You can replace CFrameWnd::m_hAccelTable (AfxGetMainWnd ()) with whatever
accelerator you want.
So you can load the accelerator from a dll, then assign it as above.
Iain.
ps. Look up LoadAccelerator, AfxFindResource.
|
|
|
|
|
Hi,
I have a dialog based MFC application which has 2 timers with same interval (say 5 mins) accessing a single resource. A structure instance which is a member variable of the App class is being updated in one timer and the same structure instance is being used in another timer. ( Typically, the memory resource is being accessed for write in one timer callback and for read in another timer callback ). The code snippet something is like this,
CMyFrameDlg::TimerCallback1(...)
{
...
theApp.m_Struct.nVar1 = 10;
theApp.m_Struct.szVar2 = "test";
...
...
}
CMyFrameDlg::TimerCallback2(...)
{
...
...
localnVar = theApp.m_Struct.nVar1;
localszVar = theApp.m_Struct.szVar2;
...
}
The 2 timers get called simultaneously. Issue is, that the values dont get reflected properly in timer2 and while the struct is being accessed in timer2 it is being updated simulataneously in timer1. Both timers belong to the same Thread.
1.) I need to update the same resource in one timer and use it for some other purpose in the second timer. Is it possible ?
2.) I also have certain WM_.. messages posted from another thread to this thread on which a callback gets invoked. And this callback also accesses the same structure instance, but the values are not properly updated. Why is it so ?
Point is.. accessing the same resource ( memory) in multiple timers of the same thread. And also accessing same resource in multiple callbacks of the same thread (like user defined WM_message callbacks). Is there any restriction or way to do that ?
Anxiously Waiting for a reply
Cheers
Raja
|
|
|
|
|
Raja,
Why dont you consider using the Critical Section to avoid simultaneous access to the same resource... So, when the timers get called simultaneously, only one timer accesses the resource and the other waits till the critical section is released. If the application spans processes, you should be considering Mutex... Hope it helps you...
Harsha
----------------------------------
http://www.ece.arizona.edu/~hpg
----------------------------------
|
|
|
|
|
hi Harsha
Critical section can be used only when resource is getting accessed between 2 threads. What raja needs a way to share resource within same thread.
|
|
|
|
|
Thanks for your reply. I would like to know if critical sections can be
used to lock a section of code within the same thread. Critical Sections within same thread - possible ?
Cheers
Raja
|
|
|
|
|
I am sorry that I misunderstood the question... Anyway, I think critical sections can be used within the same thread. Although developed for multithreading, I suppose that critical sections do not understand which thread they should give access; they just know which resource to lock.
Harsha
----------------------------------
http://www.ece.arizona.edu/~hpg
----------------------------------
|
|
|
|
|
I have a slider control (from http://www.codeproject.com/editctrl/smartedit.asp) in a dialog, I want to receive notification in the dialog.
now, the HScroll and VScroll are handled in the slider class with ON_WM_HSCROLL_REFLECT and ON_WM_VSCROLL_REFLECT, which, as far as I understand, will override the message from the dialog ( ON_WM_VSCROLL and ON_WM_HSCROLL ).
Is there a way to let the message percolate to the dialog, as well as the control itself ?
I read the technical note TN062, and I'm not sure I understand correctly how this works.
Can I replace the WM_VSCROLL and WM_HSCROLL messages with WM_NOTIFY_EX ?
Thanks.
Maximilien Lincourt
For success one must aquire one's self
|
|
|
|
|
Message reflection does not influence normal message behaviour. Your dialog can handle WM_HSCROLL and WM_VSCROLL with no problems at all. Just handle them exactly as usual (ON_WM_VSCROLL() etc.)
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"
|
|
|
|
|
I'm trying to set a breakpoint with a condition, but without success. What I need is a condition with a CString, however the following expression does not work:
<br />
m_name == "my name"<br />
Is this even possible, or am I doing someting wrong?
|
|
|
|
|
can you modify the Code ?
if so, put an ASSERT in the code where you want to check for the condition.
Maximilien Lincourt
For success one must aquire one's self
|
|
|
|
|
I could do that, but I was wondering if it was possible to set the breakpoint condition this way.
|
|
|
|
|
you can set conditional breakpoints only on intrinsic comparisons.
The best you can do is bool b = m_name == "name"; and set a bp on the next line with the condition b==true
"Der Geist des Kriegers ist erwacht / Ich hab die Macht" StS
sighist | Agile Programming | doxygen
|
|
|
|