|
Just install MDAC, and you can use DAO or ADO. There is an extra download for Jet, I'm not sure if it's needed now or not.
Christian
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.
|
|
|
|
|
Hi ,
The MS Jet Engine has to be installed.(Although
most systems have it, it may not be the exact version
u need) They cannot be packed with ur exe. But since
the installation package 'mdac_type.exe' is freely
distrubutable, u can have it packaged as a secondary
installation package along with our own installation.
Best of Luck.
Kumar
|
|
|
|
|
Thanks for the advice guys! I'll package the MDAC setup with my application.
|
|
|
|
|
If you are using the installshield, you only need to inlude the DAO Object, but in other case you need to add the following files to your seup.
dao360.dll depends of the version
AsyFilt.dll
msjint40.dll depends of the version
msjter40.dll depends of the version
msvcrt.dll
msvcrt40.dll
stdole2.tlb
comcat.dll
oleaut32.dll
olepro32.dll
Note: if you are using the 3.5 version these are the files
dao35.dll
dao2535.tlb
msjint35.dll
msjter35.dll
+ the rest of the files of the previuos list.
only I need to add that some files must be register, but that is your homework...
-I can say you...
SSShhhh bob!!!
Cheers!!!!
Carlos Antollini.
|
|
|
|
|
I am using a std::vector object to contain data that I need when creating
and displaying a graph. Initially the std::vector object is empty when
created. As information is retrieved it is push_back() onto the std::vector.
The std::vector object is declared in a CDocument object. When a CScrollView
is displayed the information is retrieved from the std::vector object. On
closure of the CScrollView the std::vector object is erased in
CDocument::CanCloseFrame().
The problem lies in reusing the std::vector object after it is erase(). An
error occurs when trying to perform a push_back().
The code is as follows:
In CDocument -
std::vector<edge> m_graphedge;
In CDocument::CanCloseFrame() -
m_graphedge.erase(m_graphedge.begin(), m_graphedge.end());
In CDocument::CreateGraph() -
m_graphedge.push_back(anedge); //works for the first time before it is
erased in CanCloseFrame();
//but doesn't work
after m_graphedge.erase() is called.
//HELP ???
Anybody with a solution?
Thank you
Franz Klein
|
|
|
|
|
I'm not sure why this would compile - erase is supposed to take an iterator or an iterator pair. Are you sure you don't want to call m_graphedge.clear() ?
Christian
This space for rent.
|
|
|
|
|
m_graphedge.begin() and m_graphedge.end() both return iterators. I get an access violation error. The same problem occurs when I use m_graphedge.clear().
Franz
|
|
|
|
|
In fact, vector::clear is implemented in terms of erase. Can you check your vector with debugger when crash happens (or just before)? Does it look to contain bogus bits?
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
This space for rent.
Ah Christian - you've finally found a way to pay off the 50Meg download bill! With your volume of posts, I'm sure Microsoft would be interested in taking up the rental.
Nice idea. Now, if only I can get a few thousand extra posts onto my 'account'...
-----------------------
The sermon on the mount...
Man 1 : Hear that? Blessed are the greek.
Man 2 : The greek?
Man 1 : Well apparently, he's going to inherit the earth.
Man 2 : Did anyone catch his name?
|
|
|
|
|
There is no reason for erase() or clear() to not work. It seems to me that the problem is with the data you are putting in the container, for which you are not giving any information. Are you putting pointers? In that case you should first delete the allocated pointers.
|
|
|
|
|
I want to use a group box with a coloured background. This seems to be very difficult.
I already have a solution, using a static field and set the background color, but the result of this is that the dialog cant' be edited without trouble in the resource editor, because the static is in front of the others, so you can't edit the other widgets.
It already seems not to work overwriting the OnCtlColor function of the dialog and changing the Brush. This makes no difference for a group box.
So has anyone an idea?
|
|
|
|
|
Hi Set the Group Box's style Transparent,
In the Dialog's OnPaint, Get the 'WindowRect' of the
groupbox and convert from screen to client co-ordinates,
Then paint the rectangle with what ever color u want.
But the groupbox's text will also need to be changed
which can be done thru the WM_CTLCOLOR handler
by using the pDC->SetBkColor and SetTextColor
as u need it.
Best of luck.
Kumar
|
|
|
|
|
Hi, all!
========
I Need to send a buffer to this port 1234 and to this ip 127.0.0.1 .
How can I do it ?
BTW: come to #CodeProject on DalNet (mIRC)
|
|
|
|
|
Look for CSocket or CAsyncSocket (the first one is easier)
Andres Manggini.
Buenos Aires - Argentina.
|
|
|
|
|
Hello, the codegurus around the world.;)
Or use WinSock API direcly.
Have a nice day!
-Masaaki Onishi-
|
|
|
|
|
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <winsock2.h>
#define WINSOCKVER MAKEWORD(2,0)
#pragma comment(lib, "wsock32.lib")
#pragma comment (lib, "ws2_32.lib") // link socket
int main()
{
int i, j;
int port=80;
char temp[1];
char host[512]="localhost";
SOCKADDR_IN ss_addr;
char request[MAX_PATH]="the buffer content goes here";
hostent FAR * he;
printf("Send Buffer \n");
printf("By Net Guy\n");
WSADATA wsdata;
if( WSAStartup(WINSOCKVER, &wsdata) != 0 )
exit (1);
if((he=gethostbyname(host)) == NULL)
{
fprintf(stderr, "invalid target\n");
exit (-1);
}
ss_addr.sin_family = PF_INET; in
ss_addr.sin_port = htons(port);
memcpy((char *) &ss_addr.sin_addr, (char *) he->h_addr,
sizeof(ss_addr.sin_addr));
if((i=socket(PF_INET, SOCK_STREAM, IPPROTO_TCP)) == -1)
{
fprintf(stderr, "cannot create socket\n");
exit(-1);
}
j = connect(i, (struct sockaddr *) &ss_addr, sizeof(ss_addr));
if(j==-1)
{
fprintf(stderr, "cannot connect to %s\n", host);
exit(-1);
}
printf("]- Sending request: %s\n", request);
send(i, request, strlen(request), 0);
while(recv(i,temp,1, 0)>0)
{
printf("%c", temp[0]);
}
return 0;
}
|
|
|
|
|
Thanks.
You helped me alot.
Do you have an example of how I can listen to this port and recive data?
BTW: thanks again.
|
|
|
|
|
Hi, I have set up some dynamic menus that look for files on the hard-disk and adds the ones that interest me to a CMenu structure which is added to the top-level menu bar - no problem. I have implemented the message map so that when any of these dynamic menus are clicked on, it is directed to a standard function, where it is hoped an algorithm will be executed on the file concerned. The difficulty I`m having is knowing which menu item has just been clicked (so I can load the appropriate file). The code I use to append the menus is :
popup->AppendMenu(MF_STRING, IDM_MENU_SELECTED, file.name);
and my message map is
ON_COMMAND(IDM_MENU_SELECTED, OnMenuItemClick)
They all have the same ID ! Is there anyway of passing through a CMenu* or CCmdUI* to the menu item that has just been selected so that the function header is :
void CDisApp::OnMenuItemClick(CMenu* MenuItemJustSelected)
or is there a way of implementing dynamic menu ID's at runtime? Please help, this is starting to pee me off.
AEGC
|
|
|
|
|
You shouldn't use IDM_MENU_SELECTED as the value for nIDNewItem in your call to AppendMenu. That is why you always get the same id back.
But I'd use ON_COMMAND_RANGE as the message map macro.
Define your handler : afx_msg void MenuItemClick( UINT nID );
nID will be the id of the item that was clicked,
Sorry to dissapoint you all with my lack of a witty or poignant signature.
|
|
|
|
|
Hi,
If u are targetting,
Win 98/Me/2000 , u can get what u want by trying
the WM_MENUCOMMAND which gives u a handle to the menu
and u can get the text.
Best of Luck
|
|
|
|
|
Hi
I've tried to create a toolbar with dropdown-style from my shell namespace exstension. I set all the common flags that I normally do. The dropdown arrow is displayed but I don't get any dropdown-notifications, only commands, no matter where I click or if I use BTNS_DROPDOWN or BTNS_WHOLEDROPDOWN.
Anyone with experience from this problem?
|
|
|
|
|
Hi, I have set up a CStringList containing lines of co-ordinate points of the form "20,30" for example, and would like to be able to process the CStringList lines into respective CPoint values so that I can use them as co-ordinates to map to the screen. I have managed to process the CStringList line to extract the string representation of "20" and convert it to CPoint.x and "30" to CPoint.y, but i am not convinced this is the best way to go about it. I would appreciate some help on this guys,
Cheers, Alan.
AEGC
|
|
|
|
|
Logically that is precisely what you need to do if you have a good reason to store them as strings in the first place. Why can't you build a vector ( OK, or a CArray ) of CPoints ?
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.
|
|
|
|
|
Hi friends,
i acutally have a little trouble with cursor on Win98SE. I have in the resource of my project 3 raw data item each one corresponding to an animated cursor.
With that:
HRSRC hrsc=FindResource(NULL,MAKEINTRESOURCE(IDR_NAV),"ANI");
DWORD dwSize=SizeofResource(AfxGetInstanceHandle(),hrsc);
HGLOBAL hg=LoadResource(AfxGetInstanceHandle(),hrsc);
LPBYTE pBytes=(LPBYTE)LockResource(hg);
i can get a pointer to my resource and with that :
HCURSOR m_Cur=(HCURSOR)CreateIconFromResource(pBytes,dwSize,FALSE,0x00030000)
result => m_Cur=NULL
but i must have to be able to create my cursor with CreateIconFromResource... but these cursor are 256 color. And it seems it is impossible to create 256 color cursors with the AIP function.
Have you any suggestion to help me ? ( i have to keep resource inside my .exe)
Thx all
|
|
|
|
|
Is There someone which can help me to kill a process by code (Visual C++) knowing the process name? Thanks
Nando
|
|
|
|