|
1. The default naming convention is for each type dll to have the same name -- they are put in different folders. Using Windows Explorer you will see the folders in your project folder. One is a debug and the other a release folder. You can change the name of the dll if you wish in Project | Settings, click the Link tab.
2. There are lots of differences between debug and release versions. Most of them are the way the compiler optomizes your code. You need to study the optinization flags (there are a lot of them) in MSDN or other books to realize what the compiler does to your code in release mode. In a nutshell, it rearranges the code, eliminating redundencies, inefficiencies, and makes it run faster. You need to be careful about this because I have seen it sometimes (but not very often) make wrong decisions.
|
|
|
|
|
Hi all,
I must create an application that capture all Pressed keys from the keyboard. My difficult is that i can't capture the Keys that is pressed outside my application.
Really i'm able to capture all the keys that are pressed into my application, but if my application works in backgroud and some keys are pressed it doesn't intercept.
Is there anybody going to help me?
If someone can help me send the solution to my E-Mail address : benmar@libero.it
Thanks!!!
|
|
|
|
|
You'll have to create a global hook. Check the docs for SetWindowsHookEx.
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
You need to create a global keyboard hook using SetWindowsHookEx(WH_KEYBOARD...)
You need to set your HOOKPROC in a DLL. MSDN has more info I think.
|
|
|
|
|
In my program I would like to build a list of all files in a specified folder. I might also want to rename some of the files found, probably based on the name of the containing folder.
Could someone please give me a hint what MFC classes I could use? I guess CFile might come in handy, but what class/classes should I use to scan the folder?
|
|
|
|
|
|
in my application i have got to draw dotted, solid and dashdotted (wrong word, i know..) lines..
i create em like that:
cp_dot.CreatePen (PS_COSMETIC | PS_DOT, 1, RGB (0,0,0));
cp_solid.CreatePen (PS_COSMETIC | PS_SOLID, 1, RGB (0,0,0));
cp_dashdot.CreatePen (PS_COSMETIC | PS_DASHDOT, 1, RGB (0,0,0));
the problem is that they don't appear to be dotted after printing them (the dots are like thinner normal lines..) on the screen they appear like a bunch of short lines (NO DOTS...)
it's the same with the dashdot pen...
can anyone help me out???
thanx in advance
Bernhard
stolen signature #11
"That probably would've sounded more commanding if I wasn't wearing my yummy sushi pajamas."
-- Buffy
|
|
|
|
|
Get rid of PS_COSMETIC for a start. Are you saying the pen is not dotted on the screen, on a paper printout, or both ?
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.
|
|
|
|
|
okay...
the pen is somewhat LIKE dotted on the screen.. it is drawn as many little lines
(somewhat like '-- -- -- -- --', when i zoom in, it looks like '- - - - - - -').
on the paper printout it looks like a totally drawn line.
the dashdot - line looks as follows.. '---- - ---- - ---- - ---- - ---' and it isn't printed
correctly either...
in other words.. the DOTS are too long, they look like lines.. and the dashdotted line is too long too.. i hope now you understand my problem..
btw.. i tried it without PS_COSMETIC.. it was a little bit better.. but not really as good as i wished it would be..
stolen signature #12:
eople who love sausage and respect the law should never watch either one being made
|
|
|
|
|
Hey - you stole my sig ( and lost the first letter ) !!
I think you'll find the problem is so common it should probably go in the FAQ. When you print stuff, you're printing to a DC that is typically 6000 x 4000. Your screen is probably 800 x 600 or 1024 x 768. Therefore, if you draw a dotted line defined in terms of how many pixels across to draw, how many to skip, quite obviously you're going to end up with the problem that a pixel on the screen and a pixel on the page are two very different things. There are a range of GDI calls that do not print properly. Any sort of brush except a solid one is another common example of this.
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.
|
|
|
|
|
another stolen sig.. but he.. i´ve never claimed that it is my sig..
but.. i already knew that.. but my question is...
IS THERE ANYBODY WHO HAS GOT ANY WORKAROUND for this problem...
i really can't believe that you shouldn't be able to draw dotted or dashdotted line on printers.. (i think that it should work with a geometric pen..)... but i couldn't get em going...
thanx for any advice
bernhard
stolen signature #13:
To understand recursion, we must first understand recursion
|
|
|
|
|
Scaling correcting?
LPtoDP?
and don't be so rude to people who *try* and help you!
Norm Almond
Chief Technical Architect
FS Walker Hughes Limited
|
|
|
|
|
if i´ve been rude.. or if somebody thought that this was rude.. i´m going to apologize..
(cause i´ve found answers to many of my answers in here...)
but the answer of christian didn't help me really out.. and your answer neither.. and so i did want to make it clear that i am still missing a *real* answer..
cause maybe there is a knot in my brain.. but i would like to declare a pen that works both on screen and on the printout.. and.. the dots are on screen to "large"...
this is all i wanted to say..
i know how to scale from lp to dp... but this doesn't help me...
thanks in advance...
bernhard
stolen signature #12:
People who love sausage and respect the law should never watch either one being made
(i really like this one.. chris... thank you...)
|
|
|
|
|
If LPToDp does not help you then you will need to create a bitmap that defines your line pattern and stretchblt it, the same as you need to for pattern brushes. Of course you also need to figure out the size of the print DC, but I presume you've already done that.
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.
|
|
|
|
|
this seems to help me out..
stolen sig #15:
- I heard if you play the Windows CD backwards, you get a satanic message.
- That's nothing, if you play it forward, it installs Windows!
|
|
|
|
|
I want that my dll will be accessed in every foreign language like Delphi or VB. So what can I do ???
|
|
|
|
|
Do you mean having the resources in multiple languages? If so, the usual way is to have one resource DLL per language.
Michael
|
|
|
|
|
- Be sure to export your DLL functions with "C" linkage. Easiest to achive this is to use a module definition file (.DEF).
- Do not use __declspec(dllimport/dllexport), 'cause this exports using so called "decorated names" which are compiler-vendor specific.
- This restricts exports also to plain C functions only. It is not possible to export classes or overloaded functions (because you need decorated names for it).
- Build the necessary import stuff for the other languages, e.g and UNIT for delphi that includes all symbols of your header file.
Daniel
--
Daniel Lohmann
http://www.losoft.de
|
|
|
|
|
Do not use __declspec(dllimport/dllexport), 'cause this exports using so called "decorated names" which are compiler-vendor specific.
This is a false statement. If you have a function with "C" linkage you can safely __declspec(dllexport) it; the name will not be mangled. There's no connection between mangling and __declspec.
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
Thank you ! But I dont understand you .
I use in my DLL with classes and functions such that :
extern "C" __declspec(dllexport)int Verificat(CString id, CString regfp)
{
MyClass dlg;
dlg.DoModal();
return dlg.ReturnVal;
}
I do it with MFC AppWizard(dll) type: MFC Extension Dll
How can I match it for Delphi ???
|
|
|
|
|
CString is an MFC class, I don't think Delphi will understand the exported function. Try using LPCTSTR or something like that.
Michael
|
|
|
|
|
I want that my dll will be accessed in every foreign language like Delphi or VB. So what can I do ???
|
|
|
|
|
I believe you'll find you need to write a COM dll that includes the functionality in the dll. You should use ATL for this.
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.
|
|
|
|
|
If you write your methods carefully using __stdcall as the calling convention, they should be accessibly from Delphi and VB without needing a COM wrapper.
If you want to turn it into a COM module, have a look at some of the ATL tutorials available and put a wrapper around your functionality.
Dave.
|
|
|
|
|
How do we make a template class into a concrete class
|
|
|
|