|
I am using an activeX control of a third party. The control name is "True Db Grid Pro 7.0".To populate this activeX i need another activeX named "ComponentOne XArrayDB Object (XADB7.OCX)". In VB this control is added through "REFRENCES" . How i add this refrences in VC++.
Addition in VB
--------------
"Select References… from the Project menu to display a list of available type library references. Select the check box labeled ComponentOne XArrayDB Object (XADB7.OCX), then press the OK button."
i tried to insert this activeX in VC++ but an error is prompted.
what i want to know
....................
what is equivalent of Vb REFRENCES in VC++
Have a nice wishes for helper.
|
|
|
|
|
hello everybody,
I have a c++ program in which i generate data that i
have to put in a excel file. But i don't know how
to write data in a excel cell.
Can you help me?
S.
|
|
|
|
|
Hi,
Have a look at http://www.codeguru.com/mfc_database/excel_sheets_using_odbc.shtml
it is a good starting point...
with greetings
Özgür
|
|
|
|
|
just write 0x00 to the file as you normally write a char to the file.
/Fredrik Sigbjörn
|
|
|
|
|
I use a CSocket derived class with a derived CWinThread class and use CArchive with it. For some yet unknown reason Send() locks after a while of running (hours). The opened socket has communication initiated from both client and server at times, if that helps. (Server sends tiny data once per second, client sends kB data occasionally, like every 10 seconds or so, plus both sides sends an ACK byte for every command)
Anyway, since I cannot find the reason of the locking, I want to get around the locked state. I want to make something from the outside and would like to have an OnIdle timer reset at intervals in the CWinThread. A parent thread will check this timer and if it isn't reset in reasonable time (seconds) the parent thread will call CancelBlockingCall() on the locked socket.
Now, will this work? Isn't it illegal to call the CSocket object function from another thread?
|
|
|
|
|
Hi,
I have a CFrameWnd dervied class ans i would like to remove the Min and Max buttons in the top right of the window. How would I acomplish this?
Cheers
Will
|
|
|
|
|
This code snip from MSDN about CWnd::PreCreateWindow explains this quite well.
// alter the styles of the main frame window
BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
{
// Create a window without min/max buttons or sizable border
cs.style = WS_OVERLAPPED | WS_SYSMENU | WS_BORDER;
// Size the window to 1/3 screen size and center it
cs.cy = ::GetSystemMetrics(SM_CYSCREEN) / 3;
cs.cx = ::GetSystemMetrics(SM_CXSCREEN) / 3;
cs.y = ((cs.cy * 3) - cs.cy) / 2;
cs.x = ((cs.cx * 3) - cs.cx) / 2;
return CFrameWnd::PreCreateWindow(cs);
}
If you want to keep the old styles try this
cs.style &= ~WS_MAXIMIZEBOX;
cs.style &= ~WS_MINIMIZEBOX;
greets,
Fredrik Sigbjörn
|
|
|
|
|
Hello,
I want to write / find a program which dials to a given number wait till the anwering machine to answer, wait to the "beep" (online voice recognition) and play a recorded msg.
I'm searching for a week now for an already existing prog but all my searchings failed.
pls help me soon.
10x, tal.
|
|
|
|
|
I don't think any such program exists. CLosest to this is a program that comes with the MediaPhonics Phoneraider telephony card. Don't know the name on the product right now, but it's pretty versatile, however I don't think it can do what you want. And I think it only works with the PhoneRaider card.
http://www.mediaphonics.com
The other way is to program itself, then you need to use TAPI, and from my experience with them I can say that they are not the esiest APIs to use. Another way, that I used at my old company, is to let someone else wrap them for you. I bought the ExceleTel TeleTools classes, they are excellent to code all kinds of diffrent telephone solutions.
http://www.exceletel.com/
One more thing to note. Modem sucks when using them as phones, the quality are realy lousy. The MediaPhonics card is a better solution, the USB version is kewl, costs about $400 though
greets,
Fredrik Sigbjörn
|
|
|
|
|
<<first of="" all="" 10x="" for="" the="" fast="" response.
what="" is="" tapi="" ?="" (what="" t'="" stends="" ?),="" and="" whats="" difference="" from=""
regulay="" apis?
with="" which="" porogramming="" language="" it="" work="" on="" platform="" ?
where="" do="" i="" find="" help="" tutorial="" about="" ?
10x="" all,="" tal.="">>
TAPI is telephony API, and they are microsofts APIs for communicating with modems and telephone cards. They work only for Windows. You can probably use these in all languages on Windows.
Check MSDN for omre information on TAPI.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tapi/tapiovr1_4zxw.asp
greets,
Fredrik Sigbjörn
|
|
|
|
|
How can I get my machine's physical Address using Visual C++?
Just like Using "IpConfig /all" in command mode.
Give me some advice.Thanks a lot.
|
|
|
|
|
Look at this function
DWORD GetAdaptersInfo(
PIP_ADAPTER_INFO pAdapterInfo, // buffer to receive data
PULONG pOutBufLen // size of data returned
);
typedef struct _IP_ADAPTER_INFO {
struct _IP_ADAPTER_INFO* Next;
DWORD ComboIndex;
char AdapterName[MAX_ADAPTER_NAME_LENGTH + 4];
char Description[MAX_ADAPTER_DESCRIPTION_LENGTH + 4];
UINT AddressLength;
BYTE Address[MAX_ADAPTER_ADDRESS_LENGTH];
DWORD Index;
UINT Type;
UINT DhcpEnabled;
PIP_ADDR_STRING CurrentIpAddress;
IP_ADDR_STRING IpAddressList;
IP_ADDR_STRING GatewayList;
IP_ADDR_STRING DhcpServer;
BOOL HaveWins;
IP_ADDR_STRING PrimaryWinsServer;
IP_ADDR_STRING SecondaryWinsServer;
time_t LeaseObtained;
time_t LeaseExpires;
} IP_ADAPTER_INFO, *PIP_ADAPTER_INFO;
|
|
|
|
|
I have a graph that I am displaying in a CScrollView derived window. I have circles representing the nodes and arrows representing the edges. When I move my cursor over a node, a tooltip appears showing the contents of the node. Sometimes the graph displayed is much bigger than the current view so one has to scroll to see the rest. And now finally for my problem ... After I have scrolled the view and then place my cursor over a node, no tooltip appears. It only appears when I scroll back to the original position the graph was displayed in. I have tried overriding OnVScroll() and OnHScroll(), but then the graph doesn't get drawn properly.
Any help with finding a solution or any ideas will be greatly appreciated.
|
|
|
|
|
I've just started to learn and write distributed application and i want to know what kind of apps work on winNT and not work on win98...
If you can point me to some documentation on the subject please let me know.
|
|
|
|
|
Apps that call methods only NT supports. MSDN alwyas tells you what Windows version is required for a function, if you don't have it on CD, you can go to msdn.microsoft.com
Christian
As I learn the innermost secrets of the around me, they reward me in many ways to keep quiet.
Men with pierced ears are better prepared for marriage. They've experienced pain and bought Jewellery.
|
|
|
|
|
I need to check whether the URL is valid or is exist,and return its status code,such as 404 means file not found,and so on. how can I?
thank you for advanced!
|
|
|
|
|
Do you want to write your own webbrowser?
You could handle the "NavigateError" event and browse to your own 404 site.
This works only if IE6 is installed
regards
|
|
|
|
|
I'm writing an SDI application which uses a dialog box to prompt the user. In this dialogbox I have a 2 ComboBoxes which need to be populated with different data every time the dialog is called. I have two problems:
1. This is the major one. Although I get no errors, and I've stepped through the code, the ComboBoxes always remain empty. I've included code at the bottom to show what I'm doing at the moment.
2. This is more a coding design question. Where is the best place to put this code? I can't put it in the Class Constructor because that causes an assertion error (No hWnd?). At the moment I'm trapping the ShowWindow Message and setting a flag to say whether or not I've already added stuff to the ComboBoxes
Any Help would be appreciated,
- X
// Populate Combo Boxes
CComboBox* temp1;
CComboBox* temp2;
int i;
temp1 = (CComboBox *)GetDlgItem(IDC_MEM1); // IDC_MEM1 and 2 are the ID's
temp2 = (CComboBox *)GetDlgItem(IDC_MEM2); // Of the combo boxes
for (i = 0; i < 32; i++) {
temp1->AddString((LPCTSTR)m_pDoc->MemoryLocations[i]);
temp2->AddString((LPCTSTR)m_pDoc->MemoryLocations[i]);
}
|
|
|
|
|
hi..
* the right place to initalise a dialog box would be "WM_INITDIALOG" / "OnInitDialog"... but this function is just called once (like a constructor.. but the HWND is already defined)
(btw.. for deconstruction "WM_DESTROY" / "OnDestry" would be the right place.. there the HWND is still defined)
* to your coding question.. i don't know why this doesn't work.. i use pretty the same code.. i am just using membervars of the type "control".. and this works absolutely fine for me.. the first thing i would look at is, if adding works if you put constant strings in it (like temp->AddString("Hello");)
if this works your m_pDoc->MemoryLocations[i] will not work.
hope i could help you a little bit..
Bernhard
"After twelve years of therapy my psychiatrist said something that brought tears to my eyes. He said, 'No hablo ingles.'" Ronnie Shakes
|
|
|
|
|
First remark: read essay of Joseph Newcomer on this web site under C++/MFC/STL>>General about the use of GetDlgItem. Using MFC the right way doesn't require GetDlgItem calls.
Give a control variable names to your controls:
c_cbxMem1 to IDC_MEM1
c_cbxMem2 to IDC_MEM2
Adding strings to comboboxes is done by:
c_cbxMem1.AddString(sMyString)
But this is not the reason why your code doesn't work. Perhaps you didn't initialize the m_pDoc pointer the right way.
Put the handler to invoke your dialog in the application Document and initialize the member m_pDoc as follows:
...OnMyDialog()
{
CDialog myDlg;
myDlg.m_pDoc = this;
myDlg.DoModal();
...
}
and if your strings in the application document are intialized correctly the AddString() function in the comboboxes should work fine.
I hope this will help.
|
|
|
|
|
Just a wild stab-in-the dark, but when i first used combo boxes, they always appeared empty to me.
Then I finally twigged that you have to drag out the size of the dropped down list in the dialog editor. i hadn't done this, and my dropped down list was so small it appeared empty.
Sorry to dissapoint you all with my lack of a witty or poignant signature.
|
|
|
|
|
Hello All,
Forgive me if this isn't the right place to post this, but I'm new to this community.
As the subject reads, I would like to pass a ponter to a function as an argument to another function. I'm pretty comfortable with that, but here's the catch: the function is a an method of an object.
Is this possible?
Any suggestions pointning me in the right direction would be apreciated.
Thanks in advance,
mark
|
|
|
|
|
Unless its a static function , you will get errors as there is no this pointer . Therefore you either pass an object , or pass a pointer to a static function.
|
|
|
|
|
The syntax for at typedef of a pointer to a member is:
(a member of CMyClass returning an int and taking a long and a void* as arguments, just an example)
typedef int (CMyClass::* LPFNMYCLASSMEMBER)(long, void*);
...
bool YourFunction(LPFNMYCLASSMEMBER pfnMember)
{
...
CMyClass* pClass = something;
int iRetVal = pClass->*pfnMember(aLongParam, aVoidPtrParam);
...
}
As I have shown you will have to have a valid object on which you can call the member function (unless it's a static member function which has no this pointer). So you cannot use non-static member functions as callbacks, for instance.
Cheers
Steen.
"To claim that computer games influence children is rediculous. If Pacman had influenced children born in the 80'ies we would see a lot of youngsters running around in dark rooms eating pills while listening to monotonous music"
|
|
|
|
|
Thank you Steen (and Andrew).
I'll let you know how it works out when I try to implement it.
However, could you pleas explain what you mean about "...non-static member functions as callbacks?"
thx,
mark
|
|
|
|