|
Hi
Does anyone know how to use the UnRegisterClass function in a dll .I create a window in a dll. But when i try to unregister the class in WM_Destroy, the function is giving error code 1412.But when i try to unregister the class before return of winmain it is giving error that class does not exists.
Thanks
|
|
|
|
|
If you search the "UnregisterClass" in VS, you can find the following in the Remark.
<---
Before calling this function, an application must destroy all windows created with the specified class.
All window classes that an application registers are unregistered when it terminates.
-->
If you have tried to unregister the class within the WM_DESTROY msg handler of the window instance, it should be failed.
|
|
|
|
|
Thanks I got your point . So where can i call this function . I tried calling in DLL_PROCESS_DETACH it is giving error code 1411. can you please help me in this regard
|
|
|
|
|
Hello ,
I am new to VC++,MFC.
Please suggest to me , Which design patterns are used in
MFC .
Plz , Give Urgent reply
Bye
Praveen.C
Praveen Kumar
|
|
|
|
|
Can you elaborate..............
VamsiDhar.MBC
SoftwareEngineer
|
|
|
|
|
I am Vc++ Professional , (c++,vc++,MFC)
In Interviews they are asking about Design Patterns.
I am not knowledge about design patterns about vc++.
But In Java,J2EE I know about MVC architecture.
Plz Send Urgent reply.
Bye
Praveen,
Praveen.
|
|
|
|
|
The Document-View functionality is a variation of MVC (Model-View-Controller).
--
The Blog: Bits and Pieces
|
|
|
|
|
If its MFC they mean
Doc-View architecture .
There are two classification
SDI and MDI
u need to make a study on it first .
Vikas Amin
Embin Technology
Bombay
vikas.amin@embin.com
|
|
|
|
|
Require some help for solving the following:
consider a function f1(f2(),f3())
f1 takes 2 params,return type of func f2 and return type of f3.
f2,f3 are both library functions so no code available.
assuming R2L execution,f3 is executed first.If it throws up an error,i want to return immediately without executing f2 or f1.Hw do i do this type of dynamic checking ?
|
|
|
|
|
is f3 throwing an error or an exception?
Well, IMHO, this is not the right way of using the function that could fail.
-Prakash
|
|
|
|
|
i knw tht..But it's a question i was asked at an intw
|
|
|
|
|
where did you give the interview?
-Prakash
|
|
|
|
|
Well, since you use the term "throw", then I assume f3 will throw an exception on error, not return an error code. If so, then neither f2 or f1 will be executed. If you mean that f3 returns an error code, then you must check the values before passing them to f1.
This is really elementary C++, so I wonder: 1) Do they really ask such questions at interviews? 2) have you not done your homework?
--
The Blog: Bits and Pieces
|
|
|
|
|
I dont think that so simple if it was
asked to a experienced person . Have u
ever experimented the real result?
http://www.parashift.com/c++-faq-lite/
go throught this link its good for interview
Vikas Amin
Embin Technology
Bombay
vikas.amin@embin.com
|
|
|
|
|
hi,
I am trying to compile a vc6.0 project in vc8.0. I am getting the following error.
error C2061: syntax error : identifier 'THIS'
I tried to use #undef THIS and #define THIS. But it didnt work. Is it possible that old windows files are getting linked. In that case as well the definition of 'THIS' hasn't changed and its the same.
Can anyone suggest a fix?
regards,
sk80.
|
|
|
|
|
Shouldn't it be lower case (this)?
|
|
|
|
|
I wonder if there is a MACRO somewhere in your code that uses 'THIS' in place of 'this'? Search for all references to 'THIS' -- what do you get?
Read more of what I have to say at http://directx9.blogspot.com/
|
|
|
|
|
I would like to know how to change the Background color of AfxMessageBox?
Please help!
|
|
|
|
|
Here is an excellent sample...
Download the CtlColor Explorer from this page....
http://www.flounder.com/download.htm[^]
Jesus Loves You and Me <marquee direction="up" height="50" scrolldelay="1" step="1" scrollamount="1" style="background-color:'#44ccff'">
--Owner Drawn
--Nothing special
--Defeat is temporary but surrender is permanent
--Never say quits
--Jesus is Lord
|
|
|
|
|
Thank you very much!
Could you give me more hints?
Please help!
|
|
|
|
|
I can give a keyword for further searches....
MSGF_DIALOGBOX.
When a dialog comes up this is the message sent. You can trap this in WM_ENTERIDLE message handler. Check for this message inside the handler for WM_ENTERIDLE. This is in wParam argument.
If this is the case then lParam will have Handle to the dialog box or message box. Rest is up to you. He he.
Jesus Loves You and Me <marquee direction="up" height="50" scrolldelay="1" step="1" scrollamount="1" style="background-color:'#44ccff'">
--Owner Drawn
--Nothing special
--Defeat is temporary but surrender is permanent
--Never say quits
--Jesus is Lord
|
|
|
|
|
Thank you very much!
I search some messages.
They suggest to write a dialog box for it.
I use this method now!
|
|
|
|
|
|
First off, what and why do you want to do ?
-Prakash
|
|
|
|
|
It was asked in an Interview. I suggested using pragma's. They asked how to do without that.
Still confused...
Jesus Loves You and Me <marquee direction="up" height="50" scrolldelay="1" step="1" scrollamount="1" style="background-color:'#44ccff'">
--Owner Drawn
--Nothing special
--Defeat is temporary but surrender is permanent
--Never say quits
--Jesus is Lord
|
|
|
|