|
The first priority thing is to find out which part of your code is making it so slow (8 ~ 9 sec response time).
Is there any thread in your code?
Is there any loop (for loop, while loop) in your code?
Maxwell Chen
|
|
|
|
|
yeah for loop is there in my code but tht doesnt make any difference.
|
|
|
|
|
Nah, you're missing the point: if the UI is sluggish the way you depicted, there must be something wrong in your code (or you are using a 286 machine).
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]
|
|
|
|
|
Unless the same delay happens when you do things in other software on your machine, then the problem is in your code.
The trick is to narrow down what is happening during that delay.
If it's really long, maybe you could run your code from a debugger, and break into it during that delay.
Or use Spy++ to see all the messages happening during that time - maybe you do something "clever" during this time (ie, selection changing in one area, causing a database query till a different box).
Or maybe you work out something every iteration of you loop that you should calculate once outside the loop?
I'm going to stop guessing now, as it's not possible for me to be accurate - I'm just trying to point out that you need to a) admit you have a problem (which you did by posting here on CP), and b) try to hunt it down.
At the very least, use CWaitCursor so the user doesn't think the problem is theirs!
Iain.
I have now moved to Sweden for love (awwww).
If you're in Scandinavia and want an MVP on the payroll (or happy with a remote worker), or need contract work done, give me a job! http://cv.imcsoft.co.uk/[ ^]
|
|
|
|
|
yogeshs wrote: I click from one button to another button It is taking too much time around 8 to 9 seconds.
Is any way to make My UI faster ,so that It opens faster.
So what are you doing when "another button" is clicked?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"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
|
|
|
|
|
Hello Sirs,
i have problem with create dll from command line arguments program . i tested the command line arguments its working fine when i create the output of exe. Generally command line arguments taking the value of 0th element is output of exe .
for ex:
argv1[0] = "C:\\Test.exe";
when i convert this Test.exe into dll . i have problem in 0th element .how to create command line arguments into dll ..please replay me
thanks!
Raju !!!
|
|
|
|
|
Only an executable takes command line arguments.
A DLL is loaded by an EXE and so there is no command line per say.
|
|
|
|
|
Thanks for your replay superman ..this is my exe output and listed arguments in compiler ..
argv1 = (char**)malloc(8*sizeof(char));
argv1[0] = (char*)malloc(sizeof(char)*100);
argv1[0] = "C:\\Test.exe";
argv1[1] = (char*)malloc(sizeof(char)*20);
argv1[1] = "-MM";
argv1[3] = (char*)malloc(sizeof(char)*20);
argv1[3] = "14";
argv1[4] = (char*)malloc(sizeof(char)*20);
argv1[4] = "d:\\log.txt";
argv1[5] = (char*)malloc(sizeof(char)*20);
argv1[5] = "geo";
argv1[6] = (char*)malloc(sizeof(char)*20);
argv1[6] = "80";
argv1[7] = (char*)malloc(sizeof(char)*20);
argv1[7] = "d:out.txt";
when i command the 0the argument its throwing exception ..what i can do ?
Thanks !!
Raju !!!
|
|
|
|
|
You're doing it all wrong.
Command line arguments are used to pass in arguments.
And not set them from you're program.
For example, if you run the Exe like - MyExe hello world
You can read them in your program using the parameter of main.
argv[0] will be "MyExe"
argv[1] will be "hello"
argv[2] will be "world"
|
|
|
|
|
yes you are wright ..its my fault superman ..i am not asking clearly ..
suppose i am not passing the arguments from command line ..i am just getting the arguments from the user means ....
<code>
int main(char** argv)
{
argv =(char**) malloc (3* sizeof (char));
argv[1] = (char*) malloc(sizeof(char)*10);
argv[1] = "Hello";
argv[2] = (char*) malloc(sizeof(char)*10);
argv[2] = "World";
return 0;
}
</code>
how to print the text Helloworld but plz dont use separate list like
cout << argv[0] << argv[1] ;
please replay me !!
Thanks
Raju !!!
|
|
|
|
|
If you are accepting or creating it inside your program, create new variables.
char** newvar =(char**) malloc (3* sizeof (char));
newvar[0] = (char*) malloc(sizeof(char)*10);
strcpy_s(newvar[0], 10, "Hello");
newvar[1] = (char*) malloc(sizeof(char)*10);
strcpy_s(newvar[1], 10, "World");
newvar[2] = (char*) malloc(sizeof(char)*10);
strcpy_s(newvar[2], 10, "Goodbye");
You really should do it this way though (The C++ way) -
std::vector<std::string> myvar;
std::string str;
str = "Hello";
myvar.push_back(str);
str = "World";
myvar.push_back(str);
str = "Goodbye";
myvar.push_back(str);
|
|
|
|
|
Thanks Mr.SuperMan
Raju !!!
|
|
|
|
|
Hi all,
I want to develop a small demo.exe which runs in the client system with out .Net Framework and any other dependencies
is it possible to get this through Visual C++ projects.
Please guide me some one.
thanks in advance
|
|
|
|
|
That depends on the type of project you're creating and the library functions that you're calling.
For example, if you're creating a simple UI application using MFC,
set the project properties to statically kink against the MFC DLLs.
Project Properties -> Configuration Properties -> General -> Use of MFC -> Use MFC in a Static Library
|
|
|
|
|
Thank you Friend,
Can you help me how to invoke the DLL/EXE that is developed in C# from Win32 C++ appliction
Thanks again
|
|
|
|
|
Here are a few links -
http://www.codeproject.com/KB/COM/nettocom.aspx
http://www.blong.com/Conferences/BorConUK2002/Interop2/COMNetInterop.htm#CCW
|
|
|
|
|
Hi Thanks Again
Is it possible to access the DLL/EXE without making a COM object
For Example:
Just Execute an EXE from the C++ project( like starting a separate Process)
thanks.
|
|
|
|
|
If you only want to execute an EXE, you can use http://msdn.m[^]icrosoft.com/en-us/library/ms682425(VS.85).aspx to do this.
To access a C# DLL from C++, you will still need to create a COM Callable Wrapper (CCW).
|
|
|
|
|
I want to create a dialog based application in MFC to access a database containing 3 tables and run a query to display the filtered data of a single table.
can smebody help me with the code.????
Thanks in advance....!!!!
|
|
|
|
|
There are tons of examples here at CP (e.g., this one), as well as Google.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"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
|
|
|
|
|
Hello,
i am using Microsoft Visual Studio 2008 on Windows 7 and i'm programming in Visual C++ (using MFC).
Now i have the following problem:
I have a CDialog with an CComboBox on it (placed with the ressource-designer and assigned an variable of type CComboBox). In OnInitDialog() i want so assign an V-Scroll bar on the combobox, so the user can scroll down if the box is full of items. In my code i do this
m_cComboBox.ModifyStyle(0, WS_VISIBLE | WS_CHILD | WS_BORDER | WS_VSCROLL | CBS_DROPDOWNLIST);
The problem ist with WS_VSCROLL.
After compiling (with filling the combobox in the source code) and starting i can not use the combobox by clicking on the 'drop-down-arrow' on the right side. The combobox does not drop down. Whenever i click on the text area of the combobox (area left to the drop-down-arrow) instead it works - then the combobox drops down and shows the items.
This problem i have noticed only since Windows 7.
Why does the drop-down-arrow of the combobox not work? Does anyone have a solution?
Thanks.
modified on Thursday, November 12, 2009 2:18 PM
|
|
|
|
|
hollesser001 wrote: ...so the user can scroll down if the box is full of items.
Unless I'm not understanding you, that happens by default.
Are you using CBS_DROPDOWN , CBS_DROPDOWNLIST , or CBS_SIMPLE ?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"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
|
|
|
|
|
I am using an CBS_DROPDOWNLIST. With this option the combobox ist read only and the user only can choose an well definied item.
The problem occures only with an CBS_DROPDOWNLIST.
> Problem still open. Please answer!!
modified on Thursday, November 12, 2009 4:28 PM
|
|
|
|
|
In the resource editor, did you manually "grow" the drop list size ?
If you click on the "down arrow" of the combobox, extra resizing handles appears,you can now grow the drop list.
This signature was proudly tested on animals.
|
|
|
|
|
Yes, i used the "down arrow" in the ressource editor.
But i need to set WS_VSCROLL anyway because there is an V-scroll-bar needed if there are a lot of items in the combobox so that the defined drop-down-area (that i have set in the ressource editor) does not suffice.
What i found out: On Windows 7 you don't have to set WS_VSCROLL any more because the combobox has a V-scroll-bar in base setting. But on XP and VISTA it is necessary and i must support all operation systems (XP, VISTA and Win 7).
> Problem still open. Please answer!!
|
|
|
|