|
1. You can build a COM dll with MFC support - my understanding is that you're build one dll out of another. I don't know much about dll's, maybe you *do* need to do this. If I were you at this late stage I would probably consider that as you've asked the same question for days, you consider if MFC is the problem, do you need MFC support ?
2. Like I said, I don't know much about dll's, although I know a little about ATL.
3. So when you trace into the function that calls your dll, it brings up the AfxMessageBox, but you can't step into the function from your dll, it just goes over the top ? Given how dll's export their functions, doesn't that mean it's lookup table has a problem ?
4. I'm sorry, if you did in fact buy one of the books recommended, it didn't help you at all and as you never said, it was not obvious. I can only maintain that you should consider building it entirely in a COM server dll, regardless of MFC. If you only need MFC to bring up a dialog, bringing up a dialog using ATL is not very hard at all, Win32 is probably easier because of the mass of information available.
5. If your boss is going to sack you for not being able to impliment something you didn't know about two weeks ago, then he is an ass, and you can tell him I said so. It's been obvious all along that you're out of your depth ( and that is no insult, there are a myriad of technologies where I would be in the same boat, no-one knows everything ). Does your boss know you're in trouble ? Is your boss tech savvy at all ( can you talk in terms of ATL, or do you have to talk in terms of the pretty colours ? )
Christian
As I learn the innermost secrets of the around me, they reward me in many ways to keep quiet.
Men with pierced ears are better prepared for marriage. They've experienced pain and bought Jewellery.
|
|
|
|
|
I trys now to build ATL without import the MFC DLL that I crated.
So
1. I going to resources and inserting Dialog.
2. I created class dialog::CDialog (possibility ?)
3. I added ATL class - simple.
4. I added to this ATL class object from the class dialog .
5. I added to this ATL class method that doind : dlg.DoModal();
I run it from client program and it is works so :
It shows the dialog of the method of ATL class (in number 5)
But when press OK or Cancel it is crush.
____________________________________________________-
Have I use only in ATL dialog or there are a way to works as I tried (Maybe have I added AFX_MANAGE_STATE somewhere)?
|
|
|
|
|
Is the ATL dialog class called CDialog ? The ATL Object dialog allows you to add a dialog box, is that how you did it ?
Your biggest problem is that when something crashes you bring up CP. People could help you more if you provided some info. Did you trace into the code to see what line crashed ? You should post some code, and also know where it crashed exactly. Then we could help you more. Why don't you email me your project, I'm at home right now playing Worms, and I'd be happy to bring it to a point that your ATL dialog comes up. Just zip it ( without any intermediate files, just the stuff I need to compile it ) and send to cgraus@viewbuild.com
Christian
As I learn the innermost secrets of the around me, they reward me in many ways to keep quiet.
Men with pierced ears are better prepared for marriage. They've experienced pain and bought Jewellery.
|
|
|
|
|
I'm sorry, I'm going to bed. Maybe tomorrow night I'll have time to have a look for you if you decide to send it to me.
Christian
As I learn the innermost secrets of the around me, they reward me in many ways to keep quiet.
Men with pierced ears are better prepared for marriage. They've experienced pain and bought Jewellery.
|
|
|
|
|
In MSDN, it is said:
DllMain is a placeholder for the library-defined function name.
I do not know what means "placeholder" and "library-defined function name" here.
Can you show me an example or a description?
Thanks,
Maer
|
|
|
|
|
It means that you can name the entry point anything you want. The docs use "DllMain" as an example.
--Mike--
http://home.inreach.com/mdunn/
"....." -- Silent Bob
your with and
|
|
|
|
|
Thanks Mike!
I still have a question. I still do not know what means "library-defined".
Can you show me an example?
Best regards,
Maer
|
|
|
|
|
|
Thanks Mike!
Your answer is the one I am looking for. : )
Regards,
Maer
|
|
|
|
|
What is the function of "UNREFERENCED_PARAMETER" in DllMain?
Thanks,
Maer
|
|
|
|
|
1) It tells other people that may be maintaining your code that you purposely are ignoring a function parameter.
2) It avoids the level 4 warning about unused function parameters.
--Mike--
http://home.inreach.com/mdunn/
"....." -- Silent Bob
your with and
|
|
|
|
|
Hi, again pal!
I meet with another problem now. My function is like this:
void fun(int a, ...)
{
UNREFERENCED_PARAMETER(a);
...
}
But now, I want to modify the function. And I will use parameter "a" in my modified version of my function.
Should I remove the statement "UNREFERENCED_PARAMETER(a);"?
Hope you can help!
Best regards,
Maer
|
|
|
|
|
Hi:
I try to immigrate netants-like floating basket to WinCE, The original one works properly on Destop Window, but on WinCE, the basket window maxmize, occupying full screen. Is there WinCE expert can help me? Thanks for you helping in advance!
Best Regards
Tony Wu
|
|
|
|
|
I've got a class to create a window in Win32, and one to create a bitmap button. When I resize the window, I've tried calling MoveWindow or SetWindowPos, both cause the buttons to flicker terribly. I know the problem is here because I killed all drawing in the window, so the background is never drawn at all. Can anyone suggest if there is anything I can do to make my buttons move nicely without flicker ?
Christian
As I learn the innermost secrets of the around me, they reward me in many ways to keep quiet.
Men with pierced ears are better prepared for marriage. They've experienced pain and bought Jewellery.
|
|
|
|
|
Hi,
U need to use LockWindowUpdate(which temporarily stops
the WM_PAINT mesgs) and after ur
moving is completed, call UnlockWindowUpdate
to again continue drawing.
Hope it helps....
|
|
|
|
|
It sounds like your WM_ERASEBKGND handler repaints the entire background. If that's the case, it's painting over the buttons, which in turn have to be repainted, and thus you get flicker.
First thing I'd try is, in your WM_ERASEBKGND handler, only repaint the necessary portion (by calling GetUpdateRect()) so you won't always paint over all your buttons.
--Mike--
http://home.inreach.com/mdunn/
"....." -- Silent Bob
your with and
|
|
|
|
|
Would this be the case even if I set the PaintStruct's erase member to FALSE ? I did that and also stopped my own code from drawing a rectangle over the area, so that the Window background was whatever was under it on creation ( because it was never drawn ), but it still flickers on resize. The above suggestion did not help either, although I was glad to learn the function existed, it did not solve the problem.
Christian
As I learn the innermost secrets of the around me, they reward me in many ways to keep quiet.
Men with pierced ears are better prepared for marriage. They've experienced pain and bought Jewellery.
|
|
|
|
|
*scratches head* hmmm, so when you do nothing in WM_ERASEBKGND the flicker goes away?
--Mike--
http://home.inreach.com/mdunn/
"....." -- Silent Bob
your with and
|
|
|
|
|
No, the flicker always remains. The buttons are owner drawn bitmap buttons and it's obvious when I have a lot that they are all being drawn grey and then the owner drawing code draws the bitmaps over them afterward, so the ones at the end of the list are noticably blank before each draw during the sizing process.
Christian
As I learn the innermost secrets of the around me, they reward me in many ways to keep quiet.
Men with pierced ears are better prepared for marriage. They've experienced pain and bought Jewellery.
|
|
|
|
|
OK, so your WM_ERASEBKGND handler is out of the picture. Something is invalidating your buttons, maybe it's a WM_WINDOWPOSCHANGED, WM_SIZE, or similar handler in your button class?
--Mike--
http://home.inreach.com/mdunn/
"....." -- Silent Bob
your with and
|
|
|
|
|
How would I use the overloaded insertion operator to input a string of a user defined class?
|
|
|
|
|
istream& operator>>(istream& in)
{
//Write ur code
in>>string ;
// Some code
...
return in;
}
//Assuming that the fn is a member of the class.
if not then the following
if the class's name is 'A'
class A
{
..
friend istream& operator(istream& in, A &a) ;
..
};
istream& operator(istream& in, A &a)
{
...
}
Hope this helps
|
|
|
|
|
I have a function which accepts a variable number of integer arguments like so:
void MyFunc(int nVal, ...);
I want to grab the first one, and pass the rest to a similarly defined function. How do I do that?
To hell with those thin-skinned pillow-biters. - Me, 10/03/2001
|
|
|
|
|
My understanding is if you use va_arg, va_start & va_end, one parameter is stripped from the list at a time as you parse them. If this is so, then you could strip the first one ( as you will obviously need to ) and then pass the resultant list along.
Of course, I could just be full of it....
Christian
As I learn the innermost secrets of the around me, they reward me in many ways to keep quiet.
Men with pierced ears are better prepared for marriage. They've experienced pain and bought Jewellery.
|
|
|
|
|
I tried that. No workee.
If I had the code I was playing with at work, I culd provide an example of what I've already tried.
Essentially, I passed 1,2,3,4,5 as parameters to the 1st function, used va_start to get the first parameter, and passed the list to the next function, and so on.
Func1 got 1 as the 1st param
Func2 got 2 as the first param
Func3 got 96 as the first param
Func4 got -20
By then I stopped because I knew something was seriously hosed up.
If I can't do this, I have to resort to passing a string or array of values.
To hell with those thin-skinned pillow-biters. - Me, 10/03/2001
|
|
|
|