|
|
|
Hi, Im programming in visualC++ with MFC in vs2008.
When using some applications like instant messenger, whenver someone signs in there is a popup in the bottom right corner of the screen saying 'xyz has signed in'. I want to make a popup like that. It should rise up from the status bar and then drop back down into it the way it happens in messenger. In addition the rest of the program should not stop running when that popup is rising up and lowering down.
Except I have no idea how to do this.. Can anyone offer some tips, name some APIs or link me to some articles on this? Im not exactly sure what this topic is called so I cant even do a decent search on it.
Thanks for any help.
|
|
|
|
|
garyofcourse wrote: Hi, Im programming in visualC++ with MFC in vs2008.
garyofcourse wrote: When using some applications like instant messenger, whenver someone signs in there is a popup in the bottom right corner of the screen saying 'xyz has signed in'. I want to make a popup like that. It should rise up from the status bar and then drop back down into it the way it happens in messenger. In addition the rest of the program should not stop running when that popup is rising up and lowering down.
You can use CMFCDesktopAlertWnd[^] if you are using MFC feature pack.
Else you need to create a top most popup window most probably a captionless dialog will do and then use AnimateWindow to make the window slide/fade in.
Also you've got to make the window appear alongside the window's taskbar so take note of the taskbar position too.
Nibu babu thomas
Microsoft MVP for VC++
Code must be written to be read, not by the compiler, but by another human being.
Programming Blog: http://nibuthomas.wordpress.com
|
|
|
|
|
|
when i look into 7z's code,
find this:
namespace NSignature
{
UInt32 kLocalFileHeader = 0x04034B50 + 1;
UInt32 kDataDescriptor = 0x08074B50 + 1;
UInt32 kCentralFileHeader = 0x02014B50 + 1;
UInt32 kEndOfCentralDir = 0x06054B50 + 1;
UInt32 kZip64EndOfCentralDir = 0x06064B50 + 1;
UInt32 kZip64EndOfCentralDirLocator = 0x07064B50 + 1;
class CMarkersInitializer
{
public:
CMarkersInitializer()
{
kLocalFileHeader--;
kDataDescriptor--;
kCentralFileHeader--;
kEndOfCentralDir--;
kZip64EndOfCentralDir--;
kZip64EndOfCentralDirLocator--;
}
};
static CMarkersInitializer g_MarkerInitializer;
}
i really wonder why they did this?
do any body have read this code?
Thanks
|
|
|
|
|
0x04034B50;
0x08074B50;
0x02014B50;
0x06054B50;
0x06064B50;
0x07064B50;
those code are const, why add 1 and then sub 1?
|
|
|
|
|
I guess for getting the number in the first instance. A second gets it lowered by 1.
Greetings from Germany
|
|
|
|
|
Hi all,
Can anyone tell me how can i set the text of any button at runtime.
Thanks in advance.
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
|
|
|
|
|
SetWindowText()[^] ?
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Visual C++ MVP
|
|
|
|
|
buttonObj.SetWindowText(/*parameter*/)
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Use SetWindowText API.
Regards,
Paresh.
|
|
|
|
|
Or you can use of SetDlgItemText or WM_SETTEXT .
|
|
|
|
|
Hi,
I read that if Vista sees an external manifest file if will enable prompt. That's why we have to embed manifest file in the exe to enable application for UAC. Is it right? If any one knows that link can u send me that link.
I am trying to find that link for couple of hours but i am not able to find it now.
Thanks
|
|
|
|
|
Which link?
If you have a query, may be someone can answer you, not that you have to go back to that link.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Visual C++ MVP
|
|
|
|
|
My question is why should I embed manifest file in the exe to run in Vista.
Regards
|
|
|
|
|
subramanyeswari wrote: My question is why should I embed manifest file in the exe to run in Vista.
Can you check this[^] video on channel 9.
Google search on this topic[^]
Nibu babu thomas
Microsoft MVP for VC++
Code must be written to be read, not by the compiler, but by another human being.
Programming Blog: http://nibuthomas.wordpress.com
|
|
|
|
|
The code works under XP, both administrator or limited account.
But when I run it under Vista, it works under a administrator account, but doesn't work under limited account.
Sometimes, the history is cleared at first, but it appears again when I restart IE.
The code is shown as follow:
USES_CONVERSION;
CoInitialize(NULL);
TCHAR szSpecialFolderPath[MAX_PATH];
::SHGetSpecialFolderPath(::GetDesktopWindow(), szSpecialFolderPath, CSIDL_HISTORY, FALSE);
IUrlHistoryStg2* pUrlHistoryStg2 = NULL;
HRESULT hr = CoCreateInstance(CLSID_CUrlHistory, NULL, CLSCTX_ALL, IID_IUrlHistoryStg2, (void**)&pUrlHistoryStg2);
if(SUCCEEDED(hr))
{
hr = pUrlHistoryStg2->ClearHistory();
pUrlHistoryStg2->Release();
CoUninitialize();
return TRUE;
}
else
{
CoUninitialize();
return FALSE;
}
Thanks a lot!
|
|
|
|
|
With AfxBeginThread , it is __cdecl ,
with CreateThread , it is __stdcall .
Is there an safe API wait to create a thread in MFC?
CreateThread?
I'd like to the easier one, if there is.
|
|
|
|
|
followait wrote:
Is there an safe API wait to create a thread in MFC?
Err, AfxBeginThread is an MFC function...
Not sure what else you're after.
Iain.
Plz sir... CPallini CPallini abuz drugz, plz plz help urgent.
|
|
|
|
|
followait wrote: I'd like to the easier one, if there is.
Nothing is easy in multi-threading.
-Saurabh
|
|
|
|
|
Philosophical mood this afternoon?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Yes!! Trying to finish this boring piece of code before I call it day
But I guess that statement is pretty much always true for any non-trivial applications
-Saurabh
|
|
|
|
|
When you're using MFC you have to use AfxBeginThread due to internal workings of the framework.
For more info:
http://www.flounder.com/badprogram.htm#beginthread[^]
The best starting point for multithreading can be found here[^].
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
I have 2 classes, B inherit from A, but actually A have a function: fun should not present in B, so I code as blow,
class A{
public:
virtual void fun(){cout << "a" << endl; };
};
class B : public A{
virtual void fun(){};
};
But this take no effect, I can call the fun in class b,
int main()
{
A a;
B b;
A *pa = new B;
a.fun();
b.A::fun();
pa->fun();
}
the output is
a
a
How to decline the function call?
Thanks.
|
|
|
|