|
|
Dear All,
I am working on VC++ and developing a tool for Weather monitoring system.
Here I am facing problem in displaying different views for same dateset from the document class, where all the calculations are take place.
Here I am using SDI Multiple views architecture.All (Two) views are controlled by the menu and they are switching fine.
At this moment only one view is connected to the document and displaying the date.Second view is not updating the data implicitly.
Please suggest me an idea to update the data to both views concurrently.
Thanks in Adavance
Madhu
|
|
|
|
|
use Invalidate() or an user defined PostMessage to inform the view to redraw.
Press F1 for help or google it.
Greetings from Germany
|
|
|
|
|
Hi KarstenK,
Thanks for your prompt reply and valuable suggestion.
I did try with Invalidate().
I have wrote code as follows
/ / This is View1 connected to the document with
void CStringView::OnDraw(CDC* pDC)
{
CPoemDoc* pDoc = GetDocument();
pDoc->UpdateAllViews(NULL);
}
//This is View2 to be updated
void CHexView::OnUpdate(CView* pSender, LPARAM lHint, CObject* pHint)
{
// TODO: Add your specialized code here and/or call the base class
Invalidate();
}
But it is not triggering OnDraw() of CHexView().
I do not have any idea about user defined PostMessage to redraw.
Please give me some idea to move on...
Thanks
Madhu K
|
|
|
|
|
are you shure that CHexView::OnUpdate() got called.
use RegisterMessage() to get a valid message id and use PostMessage() to send it to your CHexView-Window.
Write a message handler
Read the msdn or google for the bold stuff
Press F1 for help or google it.
Greetings from Germany
|
|
|
|
|
I am getting an error like
ExceptionAttacher.obj : error LNK2019: unresolved external symbol "int __cdecl RecordExceptionInfo(struct _EXCEPTION_POINTERS *,char const *)" (?RecordExceptionInfo@@YAHPAU_EXCEPTION_POINTERS@@PBD@Z) referenced in function "int __stdcall AfxWinMain(struct HINSTANCE__ *,struct HINSTANCE__ *,wchar_t *,int)" (?AfxWinMain@@YGHPAUHINSTANCE__@@0PA_WH@Z)
What should I do to remove this linker error? Plz help me.
Thanks
|
|
|
|
|
where is this function defined? A linker error usually means that the compiler is unable to find the definition of the function. You may need to specify the library for it under the linker settings.
You need to google first, if you have "It's urgent please" mentioned in your question.
_AnShUmAn_
|
|
|
|
|
this function is defined in a file named ExceptionHandler.cpp .
I am not getting that what to do to remove this linker error?
Plz provide any solution if possible. Thank You.
|
|
|
|
|
are you sure this function is defined and declared and you have included the header file for this class.
You need to google first, if you have "It's urgent please" mentioned in your question.
_AnShUmAn_
|
|
|
|
|
|
Did you add this ExceptionHandler.cpp file to your project ?
|
|
|
|
|
Obviously,It is added in my project. Now, I am not getting that how to remove this error?
plz help me.
Thanks.
|
|
|
|
|
Purish Dwivedi wrote: Obviously,It is added in my project.
Why obviously ? Seing your error and the fact that you are sure that you have a body for your function, then I would say that it is obvious that the file is not added to your project.
I am talking here about the cpp file, not the h file. How did you add this file to your project ?
Can you also post the function prototye (which is in the header file) and the function body (which is in the cpp file) ? Please use the code tag to format the code properly when posting.
|
|
|
|
|
|
Purish Dwivedi wrote: Prototype is as:
int __cdecl RecordExceptionInfo(PEXCEPTION_POINTERS data, const char *Message);
Purish Dwivedi wrote: Function definition is as:
int __cdecl RecordExceptionInfo(PEXCEPTION_POINTERS pExceptPtrs,
LPCTSTR lpszMessage)
The underlined bits have been added.
Note that if you're building for Unicode then the first is an ANSI string and the second is Unicode and so the second in NOT the definition of the first.
Steve
|
|
|
|
|
The arguments of the function prototype do not match the arguments of the function definition if UNICODE is defined (in which case, LPCTSTR will resolve to a wchar string, and not a char string). So, replace the char in the function prototype by the same LPCTSTR and this should fix your problem.
|
|
|
|
|
thanks, I have removed this error.
|
|
|
|
|
The error message seems to be saying:
A function with the signature int __cdecl RecordExceptionInfo(struct _EXCEPTION_POINTERS *,char const *) is referenced in the file "ExceptionAttacher.???" from the function int __stdcall AfxWinMain(struct HINSTANCE__ *,struct HINSTANCE__ *,wchar_t *,int) . Clearly the function int __cdecl RecordExceptionInfo(struct _EXCEPTION_POINTERS *,char const *) is declared or we would have a compiler error instead, but it's not defined or the file it's defined in is not included in the project because the linker can't find it.
PS: Why the function AfxWinMain defined in "ExceptionAttacher.xxx"? This function is part of the MFC framework and not meant to be user defined.
Steve
|
|
|
|
|
hello all,
I want to get search update for remote machine.Means how many updates it wants and all.
how do i use WUA API for remote machine please help me .I Visited microsoft website but not get proper idea.
|
|
|
|
|
Hi,
I want to hide 'X'-box or Close-box (which we can find at the Top-right corner of a Dialogbox).
Only i need to remain Minimize-box in my dialog. Can any one please help me ,what should be the code to hide this box in MFC.
please let me know as soon as possible.
Thanks in advance
modified on Wednesday, April 29, 2009 2:20 AM
|
|
|
|
|
Under dialog properties set the System Menu to false.
You need to google first, if you have "It's urgent please" mentioned in your question.
_AnShUmAn_
|
|
|
|
|
Actually i need to vanish the 'X'-box from the system menu & keep only Minimize-Box in the menu bar.
as U sent a code stuff,which i observed -only disabling the X-box not vanishing from the menu bar.
So is there any way to totally clear this X-box.If then plz repay as soon as possible.
Thanks for your last reply
and thanks in advance for your up-comming replay
|
|
|
|
|
[^].
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Hi out there-
I have a UNC path \\192.168.0.100\share and would like to convert it to the network name. i.e. \\SERVER\share
WNetGetUniversalName doesn't like it and is reporting "The specified device name is invalid".
Is there an easy way to deal with this?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />
Peter Weyzen<br />
Staff Engineer<br />
<a href="http://www.soonr.com">SoonR Inc -- PC Power delivered to your phone</a>
|
|
|
|
|
If you are simply wanting to convert an IP address to its host name, use gethostbyaddr() .
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|