|
It IS possible! In searching the internet, I came across this article:
http://www.codeguru.com/Cpp/W-P/dll/article.php/c3649/
In trying to solve this problem yesterday, I had created a Win32 DLL using the VS.NET wizard with one function I was exporting. So, I just copy/pasted the code into a new header file which I included in one of my .exe source files, then linked. That was it and it worked.
I was able to call LoadLibrary() on the exe, then GetProcAddress() for the function. Here's the complete .h needed (VERSION_EXPORTS was defined in the project properties):
<br />
#ifdef VERSION_EXPORTS<br />
#define VERSION_API __declspec(dllexport)<br />
#else<br />
#define VERSION_API __declspec(dllimport)<br />
#endif<br />
<br />
VERSION_API int fnVersion(void)<br />
{<br />
return 6030;<br />
}<br />
|
|
|
|
|
but you are using some dll methods to came across this : dllexport and dllimport
i never seen an application (.exe) defining some symbols that are to be exported... !!
this is done in dll generally.
TOXCCT >>> GEII power [toxcct][VisualCalc 2.20][VisualCalc 3.0]
|
|
|
|
|
I sure am...I'm sure in most cases this may not be appropriate or needed. But it fits my case perfectly. And since LoadLibrary() and GetProcAddress() both work with .exe's, there's no reason why it can't be done.
Thanks,
|
|
|
|
|
Hi,
I have a problem when creating win32 regions and drawing into them. The edges of the shapes drawing inside the region are distored or cut-off. For example:
CDC* pdc = GetDC();
CRgn rgn;
rgn.CreateEllipticRgn(10,10,50,50);
pdc->SelectClipRgn(&rgn, RGN_COPY);
pdc->Ellipse(10, 10, 50, 50);
pdc->SelectClipRgn(NULL, RGN_COPY);
ReleaseDC(pdc);
Although the coordinates of the region are the same of the ellipse coordinates, it still does not draw the ellipse perfectly. The edges are distorted. Is there a way I can calculate the perfect region. I also do not want to use paths as they don't work properly in win98. What could be the solution.
Thanks
|
|
|
|
|
Are you acconting for the pen width of the border of the object?
In that case, your region needs to be slightly larger than the actual object boundaries, since most programs leave the pen drawing code to drawn ON the object's edge rather than within it.
Since I don't see any code explicitly setting your pen, it could be any guess what it is at the time this code executes. Are you seeing distortion when the pen width is more than 1? I would not expect it too much with this code when the pen width is 1, except maybe at the outer edge of the ellipse.
No shirt, no shoes, no brains, no service.
|
|
|
|
|
Thanks for your reply. I am not selecting any pen into the device, so I assume that the default is a 1 pixel black pen. I tried making the region larger by one pixel, but the result shows the ellipse. However, there are extra little blank spaces around the ellipse. I also tried to make the pen PS_INSIDEFRAME but with the same result.
|
|
|
|
|
hai
selvaraj@kappsoft.com
i have downloaded the message Queue implementation.
i need to create a private queue... In my local meachine(CLIENT)
what i have to give in the fields of
ServerMSMQ
Path Queue
Label Queue
Message Lable
I gave serverMSMQ empty pathQueue :"private$","private",".\<comp.name>\private$\test",.....
it shows the error "error to create private queue"
when i click create private Queue(note: i can create directly i.e message Queue in computer management
if possible give me the docment or help file
waiting for your suggestion
selvaraj
selvaraj@kappsoft.com
|
|
|
|
|
Does anyone know about how to do programmatical digest authentication against microsoft active directory?
I'd really appriciate if someone helps me.
Osama Askari
programmer.askari@gmail.com
|
|
|
|
|
Hello,
I had some doubt regarding definition of global variables. If I have to define two global variables with the same name in two cpp files then is it somehow possible to do so..?
However I am aware of providing a definition in one file and declaring in other for usage(using extern keyword).
Example:
int i;
should be "defined" in CPP1.cpp and CPP2.cpp belonging to the same project.
Regards,
Abhishek.
Learning is a never ending process of Life.
|
|
|
|
|
Global variables are only visible in 1 cpp
--------------------------------
Human stupidity is infinite.
|
|
|
|
|
in cpp1.h ->
extern int i;
in cpp1.cpp ->
int i;
Then include cpp1.h where ever you need to use i
|
|
|
|
|
hi!
i want to use drawitem() to easily set a background color to alternate rows in my clistctrl rows. I've made it ownerdrawfixed, add drawitem override procedure, put ON_WM_DRAWITEM()... but my item data are not displayed. but when i removed the ownerdrawfixed property, it displays the data, but ofcourse it doesnt go to drawitem() procedure.
|
|
|
|
|
i will try to publish my code as soon as possible to the Codeproject.com
Regards,
sdancer
|
|
|
|
|
When it comes to doing owner drawn list controls this[^] article by Mike Dunn is a must read.
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" - mYkel - 21 Jun '04
"There's not enough blatant self-congratulatory backslapping in the world today..." - HumblePie - 21 Jun '05
Within you lies the power for good - Use it!
|
|
|
|
|
Hi,
Read me article at,
http://www.codeproject.com/listctrl/ColoredListCtrl.asp
Regards,
sdancer75
|
|
|
|
|
Is it easy to implement CFrameWnd::DoModal()?
|
|
|
|
|
followait wrote: Is it easy to implement CFrameWnd::DoModal()?
there is no DoModal Function in CFrameWnd class
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
if you want a modal frame window, I think you can disable the owning frame window.
We say "get a life" to each other, disappointed or jokingly. What we forget, though, is that this is possibly the most destructive advice you can give to a geek.
boost your code || Fold With Us! || sighist
|
|
|
|
|
|
|
:-Di would like to know how do i display text over an image using MFC, cos when i write a text using DrawText, the text gets written behind the Image.
Nams
|
|
|
|
|
This depends on the way you are doing it but make sure the text is written after the iamge is drawn, including in the OnPaint handler.
The tigress is here
|
|
|
|
|
See if this article is of any help.
"Take only what you need and leave the land as you found it." - Native American Proverb
|
|
|
|
|
I was confused using the Date Picker (CDateTimeCtrl). When I enter a date using the date picker, (OnChange) DTN_DATETIMECHANGE notification was sent twice but if I enter using the keyboard it was only sent once.
|
|
|
|
|
Ok, so what's your question?
"Take only what you need and leave the land as you found it." - Native American Proverb
|
|
|
|