|
The problem is this line:
SendMessage(gnStartMsg, 0, 0);
This sends the message right back to the CDialog that this code is in. You want to do:
::SendMessage ( hwndOtherDlg, gnStartMsg, 0, 0 );
where hwndOtherDlg is the HWND of the receiving dialog. Or, if you have a CWnd* to it, you can do:
pOtherDlg->SendMessage ( gnStartMsg, 0, 0 );
|
|
|
|
|
I want to create an app that runs in the background most of the time. On rare occasions I want to display a modeless dialog for a short amount of time and then dismiss the dialog. This all seems easy enough to do.
I would like some advice on how to place the focus back on the app or control that had focus before my dialog interrupted it.
Any high level suggestion would be helpful.
Thank you.
PMCGAHAN@UCSWORKS.COM
|
|
|
|
|
If you haven't switched to any other windows, then it'll happen automatically when the dialog box is closed. That's the way Windows works and I advice that you let it work that way.
If you want to override that behavior then before showing the dialog box, get the handle of the foreground window (using GetForegroundWindow) and then restore it when the dialog closes (SetForegroundWindow).
Cheers!
Alvaro
|
|
|
|
|
Hello
I implement my own web browser. I have to know how to send
data with method POST ???
because of method GET I can check the attribute of user and
attach it with URL
such as
http://discussions.earthweb.com/cgi-bin/dnewsweb?cmd=post
&group=earthweb.cgi.general&utag=
but in method POST URL doesn't show any infomation
I don't know what to do
Please help me ..... ( I'm sorry to post unrelate VC++ )
Thank you
|
|
|
|
|
Post Method depends on the reques header "Content-Length:"
to determine when is the data finished.
here is a telnet session to demonstrate how you may try it (After getting connected e.g. 127.0.0.1 port 80
==================
The original message was:
Hello I implement my own web browser. I have to know how to send data with method POST ??? because of method GET I can check the attribute of user and attach it with URL
such as http://discussions.earthweb.com/cgi-bin/dnewsweb?cmd=post &group=earthweb.cgi.general&utag=
but in method POST URL doesn't show any infomation I don't know what to do
Please help me ..... ( I'm sorry to post unrelate VC++ )
Thank you
|
|
|
|
|
Post Method depends on the request header "Content-Length:"
to determine when is the data finished.
here is a telnet session to demonstrate how you may try it (After getting connected e.g. 127.0.0.1 port 80
POST /testDirectory/Form.asp HTTP/1.0
HOST: MyComputer and so on
Content-Length: (this will be the number of characters you are sending in the data portion )
<empty line="">
The Data which is the what usually follows the question mark (Note you don't need the question mark any more)
HTH
Regards
Ghazi Wadi
Dundas Software
==================
The original message was:
Hello I implement my own web browser. I have to know how to send data with method POST ??? because of method GET I can check the attribute of user and attach it with URL
such as http://discussions.earthweb.com/cgi-bin/dnewsweb?cmd=post &group=earthweb.cgi.general&utag=
but in method POST URL doesn't show any infomation I don't know what to do
Please help me ..... ( I'm sorry to post unrelate VC++ )
Thank you
|
|
|
|
|
Hello Ghazi
Would you mind give me an example please ....
cos I'm very new in CGI.
Thank you very much
|
|
|
|
|
The POST messages are sent by the Web Server as part of the applications environment variables. So you would use
routines like getenv to retrieve these variables.
Rajiv
|
|
|
|
|
Hello
I have to know that file .gif is animated or not !!!
because my library display Gif not support Animated
Gif it will crash when open Animated.
My idea is do check myself that is Animated or not !!!
but I don't know what to do ???
Any Idea ???
Thank you
|
|
|
|
|
Hi,
You can find descriptions of the GIF file format here:
http://www.wotsit.org/ (Graphics section)
Maybe you should first check if a new version of that library is available
(or maybe get another one
Cheers,
Cristi
|
|
|
|
|
If you know how to parse the header section of the GIF file, then look for the 0xFF flag indicating an application-specific extension, and if found and you have a buffer, check for the string "NETSCAPE2.0" -- that's the indication for an animated GIF.
==================
The original message was:
Hello I have to know that file .gif is animated or not !!! because my library display Gif not support Animated Gif it will crash when open Animated. My idea is do check myself that is Animated or not !!! but I don't know what to do ??? Any Idea ???
Thank you
|
|
|
|
|
I would appreciate any info on tapi. I wish to write a simple app to enable me to send
wave files to modem eg. simple answer phone. I struggled to understand examples in
MSDN so if anybody can assist it would be much appreciated.
|
|
|
|
|
==================
The original message was:
I would appreciate any info on tapi. I wish to write a simple app to enable me to send wave files to modem eg. simple answer phone. I struggled to understand examples in MSDN so if anybody can assist it would be much appreciated.blabla
|
|
|
|
|
I try find source for read JPEG icon
like MakeBmpFromFile function in VC++ 5
but I need this for VC++ 4 project
Thank you for your help
Roni
|
|
|
|
|
The source is available at www.jpeg.org
Regards,
Dmitriy
==================
The original message was:
I try find source for read JPEG icon like MakeBmpFromFile function in VC++ 5 but I need this for VC++ 4 project
Thank you for your help
Roni
|
|
|
|
|
Is there somebody who has communicated with
serial port (RS485).
Any example would be great.
Thanks
|
|
|
|
|
RS-485 communication is actually exactly the same as RS-232 communication. Only the hardware is a bit different.
In WIN32, this is fairly easy. You use the COM port just like a file. You open the port with CreateFile and supply e.g. "COM2" as the filename.
You have to call SetCommTimeouts to specify the timeout values and SetCommState to specify baudrate, parity and the like. The you just call ReadFile and WriteFile for your communications and CloseHandle when you're finished.
When using RS-485, you will likely use the DTR/RTS mechanism. You can change the state of these lines by calling EscapeCommFunction.
==================
The original message was:
Is there somebody who has communicated with serial port (RS485). Any example would be great. Thanks
|
|
|
|
|
==================
It depends if you have a card capable of driving RS485 installed on your PC. If you have you should be able to configure your interrupts on that card so that they may be on say COM3 or COM4. If you haven't got a card you can get a RS232 to RS485 converter and communicate through COM1 or COM2 on your PC's serial ports.
|
|
|
|
|
I use a National rs-485 card and the ports are used just like rs-232 as for as the win32 API
is concerned. So all standard serial port programming techniques apply. What specifically is
the problem? Any external devices attached to the rs-485 line always have their own specific
protocols, and you just have to get their manuals and do the work yourself.
==================
The original message was:
Is there somebody who has communicated with serial port (RS485). Any example would be great. Thanks
|
|
|
|
|
Use a RS232/RS485 convertor and all the WIN32 API calls will work. U may have to set RTS control to RTS_CONTROL_TOGGLE for 2 wire operation.
Prashanth
==================
The original message was:
Is there somebody who has communicated with serial port (RS485). Any example would be great. Thanks
|
|
|
|
|
Does a SHAppBarMessage wrapper exist? I would like to implement a ApplicationBar, and was just wondering before I go and write one myself.
Thanks in Advance
John Mancini
|
|
|
|
|
The best one I have found is at http://indigo.ie/~pjn/ntray.html
however I also think there is one on this site by Chris Maunder - investigate each and the decide for yourself.
==================
The original message was:
Does a SHAppBarMessage wrapper exist? I would like to implement a ApplicationBar, and was just wondering before I go and write one myself.
Thanks in Advance John Mancini
|
|
|
|
|
Hi John,
There was a very good article on this topic in MSJ (it was published in 1996, unfortunately I don't remember the month). Anyway you can find the copy of the article on MSDN CD. You just have to search the library for: "SHAppBarMessage" or "Jeffrey Richter". The title of the article is "Extend the Windows 95 Shell with Application Desktop Toolbars"
Regards,
Andrei Zenkovitch
Dundas Software
==================
The original message was:
Does a SHAppBarMessage wrapper exist? I would like to implement a ApplicationBar, and was just wondering before I go and write one myself.
Thanks in Advance John Mancini
|
|
|
|
|
How do I monitor browser activity such as Explorer Netscape and AOL etc like ICQ doe to get the current users URL?
TIA
Shaun Wilde
|
|
|
|
|
Attach to the iexplore.exe process and event sink to the web browser events. Then when the event occurs, like the url changing, you will recieve the event and can do what you want with it. There is an example on how to do this in an MSJ article back aroudn July 98
I also have experience doing this and could help you directly, just let me know.
-Erik
==================
The original message was:
How do I monitor browser activity such as Explorer Netscape and AOL etc like ICQ doe to get the current users URL?
TIA
Shaun Wilde
|
|
|
|