|
When using SendMessage() and PostMessage() , the ID of the message has historically been based on WM_USER , with newer applications starting to use WM_APP . While this certainly works, the possibnility exists for two applications (DLLs, actually) to send the same message, resulting in undesired behavior. Using WM_USER or WM_APP with SendMessageToDescendents() is also asking for trouble. The solution, therefore, is to use a registered message. It is guaranteed to be unique. The message only means something to the window that created it and the target window.
Read this article for more.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
thanks for wonderful article,my problem solved.
have you any idea abt SmartCard api's sir
-----------------------------
"I Think It will Work"
-----------------------------
Alok Gupta
visit me at http://www.thisisalok.tk
|
|
|
|
|
Alok the programmer wrote:
have you any idea abt SmartCard api's sir
No.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Hi Alok,
I don't have sample project. but take a look (if you have'nt before)at the example which is using RegisterWindowMessage() function. Here
Hope this help
Regards
Abhishake
|
|
|
|
|
thanks yaar
-----------------------------
"I Think It will Work"
-----------------------------
Alok Gupta
visit me at http://www.thisisalok.tk
|
|
|
|
|
Hi All,
When some embeds the ATL ActiveX Control in the web page like
<object id="MyID" classid="CLSID: 9698F21D-F7A3-4968-B80C-850BEE451D3C" align="CENTER” height =" 100%"="" width="100%">
How the control creation and initialization is done internally.
Thanks in advance,
Abhi Lahare
|
|
|
|
|
I write an installer using Visual Studio Installer
for VC++ 6 application.
but i want an interface as some installer have totaly Blue n maximized backgroud .
and aslo need a setup file
innstaller only make a msi file ..
2 :: During installation with installer msi file
it gives the eror on Client
that Failed to register MFC42D.dll .. i m copying MFCO42D.dll , MFC42D.dll and MSVCRTD.DLL on client
y it is giving this error
thanx
|
|
|
|
|
HI,
How can i forcly Minimize the Dialog.
For Example if user do some thing illegle
then i want to minimze hte dialog.
any idea
thanx
|
|
|
|
|
ShowWindow(SW_MINIMIZE);
more values:
SW_FORCEMINIMIZE
Windows 2000/XP: Minimizes a window, even if the thread that owns the window is hung. This flag should only be used when minimizing windows from a different thread.
SW_HIDE
Hides the window and activates another window.
SW_MAXIMIZE
Maximizes the specified window.
SW_MINIMIZE
Minimizes the specified window and activates the next top-level window in the Z order.
SW_RESTORE
Activates and displays the window. If the window is minimized or maximized, the system restores it to its original size and position. An application should specify this flag when restoring a minimized window.
SW_SHOW
Activates the window and displays it in its current size and position.
SW_SHOWDEFAULT
Sets the show state based on the SW_ value specified in the STARTUPINFO structure passed to the CreateProcess function by the program that started the application.
SW_SHOWMAXIMIZED
Activates the window and displays it as a maximized window.
SW_SHOWMINIMIZED
Activates the window and displays it as a minimized window.
SW_SHOWMINNOACTIVE
Displays the window as a minimized window. This value is similar to SW_SHOWMINIMIZED, except the window is not activated.
SW_SHOWNA
Displays the window in its current size and position. This value is similar to SW_SHOW, except the window is not activated.
SW_SHOWNOACTIVATE
Displays a window in its most recent size and position. This value is similar to SW_SHOWNORMAL, except the window is not actived.
SW_SHOWNORMAL
Activates and displays a window. If the window is minimized or maximized, the system restores it to its original size and position. An application should specify this flag when displaying the window for the first time.
hope this helps
"If I don't see you in this world, I'll see you in the next one... and don't be late." ~ Jimi Hendrix
|
|
|
|
|
I want to create a ISAPI so that when a visitor click a specific link to require for a specific page, the ISAPI can get the result which is processed by IIS, and modify this result , then send this result to the client.Can you help me?Thanks
|
|
|
|
|
sorry for asking a very elementary question but i m
new to VC++
Can there be a messagebox without any buttons??
green_trees
|
|
|
|
|
I think not from MessageBox API...You can create your own dialog and control it via DoModal and EndDialog and have the appearance look of a MessageBox...
|
|
|
|
|
I think, there will Always be Button/s around it... You need to Fill In the Last Parameter...
|
|
|
|
|
well, can u point the main difference between MessageBox and AfxMessageBox?
|
|
|
|
|
Anonymous wrote:
well, can u point the main difference between MessageBox and AfxMessageBox?
AfxMessageBox - a global function.
MessageBox - a method available within a CWnd derived class
You cannot call MessageBox within a non CWnd derived class.
Ex:
class A
{
public:
void Display()
{
// error
MessageBox(...);
// should be
AfxMessageBox(...)
}
};
But in this example
class A
{
public:
void Display()
{
MessageBox(...); // OK, juts like calling this->MessageBox(..)
AfxMessageBox(...) // ok
}
};
|
|
|
|
|
Jose Cezar S. Ynion wrote:
But in this example
class A
{
public:
void Display()
{
MessageBox(...); // OK, juts like calling this->MessageBox(..)
AfxMessageBox(...) // ok
}
Sorry for that this should be:
class B:public CDialog
{
public:
void Display()
{
MessageBox(...); // OK, just like calling this->MessageBox(..)
AfxMessageBox(...) // ok
}
|
|
|
|
|
For starters, AfxMessageBox() is an MFC wrapper around the Win32 MessageBox() function. With MessageBox() , you supply the parent window, the caption, and the message text. With AfxMessageBox() , the parent window and the caption are handled automatically.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Why would you want this? How would the user close the message box without buttons? If you are performing some background processing and will close the box yourself, then you don't want a message box. You want a modeless dialog box.
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"
|
|
|
|
|
Hi,
I want to Get a SnapShot of my System, somewhat like pressing "PrtScr" Key on the Keyboard... Anyone, Sample Code please... Thanks!!!
|
|
|
|
|
Look at the keybd_event() function to synthesize keystrokes, with the VK_SNAPSHOT virtual key code. Make sure you generate a key press and a key release (see the dwFlags parameter).
Hope this helps,
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"
|
|
|
|
|
::keybd_event(VK_SNAPSHOT,0x45,KEYEVENTF_EXTENDEDKEY|0,0);
use this api to get snapshot.
and getting that image into your Application you have to querry Clipboard like this
//paste
HANDLE hBitmap=NULL;
if (OpenClipboard()) hBitmap=GetClipboardData(CF_BITMAP);
CloseClipboard();
and you got the image handle in hBitmap var
I Think It will Work
-----------------------------
Alok Gupta
visit me at http://www.thisisalok.tk
|
|
|
|
|
what if, i don't want to press a key?! coz, i want to make it automated... thanks for the info!!!
|
|
|
|
|
i have this application(exe) which is running.Now i want to develop another application in VC++ that can handle the the events that are happening inside the former.how can i do this ? can anybody help ?
thanks
sriraag
|
|
|
|
|
Microsoft wrote:
Although many of the filters provided with DirectShow support property pages, they are intended for debugging purposes, and are not recommended for application use. In most cases the equivalent functionality is provided through a custom interface on the filter. An application should control these filters programatically, rather than expose their property pages to users
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/directx9_c/directX/htm/introductiontodirectshow.asp
Does anyone know how to "control these filters programatically"? Or where can I find a sample or documentation on the topic?
Very appreciate for any kind of help. Thanks.
|
|
|
|
|