|
I have the problem solved now. After I added the .lib files and set the additional include paths right everything is working fine now. By the way, I'm using code that I found on this site that are MySQL wrapper classes and another set of Dbase wrapper classes that I also found on this site. I have two different projects that I used just to make sure I could make them both work separately. Now I'm going to put them both in the same project to use them to do an export from a MySQL query result set to a .dbf file. When that's done, (hopefully today), I'm going to put them into a function that accepts the parameters for the connection to the MySQL database and prompts you with a Save As dialog for the .dbf file and put it in a dll so that it can be called from other applications as well. I was thinking about putting this DLL and source up on the site as well (of course with proper acknowledgements to the writers of the other 2 packages I'm using as well). I'm not sure if this is really simple for some of you, but anyone expresses interest, I'll gladly post it on the site.
If it's broken, I probably did it
bdiamond
|
|
|
|
|
I have created an MFC CPP console process and redirected the stdin/stdout/stderr to a windows application. This is so the windows application can send console commands and process the output from the commands. The problem I am having is finding out the status of each command that I send (ie ERRORLEVEL or command result codes).
My implementation at this point creates a new console process, redirects the I/O and then commands can be issued with a printf to the new stdin pipe and reads from the new stdout pipe the results. However, there is no feedback to know when "CMD.EXE" has fininshed the last command so I can send the next one. I would like to keep the console process open and pipes in place, and simply send console commands and accumulate the output from stdout until the command is complete. Then send the next command ASAP.
I wind up having to use hard delays to wait for the last command to finish before I send the next one. I have searched high and low for the proper way to handle this functionality but I am finding no solutions. I assume a make utility does exactly what I am needing to do since it must shell and get the ERRORLEVELS/Result codes. Can anyone point me in the right direction?
|
|
|
|
|
Just create a new console process for each task, and wait for it to exit, then start the next one. It's simpler, and you get a proper exit code on each one.
|
|
|
|
|
Hello,
I need a outlook 2000 add-in so I can read HTTP mail (like hotmail). I've spend my 8 hour working day looking for an add-in or information how to build such an add in. All that I found proved not usefull.
Is there an outlook add-in that allows me to read HTTP mail (als referred to as WebMail).
If there's not can someone guide me to some articles and related material on ow to build an outlook add-in and how to read an HTTP mail server?
Thanks in advance.
A student knows little about a lot.
A professor knows a lot about little.
I know everything about nothing.
|
|
|
|
|
Hi. As far as i remember there are few articles about this topic. Try to use this code
http://www.wischik.com/lu/programmer/mapi_utils.html
this page contains very usefull info about outlook mapi. I don't know what you want to do with the message if just read you will have html code while using the code from the link.
Pain is a weakness living the body
|
|
|
|
|
Well, I want to get emails from an HTTP server like Yahoo and Hotmail. Unfortunatly MS outlook 2000 doesn't support this (Outlook express does ) I figured that enough companies and people at home use outlook, and such support would have been buildt already. I havent found it
A student knows little about a lot.
A professor knows a lot about little.
I know everything about nothing.
|
|
|
|
|
|
I want to make a MS Outlook Add-in so I acces and view mail accounts that exist on a HTTP server.
The add-in part (which is my subject in the fist place!) is for a a windows program and therfore not suitable for the web dev forum.
The protocol I should use for talking to an HTTP server can be found somewhere in the big pile of knowledge they call RFC's. So you don't need to give me an technical explanation about it...
thanks for your time.
A student knows little about a lot.
A professor knows a lot about little.
I know everything about nothing.
|
|
|
|
|
Hi all,
Does anyone know the correct, or at least best, way to access a solutions' document object instance from a modal dialog? I thought creating an instance of the new dialog, then having an member function of that instance set a pointer within the instance to the document instance (from the view object instance using the GetDocument() function), but I wondered if there was a way to directly access a pointer from the dialog?
Any help would be much appreciated.
Thanks.
|
|
|
|
|
Modify the dialog's constructor to include a CDocument* parameter. Then construct the dialog like:
CMyDialog dlg(this);
dlg.DoModal(); This assumes the dialog is created in some document method. If the dialog is created in the view, you can use:
CMyDialog dlg(GetDocument());
dlg.DoModal();
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
How do you display a dialog box once the main window of a program has already loaded up. I put created a dialog box at the end of CMainFrame::OnCreate but the dialog box appeared before the window loaded.
Any help would be greatly appreciated.
Thanks
|
|
|
|
|
Put the dialog box launch code into the application's InitInstance routine. Call it after the execution of pFrame->ShowWindow(SW_SHOW) , and the dialog box will pop up right after then main window has been displayed.
-Antti Keskinen
----------------------------------------------
The definition of impossible is strictly dependant
on what we think is possible.
|
|
|
|
|
|
I have a program where we would like to have a large translucent window placed on top of the program's main windows. The problem is that this new window captures key presses and mouse events. Is there any way to set thing up so that any user interaction is send directly to the views underneath?
|
|
|
|
|
You need to forward the messages to the correct windows manually.
onwards and upwards...
|
|
|
|
|
|
I Googled the HTTRANSPARENT return value, and they mention another window style called WS_EX_NOACTIVATE, that looks like it may take care of the keyboard. I'll have to experiment to find out.
|
|
|
|
|
Hello,
I created a job for task scheduler but I didnt set the password, so the job will never be executed.
From I app I executed the job. The ciode is as follows:
code:--------------------------------------------------------------------------------
ITask *task;
hr = m_pITS->Activate( wjobname,
IID_ITask,
(IUnknown**) &task);
if ( FAILED ( hr ) )
return;
hr = task->Run();
if ( hr != S_OK ) {
MessageBox( m_Hwnd, "Could not execute job.", MAIN_APPNAME, MB_ICONERROR | MB_OK );
} else {
MessageBox( m_Hwnd, "Job executed successfully.", MAIN_APPNAME, MB_ICONINFORMATION | MB_OK );
}
task->Release();
--------------------------------------------------------------------------------
The problem is whether the job was executed or not (it is not executed coz I didnt give the user password) the function is always returning S_OK. So whatever may be the result I am getting the messagebox "job executed successfully".
Is it normal?
Karam
|
|
|
|
|
If you look in MSDN, you'll see:
"A return code of S_OK means that the request to run the work item has been made; it does not mean that the work item has started running. There may be a delay of a few seconds after Run returns before the work item actually starts running.
To determine whether the work item is running, call IScheduledWorkItem::GetStatus."
So, you're good checking that it was scheduled, you need to go further:
hr = task->Run();
if (SUCCEDED(hr))
{
HRESULT status;
BOOL started = FALSE;
while (TRUE)
{
::Sleep(250);
hr = task->GetStatus(&status);
if (FAILED(hr)) break;
if (SCHED_S_TASK_RUNNING == status)
{
started = TRUE;
break;
}
else if (SCHED_S_TASK_READY == status)
continue;
else
break;
}
if (started)
{
MessageBox(m_hWnd, "Job is running", ...);
}
else
{
MessageBox(m_hWnd, "Could not execute job", ...);
}
}
else
{
MessageBox(m_hWnd, "Could not start job", ...);
}
task->Release();
|
|
|
|
|
Thank you.
That is exactly what i require
If I face any problem I will come back.
|
|
|
|
|
Hi all,
Does anybody know why my drop down list won't drop down?
I've added items to it in the OnInitDialog overide (which calls the same CDialog function beforehand btw) and i can scroll through them using the keyboard. However, when I click the drop down button, the list doesn't appear - just a very small no. of horizontal lines appear below the text display window.
Can anybody help?
Thanks
Paul
|
|
|
|
|
I just had a brain-wave, and it worked.
The reason this was occuring was because when I created the control in the dialog editor, i only specified a control height which was that of the actual window for the combo box. I did not anticipate that windows would limit the actual drop down list to this space!!
It's silly things like this that hinder application development .. Live and learn i guess
|
|
|
|
|
Yup I experienced the same problem before..
weird huh...
|
|
|
|
|
Hi, please help mi with this problem. When compile my project it compiles all cpp files (not only changed one). When pressing F5 it wants to build it all and writes that obj files are not up to date or does not exist. This is happening over and over again even if i dont make any change to code. Do u have any suggestion why this is happening? - it happend accidentaly (i quess) after 3 months workings with the project ... Thanks
|
|
|
|
|
You could try loading up the workspace/solution, then doing a complete rebuild. Then close the workspace/solution, and close the IDE. Then restart, and reopen the IDE. This might fix the problem.
The actual problem persists in the project database. On a MS VC++ 6.0 platform, deleting the project database file might resolve the issue.
-Antti Keskinen
----------------------------------------------
The definition of impossible is strictly dependant
on what we think is possible.
|
|
|
|