|
Hi, thank you for your answer.
But this is not right. you can write a programm, and trap WM_CHAR in it and send the user a Message using MessageBox, if the user dosn't answer the message box but resizes the parent window screen, it will be repainted. also you can step into program (F10) to see how messages are sent.
but about order of messages: I know only that WM_QUIT message is sent to the begin of Message queue (not to the end)
|
|
|
|
|
Actualy khan++ is (basicaly) correct!
Sending a message to the user via MessageBox() has nothing to do with sending messages such as WM_CHAR, within your application. Opening another window (or dialogbox, in this case) has nothing to do with sending command messages in the current interface thread. If you can resize the parent window of a message box while the message box is still open, then the window you are resizing is probably not the parent window of the message box (because a message box is modal).
Here is an important point: When you post a message it goes into the message que, when you send a message it is sent directly. What that means is that if you're processing a message and post anouther message it will be processed after you are done with the current message, if you send a message while you're processing the current message, then it will be sent directly (bypassing the message que). Therefore, you need to be carefull as to when and where you send messages, inorder to prevent locking up your program.
INTP
"The more help VB provides VB programmers, the more miserable your life as a C++ programmer becomes."
Andrew W. Troelsen
|
|
|
|
|
Dear,
I am a C++ Windows API programmer.
I am now writing an arabic program that has some buttons which their text should be in Arabic language.
I created buttons with CreateWindow() function using the "Button" stock class and I wrote its name in Arabic languge. but the text didn't dispay correctly in arabic language.
what I should do?
|
|
|
|
|
Ali Tavakol wrote:
I created buttons with CreateWindow() function using the "Button" stock class and I wrote its name in Arabic languge. but the text didn't dispay correctly in arabic language.
IS Unicode is enable in your EXECUTABLE?, or you can try CreateWindowW to create Button
"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
|
|
|
|
|
Do not expect anything that is not in ASII to be displayed correctly.
There are articles in the MSDN on working with international languages as well as articles at CP. I think there may be an article at CP that mensions this subject, but I'm not sure.
I do not know if the latest book on iternationalization is include with the latest MS compiler. The old version of the book was include with VC6, but the newest version of the book just came out last year.
Now here's something you can try (experiment):
1) Set the locale to Arabic (you pick the country).
2) Get a handle to the button (or CWnd* in MFC).
3) Set the font for that button to an Arabic language font.
P.S.
I've been meaning to ask one of the guys from Irac or Iran to write an article on this subject. The MSDN article made me think that it will be as difficult (if not more so) as writting support for Asian countries.
Good Luck!
INTP
"The more help VB provides VB programmers, the more miserable your life as a C++ programmer becomes."
Andrew W. Troelsen
|
|
|
|
|
Hello Hi
What I am struggled with is:
I have written a program in VC++ (API) that uses farsi texts. this program runs correctly on my computer without I do anything with language settings (I only typed farsi text in dialog boxes in Visual C++).
but when I run this program on another computer (which has installed farsi language on english version of windows), farsi texts didn't show correctly.
what I should do, without using Unicode?
Provide me with some sample code if possible.
Thanks a lot.
|
|
|
|
|
Well, first I would have to write the code and second it probably would not help you.
Apparently you have realized that if you are using Unicode it will eliminate most of your internationalization problems.
First: You need to make sure that Farsi is one of your region settings for the computer you are running the program on (control panel->Region and Language Options).
Second: If you want to be able to display both languages, then you need to specify the locale (language) in your program or at least be able to determine what locale the user has specified and select a font accordingly.
Yes, I know it sounds complicated and it is. But there is an upside to this, if you just want to support (2 laguanges) Farsi and (ASCII) English, then you can just make sure that all your text drawing uses a Farsi font. The reason this should work, is that all character pages (as far as I know) have the ASCII (English) character set built in.
P.S. This is all (experenced) guess work here, as I have not written any code that specificaly targeted the Farsi language. I know there is an article here some where witten by a guy, who is a university student in Iraq, that may have a better understanding of what your problems are. Try to find him, as I am out of ideas (at the moment).
INTP
"The more help VB provides VB programmers, the more miserable your life as a C++ programmer becomes."
Andrew W. Troelsen
|
|
|
|
|
Hi,
I've been trying to figure out how to open a file/url with the user's default browser but can't seem to find any info.
Is there a simple function like the "open" command of Mac OS X that opens whatever file you give it with the user's default program associated with that file type? Or will I have to muck around in the registry to find the correct program.
Thanks in Advance.
|
|
|
|
|
ShellExecute(NULL,"open","http://www.google.com",NULL,NULL,SW_SHOWNORMAL);
this is this.
|
|
|
|
|
khan++ wrote:
ShellExecute(NULL,"open","http://www.google.com",NULL,NULL,SW_SHOWNORMAL);
I Missed
"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
|
|
|
|
|
Thanks for the help guys, works like a charm!
|
|
|
|
|
retro_coder wrote:
Is there a simple function like the "open" command of Mac OS X that opens whatever file you give it with the user's default program associated with that file type?
Yeap, try this
ShellExecute(NULL,"open","http://www.codeproject.com",NULL,NULL,SW_SHOWNORMAL);
"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
|
|
|
|
|
Hi All,
I have created MFC (.exe) application. Now i want to convert
that application into ActiveX DLL.
How i can convert that existing application into ActiveX dLL.
without going thru MFC ActiveX wizard. Which necessary code
requried for that.
I will use that ActiveX DLL in VB.
if any one knows please answer me.
Regards,
Rajesh
|
|
|
|
|
rajesh_kapure wrote:
I have created MFC (.exe) application. Now i want to convert
that application into ActiveX DLL.
I am Afraid, you have recode it as I believe there is no Direct Solution available for you problem. But, you can wait for more suggestion from other people here!
"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
|
|
|
|
|
Hello everybody,
I am developing a Browser Help Object in IE and encounter some problems:
- Get data sent by POST method from an URL.
- Send data to an URL by POST method.
How can we accomplish that? Do you have any ideas or suggestions?
Thanks.
Lan hue sau ai lan hue heo
Lan hue sau doi trong heo ngoai tuoi
|
|
|
|
|
Hi,
I guess you can get the data sent by POST method in DocumentComplete/
DownloadComplete events of the IE.
In addition to this you have to do some digging on interfaces IHTML*...
Hope this would help...
Cheers,
Vishal
|
|
|
|
|
nmhuy wrote:
Get data sent by POST method from an URL.
You can retrieve the data sent by POST before sending it to the Web Server. This article[^] clarifies it quite a lot.
nmhuy wrote:
Send data to an URL by POST method.
To achieve this, you have to build your page with aform[^] (type POST defined)with all the fields you want to send.
<FORM action="http://somesite.com/prog/adduser" method="post"><br />
...form contents...<br />
</FORM><br />
In the "action" field you have to insert the URL where you want to send the data with the method defined in the field "method" (POST).
I hope it helps,
Marc Soleda.
... she said you are the perfect stranger she said baby let's keep it like this... Tunnel of Love, Dire Straits.
|
|
|
|
|
Send data to an URL by POST method.
I want the BHO send data automatically to an URL by POST method. In case of GET method, the BHO can easily send data to an URL by using the Navigate method of the IWebBrowser (e.g MyWebBrowser.Navigate2("http://...?data1=abc&data2=xyz"). But how can we send data an URL in case of POST method?Thanks.
Lan hue sau ai lan hue heo
Lan hue sau doi trong heo ngoai tuoi
|
|
|
|
|
nmhuy wrote:
I want the BHO send data automatically to an URL by POST method
Create a function on JavaScript or VBScript inside your HTML code that submits the form and make this JS function available from the VC++ code to call it when you decide (automatically or not).
To do this look for information about CHtmlView and its method GetScript()->Invoke().
Marc Soleda.
... she said you are the perfect stranger she said baby let's keep it like this... Tunnel of Love, Dire Straits.
|
|
|
|
|
Take a look to these good articles. They'll help you to perform JS calls from VC++:
Web Gui[^] or JavaScript calls from C++[^]
Marc Soleda.
... she said you are the perfect stranger she said baby let's keep it like this... Tunnel of Love, Dire Straits.
|
|
|
|
|
I need to do something like a network monitoring tool but would like to keep it simple. I just need to block/allow certain ip addresses. Anyone can point me out what C++/C# APIs/classes i should be looking into? Thanks.
<font=arial>Weiye Chen
Life is hard, yet we are made of flesh...
|
|
|
|
|
|
Thanks.
<font=arial>Weiye Chen
Life is hard, yet we are made of flesh...
|
|
|
|
|
Hi Chen,
Weiye Chen wrote:
I just need to block/allow certain ip addresse
you can check article, i am sure it will suit your requirement:-
http://www.codeproject.com/internet/smfirewall.asp[^]
"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
|
|
|
|
|
Thanks. I'll check that out.
<font=arial>Weiye Chen
Life is hard, yet we are made of flesh...
|
|
|
|