|
|
Hello
Try to Sleep(1000);
Andrew
|
|
|
|
|
hi, u can use this function
Sleep(milliseconds)
MFC programmer
|
|
|
|
|
You can use multimedia timer functions for more resolutions instead of Sleep()
|
|
|
|
|
PJP_PJP wrote:
multimedia timer functions
what do u mean?
/\|-||\/|/\|)
|
|
|
|
|
Use windows MutiMedia Timer functions like timeSetEvent(). This is the most accurate timer in the Windows Environment. See MSDN help.
|
|
|
|
|
Use windows MutiMedia Timer functions like timeSetEvent(). This is the most accurate timer in the Windows Environment. See MSDN help.
|
|
|
|
|
Hi,
I have to call the crystal report from VC++. The report is designed with back end SQL Server. What is the connection string to open the SQL Server from VC++ Code.
I have used SetConnect(). But it is giving a error "Cannot open SQL Server"
Can any one help me out in giving a sample code for displaying the Report by connecting it to SQL Server through VC++ Code.
Regards,
Vairamuthu.G.
|
|
|
|
|
Hi there
I'm currently doing my final year project in computer engineering. My project consists of creating a urban traffic intersection simulator (using opengl for the graphics) with vehicles travelling over the intersection. The traffic lights of the intersection will be controlled with fuzzy logic which is the main focus of my project.
I'm creating this project using visual c++ 6. I'm still a beginner with visual c++ although I've had previous experience with c++. I've created a basic windows SDI program with the help of the wizard and implemented opengl in the window.
My problem is that I want to add a tool box (dialog box) to the right-side (but inside) of the opengl-window in which various controls will be, almost like 3D studio MAX. Thus it must be created at startup and remain there all the time. Also it must be placed on the right-side of the window and not be movable / minimizable / closable. Also it must be what they call modeless, so that you can both work with it and the main window.
Any help with this tool box (dialog box) will be appreciated.
Thank you
|
|
|
|
|
hmm, it sounds you want something like a Rebar... look at this article on MSDN about Rebars:
CReBar control[^]
Hope this helps you...
|
|
|
|
|
Thanx it did.
Although I don't think I will use Rebars specifically, they seem to be a bit difficult to implement in visual c++.
|
|
|
|
|
Hi!
I would like to ask:
- is it possible/how to add a new string (id+value+caption) to the string table at run-time (not in the string editor)?
- how to change the caption of a given(existing) string in the string table at run-time?
Thank you!
|
|
|
|
|
You want to update the resource. Right?
You can use BeginUpdateResource(), UpdateResource(), and EndUpdateResource() , but not on a running exe.
this is this.
|
|
|
|
|
Use UpdateResource(..., RT_STRING, ...) .
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
How can we use InputBox in VC6...is it similar to Vb? if not how to create one...
thanks
|
|
|
|
|
"edit box"?
... she said you are the perfect stranger she said baby let's keep it like this... Tunnel of Love, Dire Straits.
|
|
|
|
|
Add a dialog box to the resources. Attach a class to it. Make an edit box on the dialog. Attach a CString type variable to it. Then call it using DoModal(), check the return value. If it is IDOK, then get the CString variable from the dialog box variable.
CInputBox dlg;
if (dlg.DoModal() == IDOK)
{
CString s;
s = dlg.m_strText;
}
If you want to show a prompt also, then make a public CString m_strTitle; in the dialog class. In its OnInitDialog(), Use SetWindowText(m_strTitle) to set the title. Before calling DoModal(), set that CString variable to anything you want.
this is this.
|
|
|
|
|
there's no InputBox as VB do.
you'll have to create your own dialog resource, and write its behavior...
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
See here.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
There is some class, say Class Test{};
And let there will be a pointer Test *ptest;
How to allocate 2D array of this class pointers m_array[x][y]?
that we will be able after allocation to do
m_array[0][0] = new Test();
m_array[1][0] = new Test();
... and so on.
9ine
|
|
|
|
|
#define X_SIZE 10
#define Y_SIZE 10
class Test {
};
Test* m_Array[X_SIZE][Y_SIZE];
for (int y = 0; y < Y_SIZE-1; y++) {
for (int x = 0 ; x > X_SIZE-1; x++) {
m_Array[x][y] = new Test();
}
}
easy, isn't it ?
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
Here's some thoughts.
1) std::vector<std::vector<Test*> > my_2D_array;
2) std::map<std::pair<int,int>,Test*> my_map;
In both these cases you would still need to use new. But you can avoid that by letting the standard container do the allocation its self, by using one of these instead:
1) std::vector<std::vector<Test> > my_2D_array;
2) std::map<std::pair<int,int>,Test> my_map;
Vector is faster, but you should reserve space for the number of rows required and then reserve space for each individual row (columns). A bit of a pain, but a simple helper function can do that for you. Or you could just encapsulate the vector of vectors in your own class and use that to access it.
Map is slower, but easier to use. You can't, nor do you need to, reserve space ahead of time. To add a new item just do this:
my_map[std::make_pair(0,0)] = Test();
Note: If the key pair already exist in the map then it is replaced by the new element. If the key pair does not exist, it is add to the map.
When using standard containers you do not have to store pointers to classes, just make the class type the type that is being stored. That way you are not responsible for the clean up and the container is responsible for most of the type safety garantees.
Oh well, I hope that gave you some help.
INTP
Use standard containers when available, unless you have a very good reason to roll your own.
|
|
|
|
|
Hi,
I was write a GINA dll that works fine on Windows XP. I use version 3 of Winlogon functions that is compatible with Windows 2000+. But when I tested this dll on Windows 2000 Advanced Server and Windows Server 2003, a problem occurred. When the message dialog with message "Preparing network connections" or "Applying computer settings" appear, this dialog remains for a long time (in fact for ever). What could be happened? Do you know?
Thanks,
Esmaeil
|
|
|
|
|
Hi
How can i at runtime replace a picture that i have inserted initially in the dialog box with another one?
/\|-||\/|/\|)
|
|
|
|
|