|
Hi Experts,
How to write a plugin(firefox) for an activex control. please give me some clues regarding this. I have searched many times but didn't got a proper way...
Regards,
Spk521
|
|
|
|
|
|
hi,
i did not got your answer.
My question is that suppose my screen resolution is 1024x768 and i have designed my GUI as per the current resolution.
by using following code i can get my systems current resolution
private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e)
{
MessageBox::Show("Screen Resolution is : " +monitor_width +" x " + monitor_height, "Dnyan", MessageBoxButtons::OK, MessageBoxIcon::Information);
double xRatio = monitor_height / 800.00;
double yRatio = monitor_width / 600.00;
}
public: System::Void Form1_Load(System::Object^ sender, System::EventArgs^ e)
{
monitor_height=Screen::PrimaryScreen->Bounds.Height;
monitor_width=Screen::PrimaryScreen->Bounds.Width;
}
Now suppose my project is in network and one persons system resolution is 800x600 second person screen resolution is 1024x768 and others is different
in this case i want to adjust control default location as well as its size as per screen resolution
then please tel me how its possible in C++ with Windows platform (in .net IDE)
Please help me
|
|
|
|
|
Please re-post your question in appropriate forum.
I believe in LOVE AT FIRST SIGHT...
Bcoz I have loved my Mother...
even since I opened my eyes...(ICAN)
|
|
|
|
|
This question has already been responded to here[^]. Please do not start a new thread for an existing question.
I must get a clever new signature for 2011.
|
|
|
|
|
I had the same problem. You design your GUI for the lowest resolution (as someone already suggested), then when you're at a higher resolution, you have extra space in the X and Y directions. You then write functions to 1) space the controls (vertically and horizontally) using this extra space, and 2) enlarge the controls with the extra space.
Not all controls will use extra space, e.g. buttons will remain the same size. But list boxes can use the extra space to show more data.
You can write one class that does all this, then call it with each of your forms, the extra X and Y space, and resizing information.
For the resizing information, I defined a language called WASP (Window Arrangement Specification Protocol) with statements consisting of ints. The first int is the operation (e.g. space in X direction, add N percent of the X extra apace to the following controls, etc).
I did this in MFC, and each control was referred to by its int ID. Sizes and percents were also ints. Since a WASP program is all ints, I could define it as a static array of ints in my program. The advantage to this is that I didn't have to deal with any parsing or lexical analysis; I just passed the int-array WASP program to the WASP class. I used #defines for the int operations for readability.
There's a separate WASP program for each form you want to resize. The WASP program is run once when your form is initialized.
|
|
|
|
|
Sounds interesting. Why don't you post an article about WASP?
|
|
|
|
|
That's a good idea. I might do it when I have the time.
|
|
|
|
|
I think there would be a lot of interest in it. Several of my clients have asked me about doing this.
|
|
|
|
|
Hello,
Our software has a credential provider (dll) which is displaying a DHTML dialog with several input boxes during logon time on Windows 7 Korean OS. It is required to enter Korean characters when the user sets the focus on the input box. However, the moment user clicks on the input box on the dialog, the keyboard option that gets displayed to enter Korean characters vanishes. Can you please tell us how is it possible to make the DHTML dialog’s input boxes accept non-english characters? The input boxes are standard type and not “password”.
Thank you.
WIth regards,
Shashikant
|
|
|
|
|
This question does not appear to have anything to do with C++. I would suggest re-posting in a more appropriate forum.
I must get a clever new signature for 2011.
|
|
|
|
|
Thank you.
Please let me know the forum where I can post this question.
Actually we tried to set system / thread locale to Korean programatically (Using MFC only) using SetThreadLocale() and SetThreadUILanguage() to Korean. But Failed. I thought there meight be something in MFC where we can set this option.
With regards,
Shashikant
|
|
|
|
|
Shashi.Shinde wrote: Please let me know the forum where I can post this question.
Well I'm not sure any more; your original question mentioned DHTML so I assumed that was the issue you were having problems with.
I must get a clever new signature for 2011.
|
|
|
|
|
Yes it is possible, I did the same with DHTML types and korean language. We have unicode data in one js file and after parsing this data is displayed in DHTML type dialog box.
1) Is your application is Unicode based not ANSI ??
2) Does your system support East Indian Language. My system doesn't support than the Korean language is not displayed properly and some ascii char (garbage) is displayed.
I believe in LOVE AT FIRST SIGHT...
Bcoz I have loved my Mother...
even since I opened my eyes...(ICAN)
|
|
|
|
|
Thank you Shilpi for your valuable reply.
Well, answering your questions -
1. We are using Unicode build.
2. Yes, it supports. It is native Korean OS.
Here, we saw Korean lables on Same dialog at GINA time but not able to type Korean characters. Our .dll running in logonui.exe context.
Also if we launch a different .exe with IME support for native language from our .dll then editbox accepts Korean typing.
Seems the logonui.exe process does not allow to type non-English chars at GINA type.
So please let me know how you implemented to type non-English chars at GINA time.
May I get your email id or any contact info. My id is shashi.shinde81@gmail.com
Thank you.
With regards,
Shashi
|
|
|
|
|
Hi!
I've to write code to establish a client/server communication in C++. What are the steps involved? Can any body give me some sample code?
|
|
|
|
|
Use Socket Programming, Google it. You will get lots of code sample.
-- Modified Friday, February 18, 2011 1:10 AM
|
|
|
|
|
Well no much more to add, that's the question : Wich is the best way to launch/run an externall .exe app form vc++6 ? When I say the best I'm thinking in the best balance between simplicity and functionality. Thanks in advance. Any examples if it's possible.
|
|
|
|
|
I mostly use ShellExecute[^]. So far I have only run into one problem, and that was to open a html page in a browser using an anchor (#) in the url to get to a specific part of the document. No other problems than that.
|
|
|
|
|
By far the simplest: WinExec() .
|
|
|
|
|
Hans Dietrich wrote: By far the simplest: WinExec().
Yeah but you need to remember to quote-enclose long filenames!
|
|
|
|
|
You can also use CreateProcess().
|
|
|
|
|
I've got code that reads Exif metadata from JPG files. One file in particular is giving me trouble when reading its PropertyTagEquipModel property. On my XP machine, it reads fine. On my Win7 machine, however, the call to GetPropertyItemSize(PropertyTagEquipModel) returns 0 , thus the property itself cannot be read. I even dumped all of the properties using GetAllPropertyItems() and PropertyTagEquipModel was not one of them (it is on my XP machine, though).
To add to the confusion, if I right-click the file in Explorer on the Win7 machine and select Properties, it will find the PropertyTagEquipModel property. Further, I downloaded a few Exif viewer programs and they found the property just fine.
For what it's worth, here is my code that reads the PropertyTagEquipModel property:
UINT uSize = pImage->GetPropertyItemSize(PropertyTagEquipModel);
if (uSize > 0)
{
PropertyItem *pItem = (PropertyItem *) new BYTE[uSize];
if (pImage->GetPropertyItem(PropertyTagEquipModel, uSize, pItem) == Ok)
{
if (pItem->type == PropertyTagTypeASCII)
}
delete [] pItem;
} Any ideas what I might be overlooking? All of my other 20,000+ files are working fine on both platforms.
[edit]
I got positive results by changing the GDI+ version in the manifest file. It defaults to v1.1, so by changing it to v1.0, I was able to read the property. That makes me wonder what feature(s) I might be missing by going "backward."
[/edit]
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius
modified on Thursday, February 17, 2011 10:52 AM
|
|
|
|
|
Documentation is a bit 'light', I see.
What was the return value of the (incomplete) GetAllPropertyItems ?
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]
|
|
|
|
|
CPallini wrote: What was the return value of the (incomplete) GetAllPropertyItems?
Status::Ok
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius
|
|
|
|