|
Can anyone tell me why Autocomplete sometimes stops working in the VC6 IDE ??? It works in some functions of the class, but not in others! They can all see each other, and I don't get any errors when compiling! thx!
Nitron
_________________________________________--
message sent on 100% recycled electrons.
|
|
|
|
|
Close the IDE, delete .NCB file, restart it and pray.
Concussus surgo.
When struck I rise.
|
|
|
|
|
SWEET!!!!!! YOU 'DA MAN!!!
Nitron
_________________________________________--
message sent on 100% recycled electrons.
|
|
|
|
|
Hello,
How can I properly catch key combinations of VK_LEFT (left arrow) and no keys, CTRL, SHIFT, or ALT? Here is the code I have been trying with no luck. The switch for the cursor key works but if statements for the CTRL, SHIFT, etc do not. What am I missing?
Ted
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
void CFEvisGLView::OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags)
{
// ALT + arrow keys -> rotate, clockwise/counterclockwise
// SHIFT + arrow keys -> rotate, 90 degree delta
// CTRL + arrow keys -> pan model
switch (nChar) {
case VK_LEFT: // left cursor
if (GetKeyState(VK_CONTROL) == 1) {
// pan left
}
else if (GetKeyState(VK_SHIFT) == 1) {
// rotate horizontally or vertically 90 deg
}
else if (GetKeyState(VK_MENU) == 1) {
// rotate clockwise/counterclockwise
}
else {
// rotate horizontally or vertically
pCamera->Yaw(-10);
}
break;
}
}
|
|
|
|
|
Try something like this:
BOOL bCtrl = (GetKeyState(VK_CONTROL) & 0x8000);
BOOL bShift = (GetKeyState(VK_SHIFT) & 0x8000);
|
|
|
|
|
Hello,
I am using recv() in my Server,
cout << "First recv..." << endl;
recv(clientS, r, 6, 0);
cout << "Second recv..." << endl;
recv(clientS, r, 6, 0);
and in the client side, I do not send any message after I have connected to the server. However, the output of the server is
First recv...
Second recv...
I just wonder that the recv() should be blocking operation, but how come it does not wait for the message come before it goes to another statement?
Thanks for help!
Nachi
|
|
|
|
|
again MSDN:
If no incoming data is available at the socket, the recv call blocks and waits for data to arrive according to the blocking rules defined for WSARecv with the MSG_PARTIAL flag not set unless the socket is nonblocking. In this case, a value of SOCKET_ERROR is returned with the error code set to WSAEWOULDBLOCK. The select, WSAAsyncSelect, or WSAEventSelect functions can be used to determine when more data arrives.
Papa
Murex Co.
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
I am sorry, I actually don't quite understand. The client haven't send any message to the server, how come the recv() does not wait? Actually, I have already read that documentation before, but I don't understand....
Thanks!
Nachi
|
|
|
|
|
I want to use MTS.But I don't know where can I get "MTS Explorer Utility ".Is that part of default installation on windows xp?Where can I find it?
Mazy
"If I go crazy then will you still
Call me Superman
If I’m alive and well, will you be
There holding my hand
I’ll keep you by my side with
My superhuman might
Kryptonite"Kryptonite-3 Doors Down
|
|
|
|
|
On Windows XP (I'm on XP Pro), there's no MTS anymore. You have COM+ 1.5, fully compatible with MTS. You can find the similar utility on Control Panel/Administrative Tools/Component Services
Concussus surgo.
When struck I rise.
|
|
|
|
|
Thanks.
Mazy
"If I go crazy then will you still
Call me Superman
If I’m alive and well, will you be
There holding my hand
I’ll keep you by my side with
My superhuman might
Kryptonite"Kryptonite-3 Doors Down
|
|
|
|
|
I'ev installed WinCVS on my computer to look after my source code.
I've run into a rather anoying bug.
When you commit changes, the file is deleted and retaken from the reposisory. If this is a header file then VC++ panicks and I lose that class from my workspace menu. The only solution i know is to exit, delete the .ncb file and restart. This is really getting on my nerves...
does anybody know a better workarround.
Asim Hussain
e: asim@jawache.net
w: www.jawache.net
|
|
|
|
|
Whitch versions you use? I use WinCvs 1.2 + VC6 without problems.
Pavel
Sonork 100.15206
|
|
|
|
|
Yeah thats what i use.
Do you also use the CVSIn Plugin for VC6, i think my problems stemming from there?
Asim Hussain
e: asim@jawache.net
w: www.jawache.net
|
|
|
|
|
Jawache wrote:
Do you also use the CVSIn Plugin for VC6?
No.
I'm checking the files with the option "Checkout read-only" unchecked and I'm not using the Edit function, maybe this can be the difference .
Pavel
Sonork 100.15206
|
|
|
|
|
Now my programs is acting really weird. What worked before now displays a "User breakpoint" error when i move my mouse over the "open file" dialog. Here's my browse dialog which worked fine before:
void OnBrowse()
{
OPENFILENAME ofn;
char szFileName[MAX_PATH+1];
const char szFilter[] = "All Files (*.*)\0" "*.*\0";
szFileName[0] = '\0';
ofn.lStructSize = sizeof(OPENFILENAME);
ofn.hwndOwner = ghMainWnd;
ofn.lpstrFilter = szFilter;
ofn.lpstrCustomFilter = (LPSTR)NULL;
ofn.nFilterIndex = 1;
ofn.lpstrFile = szFileName;
ofn.nMaxFile = sizeof(szFileName);
ofn.lpstrFileTitle = NULL;
ofn.lpstrInitialDir = NULL;
ofn.lpstrTitle = (LPSTR)NULL;
ofn.Flags = OFN_ENABLESIZING | OFN_FILEMUSTEXIST | OFN_HIDEREADONLY | OFN_PATHMUSTEXIST | OFN_EXPLORER;
ofn.nFileOffset = 0;
ofn.nFileExtension = 0;
ofn.lpstrDefExt = "";
if (GetOpenFileName(&ofn))
SetDlgItemText(ghMainWnd, IDC_SOURCEFILE, szFileName);
}
It worked fine before, but now when i have added a new function which should execute after the OnBrowse function is done, i get a "User breakpoint" message when i move my mouse over the dialog:
Unhandled exception at 0x77f767cd in MP3.exe: User breakpoint.
Here's the contents of the Call Stack when the erros appears:
ntdll.dll!77f767cd() <- stops here
ntdll.dll!77fa2f17()
ntdll.dll!77f842f4()
ntdll.dll!77f635c7()
msms001.vwp!017b7b68()
msms001.vwp!017b7539()
msms001.vwp!017afcf7()
vct3216.dll!00c34326()
And this appears in the Output pane:
HEAP[MP3.exe]: Invalid Address specified to RtlFreeHeap( 01810000, 01814270 )
Unhandled exception at 0x77f767cd in MP3.exe: User breakpoint.
All help is appreciated.
-Rune Svendsen
|
|
|
|
|
You actually should be thankful for the user-breakpoint: it is called by the debug-version of your program, because an assert failed. RtlFreeHeap even tells you why it failed: you're trying to free a memory-block that either has been damaged or was never allocated. RtlFreeHeap knows this because it puts a signature before and after each allocated block and the signatures before the block you're trying to free don't match.
Figure out which variable is being mishandled, and your program will stop acting weird.
When you say it 'worked before', you're probably saying it worked in release-build: no assertions are being performed, and the RT will be happy to free anything you ask it to, even things that were never allocated.
|
|
|
|
|
Thanks for your help. But how is it possible to find out what variable is being mishandled when the error happens when i move my mouse over the dialog created by the GetOpenFileName API?
Thanks
|
|
|
|
|
Hi all,
I need to compare 2 strings,one is a simple character string and the other is a LPWSTR value.How can I do it.Is there any type conversion available.
Thanks
Abhishek.
Learning is a never ending process of Life.
|
|
|
|
|
You will need to convert one of the strings into the same format as the other. Which one you choose does not matter.
Use one of these functions:
MultiByteToWideChar
WideCharToMultiByte
Build a man a fire, and he will be warm for a day Light a man on fire, and he will be warm for the rest of his life!
|
|
|
|
|
Isn't it best to convert the single-byte to wide-format? If conversion from wide- to single-byte format looses information (because some widechars are not representable), the strings might match after conversion, even if they don't actually match... No?
|
|
|
|
|
example:
USES_CONVERSION;
LPCSTR s1 = "Hello World!";
LPCWSTR s2 = L"Hello World!";
int i = _tcscmp(A2CT(s1), W2CT(s2));
There is other ways, but more complicated.
Michel
It is a lovely language, but it takes a very long time to say anything in it, because we do not say anything in it, unless it is worth taking a very long time to say, and to listen to.
- TreeBeard
|
|
|
|
|
Good day all
I was wondering if someone could help with this. I need to find a way of checking to see that if my application that I built is currently running? Any information would be a great help.
Thanks.
|
|
|
|
|
Just use the prevInstance member value of the App object.
If (App.prevInstance) Then
MsgBox "This is the second instance of your app"
End If
When you run your program, the first time, nothing will happen, the second time you will get a message box indicating that there is a previous instance of your app running.
Build a man a fire, and he will be warm for a day Light a man on fire, and he will be warm for the rest of his life!
|
|
|
|
|
I wanna find my articles which I wrote in this fourm some days ago ,how could I do that?thx
YES, I am here.
|
|
|
|