|
Can anyone suggest a way to play an Avi file over a push button control?
|
|
|
|
|
|
Hi,
Is it is possible to create a interactive thread or process from a interactive service?
With best Regards,
A.Ilamparithi
|
|
|
|
|
The book I'm reading has me create three files:
rectangle.h
- header file with #ifndef RECTANGLE_H #define RECTANGLE_H and ends with #endif .. I'm not sure what these do exactly, but it says to put them in there.
rectangle.cpp
- This one contains the member functions of the class I define in the header file, but there is no main function in it. When I try to compile it I get..
"LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main"
For the third file it tells me to link the project with the object file that's created from the rectangle.cpp file, but that file wont compile.
I'm using Visual C++ 6.0 and to make the rectangle.cpp I went to New/C++ source file.
Please help
|
|
|
|
|
oops. looks like I was hitting build instead of compile.. it put the .obj file in a folder called debug.
Now I'm trying to figure out how to link that .obj file with the third file.
|
|
|
|
|
Hi there
How to convert double to int?
Q1:
if a double is smaller than 1.4, it will be assign to 1
Ex: 1.3 will be 1
if a double is bigger than 1.4, it will be assign to 2
Ex: 1.5 will be 2
Q2:
if a double is bigger than 1 and smaller than 2, it will be assign to 2
Ex: 1.20 will be 2
2.10 will be 3
Does anyone know the function?
Thanks.
|
|
|
|
|
Can't u use a cast?
The word of the day is legs, let's go back to my house and spread the word
|
|
|
|
|
Q1: Add 0.5 and cast to int.
Q2: (rounding up) is done bey ceil() (and ronding down by floor()).
"We trained hard, but it seemed that every time we were beginning to form up into teams we would be reorganised. I was to learn later in life that we tend to meet any new situation by reorganising: and a wonderful method it can be for creating the illusion of progress, while producing confusion, inefficiency and demoralisation."
-- Caius Petronius, Roman Consul, 66 A.D.
|
|
|
|
|
I can not find sqlcli1.h and sqlenv.h
could you help me ?
thanks
|
|
|
|
|
They are discussed in this online manual[^]. It looks like a pair of headers for developing programs to use DB2 databases. If there's a developer kit for the product, they're probably included in it.
Heard in Bullhead City - "You haven't lost your girl - you've just lost your turn..." [sigh] So true...
|
|
|
|
|
|
I'm trying to write a peice of code to allow me to intercept the close command in the console attached to my application's process so it will prompt the user before destroying the process. Below is the function I wrote for this. It works fine, but the problem is that when the message box pops up it convinces windows the program has stalled, and an end task window opens. Is there any way to prevent this? If it matters, I'm only considering Windows 2000/XP compatibility for this app.
BOOL WINAPI ConsoleHandlerRoutine(DWORD dwCtrlType)
{
int i;
switch(dwCtrlType)
{
case CTRL_C_EVENT:
case CTRL_CLOSE_EVENT:
for(i = 0; i < (MAX_DASMS - 1); i++)
{
if(dasmDialogProcInfo[i].handle)
{
if( MessageBox(hWnd_console, "All work in open windows will be lost if you terminate the application. Proceed?", "Information", MB_YESNO | MB_ICONQUESTION) == IDYES )
return FALSE;
else
return TRUE;
}
}
break;
}
return FALSE;
}
|
|
|
|
|
Hi,
I learn that Visual C++ 6.0 is not ansi/iso compatible but Visual studio .net is. Can anybody elaborate a little more on it? Why one is not and the other is?
|
|
|
|
|
It is a matter of design from Microsoft. Visual C++ .NET is simply newer and is a better C++ compiler than its predecessors.
Kuphryn
|
|
|
|
|
No compiler is actually 100% ansi/iso compatible. Ultimately VC++ 6.0 suffered from Microsoft wanting to ensure backward compatibility and that the standard was still not finalized. In the end, Microsoft responded to customer demand for fuller compatiblity. Now if we could just get them to fix all the goofiness with Visual Studio....
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|
Joe Woodbury wrote:
Now if we could just get them to fix all the goofiness with Visual Studio....
And goofy it is...Oh Yes!
"We trained hard, but it seemed that every time we were beginning to form up into teams we would be reorganised. I was to learn later in life that we tend to meet any new situation by reorganising: and a wonderful method it can be for creating the illusion of progress, while producing confusion, inefficiency and demoralisation."
-- Caius Petronius, Roman Consul, 66 A.D.
|
|
|
|
|
Joe Woodbury wrote:
No compiler is actually 100% ansi/iso compatible.
This one[^] is.
|
|
|
|
|
Hi there...
I'm using VC6 & STL in my program along with Openssl.
I'm getting compilation error in OpenSSL\bn.h
The error is as follows:-
error C2955: 'modulus' : use of class template requires template argument list
c:\program files\microsoft visual studio\vc98\include\functional(57) : see declaration of 'modulus'
There seems to be some kind of conflict in template names, because STL and OpenSSL structure are using same template name.
Is there any simple workaround for this ?
Any help is appreciated.
Sheetal.
|
|
|
|
|
Have you defined 'using namespace std;' ?
In that case, try deleting that and use the fully qualified name instead, eg. std::cout instead of cout.
Anyway, that's just a SWAG, because I rarely write C++ myself
"After all it's just text at the end of the day. - Colin Davies
"For example, when a VB programmer comes to my house, they may say 'does your pool need cleaning, sir ?' " - Christian Graus
|
|
|
|
|
Hi,
Did anybody put a CRectTracker on a CScrollView wider than client area (4000x4000 pixels for example) and do some scrolling and/or zoming? The MSDN doesn't help me at all! From my point of view the MSDN creators should explain very clear where the actual Draw-ing is made when CRectTracker::Draw function is called. It is made on client area - visible area(ex: 100x100 pixels wide) or view area (ex: 4000x4000 pixels wide)?
Why 6 is affraid of 7?
Because 7 8 9
|
|
|
|
|
i am trying to create a 3D matrix vMatrix[x][y][z]
getting warning message:
warning C4786: 'std::vector<std::vector<std::vector<double,std::allocator<double> >,std::allocator<std::vector<double,std::allocator<double> > > >,std::allocator<std::vector<std::vector<double,std::
allocator<double> >,std::allocator<std::vector<double,std::allocator<double> > > > > >' : identifier was truncated to '255' characters in the debug information
any ideas?
(i know i can always ignore warnings but i want to know why)
cheers,
|
|
|
|
|
Template instance names in the STL, when fully expanded by the compiler, often result in truly awe-inspiring identifiers that exceed the 255-character limit for identifiers in the debug info. Remember that many STL templates take a number of optional extra template parameters that specify such things as allocators, sorting rules, and hash traits. The compiler fills in these parameters with default values when generating the instance.
I've found this warning to be generally harmless. You can selectively disable it with:
#pragma warning(disable:4786)
- Mike
|
|
|
|
|
Help!
I use RegisterHotKey function to define a global hotkey as following, I works with debug build, but crash with release build when the second I press the hotkey.
Could anyone help? Thanks!
CMainFrame::CMainFrame()
{
m_nHotKeyID = 100;
BOOL m_isKeyRegistered = RegisterHotKey(GetSafeHwnd(), m_nHotKeyID,
MOD_ALT, VK_TAB);
ASSERT(m_isKeyRegistered != FALSE);
}
//lets remove the hotkey block when the application is destroyed
CMainFrame::~CMainFrame()
{
BOOL m_iskeyUnregistered = UnregisterHotKey(GetSafeHwnd(), m_nHotKeyID);
ASSERT(m_isKeyUnregistered != FALSE);
}
|
|
|
|
|
Interesting.
Try calling it in OnCreate(). Make sure GetSafeHwnd() returns a valid handle.
Kuphryn
|
|
|
|
|
Thanks, Kuphryn.
Actually I did call it in OnCreate, but also crash with Release build.
The point is it always work with Debug Build, but crash the second I press the hotkey with with Release build.
Do you have any Idea?
|
|
|
|