|
What do I set lNormalDialogBaseUnits to?
For example in the microsoft example they set TEXTMETRIC to lNormalDialogBaseUnits;
Sorry for all the questions.. But thanks for all the help
Rob
|
|
|
|
|
Never mind.. I figured it out.
Thanks everyone for all your help.
Rob
|
|
|
|
|
I just want to print a two (2) page document. When I print preview, I see the two pages. But if I zoom it, or view it as one page, the content disappears? Any ideas, any code on how to resolve this?
Please, any response any one can give me will be greatly appreciated.
Sincerely,
Danielle (an overworked graduate student)
|
|
|
|
|
Hi,
I try to implement an ActiveX that creates a thread (through AfxBeginThread). This thread is calling a custom event. When I try to terminating the thread, it makes an uncaught exception. Even, when I try to communicate from the custom event with the activeX (by testing a property for example), I get a memory problem.
How can I solve these problems ?
Should i use any other method and if yes which one ?
thank you very much for your help.
|
|
|
|
|
Hi,
I found somme code to show SDI app in full screen state (hiding task bar and MS-office bar, and all ..). It's work fine with SDI but not with MDI.
Help ....
mailto:stefhabl@club-internet.fr
|
|
|
|
|
HI
I hope someone can help me
I want to draw a button left to the [x]-button of a dialog, how can I do this?
I know that I need to use OnNcPaint to achieve this and OnNcHitTest to find out whether the user clicked this button.
But I don't know how to draw at all.
|
|
|
|
|
I found out, everything works fine
|
|
|
|
|
Great! How about writing up what you did and posting an article at CodeProject? Thanks,
/ravi
"There is always one more bug..."
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
There already are many articles about OnNcPaint at codeguru.
You might take a look at this site if you want to know more about how to handle OnNcPaint()
|
|
|
|
|
I am trying to develop a component that would be able to produce drag & drop affect on a working canvas. Does anyone know how to draw rubberbands with non-rectangular shapes. I need to get the effect like the one in Microsoft Word where multiple objects are selected and moved around smoothly. Please help...
|
|
|
|
|
HI ALL
======
My Code goes a little bit like this:
func1() { func2(); }
func2() { func3(); }
func3() { func4(); }
func5() { func6(); }
func6() { <code>throw;</code> }
void thread_main_func()
{
...
...
...
try { func1(); }
catch (...)
{
}
}
Do I need and how to clear the call stack ?
BTW: come to #CodeProject on DalNet (mIRC)
BTW: come to #CodeProject on DalNet (mIRC)
|
|
|
|
|
Sorry, did I forget to specify ? Stroustrup states that try/catch/throw unwinds the stack for you.
I don't know of any way of doing it yourself, actually.
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.
|
|
|
|
|
thanks for your help.
but I'm having trouble understanding what is "Stroustrup"?
didn't find "Stroustrup" on MSDN.
please expand you knowledge about this "Stroustrup" thing.
thanks
BTW: come to #CodeProject on DalNet (mIRC)
|
|
|
|
|
He is the author of C++.
Tim Smith
Descartes Systems Sciences, Inc.
|
|
|
|
|
|
Why can't I use a FILE* pointer to a DLL-function? My program hangs when I try!
|
|
|
|
|
because a DLL function isn't a FILE. ?
(you might want to rephrase the question)
-c
------------------------------
Smaller Animals Software, Inc.
http://www.smalleranimals.com
|
|
|
|
|
Use a FILE pointer as a PARAMETER to a DLL-function.
When I write to the file from my DLL, the program hangs!
|
|
|
|
|
The problem is that a FILE pointer references data in your calling DLLs C-library. If this C-library is different from the C-library the callee uses the program will hand or crash.
Solution: use the same copy of the C-library in both DLLs, e.g. by checking the option "use MFC in shared library" in BOTH projects.
Anyway: using a FILE pointer in an interface is not the best programming style
best regards
Carsten
|
|
|
|
|
Thanks for your answer!
If using a FILE pointer as a DLL function parameter is not a good programming style, what type of file object should I use instead? I don't use the MFC in my either my main program, or my DLL.
The run time library in my DLL is set to "Multithreaded", but the one in my main program is "Single-threaded". If i set both of them to "Multithreaded", not all the data I write to the FILE from the DLL gets written!
Erik
|
|
|
|
|
see Q190799 "PRB: Potential Errors Passing CRT Objects Across DLL Boundaries" in the MSDN
-c
------------------------------
Smaller Animals Software, Inc.
http://www.smalleranimals.com
|
|
|
|
|
HI ALL
======
My Code goes a little bit like this:
func1() { func2(); }
func2() { func3(); }
func3() { func4(); }
func5() { func6(); }
func6() { goto THREAD_END; }
void thread_main_func()
{
...
...
...
THREAD_END:
...
...
}
Do I need and how to clear the call stack ?
BTW: come to #CodeProject on DalNet (mIRC)
|
|
|
|
|
What you need to do is realise that if you're using goto there is always a better, less satanic way. Using try/catch/throw works better because unlike goto, it's still clear that all your code is headed in the same direction.
Stroustrup is not clear on the question, but I looked up goto in the index and got page 357. which does not mention goto and is about exceptions. It seems to imply try/throw.catch is a better solution stack-wise, but is not clear cut. So I'd not hang my hat on that statement.
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
I think this question has been asked a hundret times already, but I hope someone wanst to help me anyway
I want to show a new dialog, but not with DoModal, the dialog needs to be non-modal.
how can I do this?
I'm using MFC and a dialog-based app
thanks in advance
|
|
|
|
|
For a child of the main dialog, you'll need code similar to this
m_MyModelessDialog.Create(IDD_DIALOGRESOURCE, this);
m_MyModelessDialog.ShowWindow(SW_SHOW);
|
|
|
|