|
I have dialog base application and i want to show an icon in system tray ang show popup when right click on this system tray icon.
i have successfully show icon on system tray when application is open
by using
Shell_NotifyIcon (NIM_ADD,&m_tnd);
but i am not able to show popup when right click on this icon.what i have to do for this also i have no idea which event i have to call so please if anybody have idea about this please share with me.
Bankey Khandelwal
Software Engineer
|
|
|
|
|
Use this excellent class[^] by chris himself
C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do, it blows away your whole leg
|
|
|
|
|
Click Here[^]
Nibu thomas
Software Developer
|
|
|
|
|
hi there,
does anyone know how to create an SDI document in an ATL COM Dll?
I've created the three classes (derived from CDocument, ChtmlView, CframeWnd). the window is not created.
can anyone help.... ?
shekhar
|
|
|
|
|
Hi,c_jangid
Do you get error?
|
|
|
|
|
hi there,
i dont get any compilation error but i do get a runtime error. "Assertion failed".
i could find that the error is somewhere in the CSingleDocTemplate constructor. it doesn't return a valid pointer.
waiting for reply.
thanks...
|
|
|
|
|
Hi,
i have created a dll and exported a class. I want to import that class to another application. But how can i import that class with out using the lib file. We can import a function using GetProcAddress() api. Can i use this api to import the class?
Thanks in advance
nave
|
|
|
|
|
Naveen R wrote: Can i use this api to import the class?
No.
But there is a workaround...
Use this API to get the address of a function that returns an instance of the class that you wish to access dynamically.
For eg:
The function will be something like this...
void* FUNC_EXPORT CreateInstance()
{
return static_cast< void*> (new SomeClass);
} Use GetProcAddress to get the address of this function.
Nibu thomas
Software Developer
|
|
|
|
|
For that i have to modify the dll isn't it? That's not possible
nave
|
|
|
|
|
Naveen R wrote: For that i have to modify the dll isn't it?
Yeah.
Nibu thomas
Software Developer
|
|
|
|
|
If you know the C++ mangled name of the methods, you can. It's not very fun and depends on which compiler the DLL was compiled with.
You said you created the DLL, so why can't you use the lib file that was created with it?
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
What the problem is there are two dlls.
A class in the first dll is used by a second dll and a class in the second dll is used the first dll creating a cirular dependency.
So to avoid this i decided to load the class dynamically.
please tell me how can i load the class if i know the mangled name of class
nave
|
|
|
|
|
Naveen R wrote: A class in the first dll is used by a second dll and a class in the second dll is used the first dll creating a cirular dependency.
Bad idea. Fix your DLLs. What you're proposing to do is a hack around the real problem. DLLs should never rely on each other.
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
ok i agree. Just for knowing can u tell me how can i load the class as u said?
nave
|
|
|
|
|
Well, if you know the mangled names of all of the methods, you can use GetProcAddress() to get all the method addresses. Just remember that they have an extra parameter at the beginning - the this pointer.
I would strongly recommend that you never do this. It's a horrible hack and prone to lots of problems.
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
hello friends ther is one problem with me that as i am an B.Tech (CS) student and i hav only 1 month to complete my project so kindly help me out to just guideline me how to implement the licensing software. actually i am working for the project, this project is totally assine to me . in the i hav to design the "Computerization of the driver livensing system" . in this few of the important forms are
1: login form
2) option window(tempory license/[permanent license)
3) user entry form(the driver comming for the first time. the whole detail like name,age,tell no been stored on the data base)
4) then we have the question test in which we have to show the objective type question in the random manney these Q r in the data base.
5) evaluation form (the performance of the test accorking to that driver is been shown and stored back in the data base)
. please look after the matter and kindly help me out or if you can / or if you hav a bit free time for me then please write code so that i can submit my project as soon as possible as days left are very less so . reply me soon ASAP
write me an mail to my ID at male_IIT@hotmail.com
gourav
|
|
|
|
|
Wow - others have voted you down, but I get to be first to tell you:
* CodeProject members will answer queries when you post code
* CodeProject members will not do all your homework for you.
I suggest you try doing it yourself for a week or two, then ask for help with the bits which don't work correctly.
|
|
|
|
|
I 've one function that 's written with COM DLL.
I want to return a string from that function.
function declaration is like that
STDMETHODIMP CMyClass::Command()
from that function how can I return a string.
thanks in advance.
|
|
|
|
|
In the .IDL (or ODL file) change the declaration so it looks something like this:
HRESULT Command([out, retval] BSTR *pOut);
Now the function should look like this:
STDMETHODIMP CMyClass::Command(BSTR *pOut)
{
if ( pOut == NULL )
{
return E_POINTER;
}
*pOut = SysAllocString(L"Your string here!");
return S_OK;
}
If you're not familiar with BSTR s you should read up on them.
Steve
|
|
|
|
|
There are some data to be analyzed, and draw the result as a figure. I want to draw the result in memory firstly and then save the memory BMP to a file directly, not to show it on screen. How can I do that.
Note: I want to achieve all in dialog, not Doc/View framework.
By the way, the resulted BMP may large than the sreen.
Thanks a lot!
-- modified at 23:57 Sunday 12th March, 2006
|
|
|
|
|
if u use memory DC, 2 suggestions:
1. bad one.
use GetPixel() to get color of a pixel - scan whole image - so u can have bitmap bits then save ur bitmap.
2. good one
I remember we can Create Bits section for memory DC (not sure), so bitmap bits can be read directly from memory DC.
anyway, u have to know file format of bitmap.
A nice tool for optimizing your Microsoft html-help contents.
Includeh10
|
|
|
|
|
|
But I don't want to show the BMP on screen!
|
|
|
|
|
Hi FleetAdmiral,
(I think you can change CreateCompatibleDC to createDC)
HDC hdc= CreateCompatibleDC(GetDC()->m_hDC);
HBITMAP hBitmap=CreateCompatibleBitmap(GetDC()->m_hDC,Width,Height);
SelectObject(hdc,hBitmap);
//Here you can from handle hdc
TextOut(hdc,150,150,"Hello",lstrlen("Hello"));
hBitmap=(HBITMAP)SelectObject(hdc,hBitmap);
CImage Image;
Image.Attach(hBitmap);
Image.Save("c:\\test.bmp");
Image.Detach();
DeleteDC(hdc);
DeleteObject(hBitmap);
|
|
|
|
|
if u dont want to show it in screen , u can create a memory dc and draw the bitmap to that dc.Then while saving to file, pass the bitmap object of this memory dc.
nave
-- modified at 0:21 Monday 13th March, 2006
|
|
|
|