|
Accept in a loop? Thats not a correct way. Create a user interface thread of which the socket is a member and call Accept just once in the Initinstance of the thread
==================
The original message was:
Hi, I'm working on making my own simple proxy server to learn a bit about socket programming. I'm also implementing the main loop as a seperate thread but since my CSocket.Accept(CSocket) call is in its own loop waiting for a connection, I can't send it a CEvent to shut down.
Any help would be appreciated.
|
|
|
|
|
I have a dialog based app whose main screen consists of at least 4 tabs. What I would like to know is,
is it better o use property sheets or a tab control?
Thanks
Matt
|
|
|
|
|
I would like to create a program that can read the GUID from an ActiveX control. I will be reading each dll/ocx in a directory and storing the GUID and version information in a database. I have the version part but need to read the GUID.
|
|
|
|
|
__uuidof ( expression )
thought this might help.
==================
The original message was:
I would like to create a program that can read the GUID from an ActiveX control. I will be reading each dll/ocx in a directory and storing the GUID and version information in a database. I have the version part but need to read the GUID.
|
|
|
|
|
Hi, All!
How Do I use VirtualListView (LVN_GETDISPINFO) with CRecordset? Unlike CDaoRecordset here no a absolute position.
Thanks.
|
|
|
|
|
Sorry, All!
Help does not need, I simply unattentive look MSDN.
Sorry.
==================
The original message was:
Hi, All! How Do I use VirtualListView (LVN_GETDISPINFO) with CRecordset? Unlike CDaoRecordset here no a absolute position. Thanks.
|
|
|
|
|
how do i lock the position of two toolbars after docking them side by side?
|
|
|
|
|
You have 2 options:
1. Implement state persistence - in CMainFrame::OnCreate() call LoadBarState(), and in OnClose() or DestroyWindow() call SaveBarState(). You have to make sure the toolbars have different IDs. (see the toolbars & docking windows section for related info).
2. Derive your own classes from CToolbar or whatever, and block WM_LBUTTONDOWN and WM_LBUTTONDBLCLK (handle the messages and do nothing in the handlers' implementations).
The drawback is thath the user will no longer able to drag the toolbars around, nor to float them, but you can control them programmatically (using CFrameWnd's ShowControlBar(), DockControlBar(), FloatControlBar(), etc.).
Another problem of this approach is that the bars will be arranged on different rows if the user resizes the main window in a way the second toolbar is completely invisible.
Personally, I preffer (1).
Cristi
==================
The original message was:
how do i lock the position of two toolbars after docking them side by side?
|
|
|
|
|
The whole point of Dockable toolbars is so that they can be moved. The best thing to do is not to lock them. I can't see any reason why it would ultimately benefit the user in the end. Users like to be able to arrange things any way they want.
|
|
|
|
|
I am trying to programmatically change the mouse
horizontal/vertical sensitivity within MSVC++ 5.0. I am
using inline assembly to invoke mouse interrupts (INT 33) to
Get and then Set the sensitivities. (Microsoft took the
Int86() function out of this version.) My problem is I lose
my mouse buttons when forcing this interrupt and I have to
reboot to get them back.
I have disassembled some current mouse drivers and am
confident(not really) that I am using the correct assembly
code. I suspect that because I am invoking the INT 33 as a
result of a button push on a dialog box that the message
queue or interrupt handler is going recursive. But I am not
sure.
I can set the mouse acceleration factors just fine by using
the SystemParametersInfo() function.
Can anyone give me a hint or a different technique on
setting the mouse sensitivities.
Below is the inline asm listing. It is in the OnHScroll
event for a slider bar.
__asm{
push ebx
push ecx
push edx
mov ax,0x001b
INT 0x33 //MOUSE_INT
mov [h], bx
mov [v], cx
mov [s], dx
pop edx
pop ecx
pop ebx
xor ax, ax
}
Thanks in advance. . .
--
C. Ehmke
ehmkec@uswest.net
|
|
|
|
|
Hi !,
I have one question about memory file mappings, I create one in one program and in the other I open it. If I close the handle where it was created, can I continue reading in the one that was only opened ?
Can somebody explain me how this works ?
Thanks, Bye !
Braulio
|
|
|
|
|
I have got a project where I link a couple of tables from an external database to use within a local Jet (access.mdb) database, for which purpose I use the DAO classes.
THE DATABASE
The external database Open() call looks like this :- m_dbExtern.Open(_T(""), TRUE, FALSE, _T("ODBC;"));
The empty name string combined with the "ODBC;" cause the Windows ODBC selection dialog to appear, and CDaoDatabase opens a link to that. SIDE ISSUE: Anyone know how to get this dialog to default to the SYSTEM tab rather than the USER?
THE RECORDSET
Originally I used the straight CRecordset classes but found DAO more flexible, but its flexible. I have a class derived from CDaoRecordset which contains static attributes mirrored to what is in the table I want to access.
The ODBC links to a database table written in dataflex which has a data definition file : here is the indexes it defines :-
INDEX# FIELDS DES U/C LENGTH LEVELS SEGMENTS MODE
------ --------------- --- --- ------ ------ -------- -------
1 CODE NO NO 6 3 1 ON-LINE
2 ALPHA NO NO 9 3 2 ON-LINE
RECNUM NO NO
3 CODE NO NO 8 3 2 ON-LINE
EMPL NO NO
4 CODE NO NO 11 3 3 ON-LINE
ALPHA NO NO
RECNUM NO NO
The thing is, I don't know much about these recordset classes, I just want CDaoRecordset::Open() to use INDEX #2, #3 or #4 - it is defaulting to INDEX #1. Dataflex is a pretty rare database, but it does have an ODBC driver written for it - perhaps this driver defines everything I need?
Hope someone can help me....P-l-ease!!!
Cheers,
H. Venn
|
|
|
|
|
How to insert picture in CRichEditView ? !!!!!!!
|
|
|
|
|
Anyone have a source or example of a program that uses CSocket or CAsynSocket on an IPX network?
Thanks
|
|
|
|
|
The third beta of HPS Beauty is now available for
download. HPS Beauty is a 95/98/NT4 developer's
utility that reformats C/C++ source code according
to specific rules. The interface is entirely GUI,
but HPS Beauty may also be run from the command
line. HPS Beauty supports style files, which
allow you to save and restore groups of settings.
HPS Beauty also offers an optional visual results
window, that shows both the before and the after file.
HPS Beauty has been designed to be delivered as
two separate products: the standalone product
that you can download now, and a DevStudio add-in
that will allow instant reformatting of the file
you are editing, without having to leave the
DevStudio environment. The add-in product will
be available early in 2000.
We invite you to participate in this beta by
emailing support@highplains.net for download
instructions.
Sincerely,
HPS Beauty Support Team
www.highplains.net
|
|
|
|
|
I have a simple C++ console application (same problem with MFC application) that uses character strings. With Version 6, the debug version crashes when it tries to read the character string. However, the release version works fine. With Version 5, both the debug and release versions work fine.
------------------------------------------------------
#include <iostream.h>
#include <assert.h>
#define MAXENTRIES 2
main ()
{
char* szNames[MAXENTRIES]={"1234567890", "1234567890"};
for (int i=0; i < MAXENTRIES; i++) {
cout << "Input a name: ";
assert (szNames[i]);
cin >> szNames[i];
cout << "You have input: " << szNames[i] << endl;
}
return (0);
}
|
|
|
|
|
Subby,
For each of the names that you entered in, how many characters were typed in? Check for a buffer overflow ( especially on the 2nd name ).
- Mike
==================
The original message was:
I have a simple C++ console application (same problem with MFC application) that uses character strings. With Version 6, the debug version crashes when it tries to read the character string. However, the release version works fine. With Version 5, both the debug and release versions work fine. ------------------------------------------------------ #include <iostream.h> #include <assert.h>
#define MAXENTRIES 2
main () { char* szNames[MAXENTRIES]={"1234567890", "1234567890"};
for (int i=0; i < MAXENTRIES; i++) { cout << "Input a name: "; assert (szNames[i]); cin >> szNames[i]; cout << "You have input: " << szNames[i] << endl; }
return (0); }
|
|
|
|
|
your appl crushs because you are trying to write to const variable
there was a bug in VC++5, but in VC++6 is fixed.
==================
The original message was:
Subby,
For each of the names that you entered in, how many characters were typed in? Check for a buffer overflow ( especially on the 2nd name ).
- Mike
================== The original message was: I have a simple C++ console application (same problem with MFC application) that uses character strings. With Version 6, the debug version crashes when it tries to read the character string. However, the release version works fine. With Version 5, both the debug and release versions work fine. ------------------------------------------------------ #include <iostream.h> #include <assert.h>
#define MAXENTRIES 2
main () { char* szNames[MAXENTRIES]={"1234567890", "1234567890"};
for (int i=0; i < MAXENTRIES; i++) { cout << "Input a name: "; assert (szNames[i]); cin >> szNames[i]; cout << "You have input: " << szNames[i] << endl; }
return (0); }
|
|
|
|
|
I have an older proprietary database and want to add ODBC access. Does anyone know how this is done? I can't find anything on the MSDN. I think I need to build an ODBC driver for it.
|
|
|
|
|
I have a Visual C++ window application , and after some pass from one machine to another I can´t generate the debugg executable file, only the Release one.
|
|
|
|
|
==================
The original message was:
I have a Visual C++ window application , and after some pass from one machine to another I can´t generate the debugg executable file, only the Release one.
|
|
|
|
|
How do you add controls to a CTabCtrl at runtime?
Can you use dialogs like CPropertySheet?
I've searched MSDN from front to back on this, and can't find anything.
Thanks,
Frank
|
|
|
|
|
A tab-control is not like a property sheet in that you cannot add dialogs or child controls. Instead, the tab control only notifies you when events (such as the user clicking a tab) occur. It is your responsibility to show or hide controls for each tab as it is selected / deselected.
Cheers!
==================
The original message was:
How do you add controls to a CTabCtrl at runtime?
Can you use dialogs like CPropertySheet?
I've searched MSDN from front to back on this, and can't find anything.
Thanks, Frank
|
|
|
|
|
Is there any way to capture the double click event to allow the user to edit the name of the tab sheet?
Please email me.
|
|
|
|
|
Hi,
We normally create DLLs in VC for all Backend operations and use VB for GUI, use these VC objects and methods to interface with data servers.
My question is:
In VB, if we open the object browser and see the properties and methods of these libraries,
the first line of the panel in the bottom of the object browser states the Function name and Arguements required and the return value type.
The second line states that the class is a Member of some XYZ library...
The third line simply states method <methodname> or property <propertyname>
But the third line of ohher VB's library like VBA/VBRUN etc has more meaningful messages
for each of the functions and properties available in them.
Now, how to make the Object Browser display such meaningful messages for my user-defined Dlls classes?
I do not know where to define them when creating new classes in my dll?
Cheers,
Lakshmi
|
|
|
|