|
Use _getcwd ()
// GETCWD.C FROM MSDN
#include <direct.h>
#include <stdlib.h>
#include <stdio.h>
void main( void )
{
char buffer[_MAX_PATH];
if( _getcwd( buffer, _MAX_PATH ) == NULL )
perror( "_getcwd error" );
else
printf( "%s\n", buffer );
}
It is Illogical to define an inventor by his invention
|
|
|
|
|
Why Word ignores the message WM_VSCROLL? Is there an alternative to this method for making Word scroll down its contents?
|
|
|
|
|
hi all,
can you please tell me how to include the source code given int his site can be used in my application;)
i would like to experiment
|
|
|
|
|
I'm not sure what you're asking. Copy the class you want to use into your project directory, add it to the project (projectg/add/files from memory), and use it.
Jonathon
|
|
|
|
|
I am having problems using the DirectSound API. The problem is that sometimes my program attaches itself to the soundbuffer and does not release it. This prevents any other device from accesing the buffer.
Does anyone know what I am doing wrong??
Also, is there an easier way to stream audio?? I have DIS packets containing sound data that I need to stream. Is there a way to use the ActiveX Windows multimedia component to stream audio data that is not coming fram a file??
Please help me if you have any ideas....
Daniel Selberg
|
|
|
|
|
Netmeisters,
I am having a great deal of difficulty doing something with VC++ which
should be very simple, and would appreciate your help. All I would
like to do is, create a static library and link an application to it
(as I said, it should be very simple...). The static library contains
C type functions, rather than C++ classes.
I create the library, we'll call it foo, by selecting New Project |
Win32 static library, and leaving the two options (MFC support and
precompiled headers) unchecked. Then I create two files, foo.h and
foo.c, in the library. The first just contains
void bar(void);
and the second
void bar() { }
This compiles OK, creating the file foo.lib. Now if I want to use
bar() in an application, I should just have to include foo.h and
specify a link to foo.lib. I do the latter by using Project | Add to
Project | Files, after which foo.lib shows up in the pane on the left
under Resources. When I compile the application, however, the include
file gets read (because there are no complaints about bar being
undefined), but the linker complains that bar is an unresolved symbol.
I have example code from a book showing how to do this, and the code
compiles just fine. Also, if I add my function bar() to the example
code, everything works as expected. If I declare bar() in my include
file, but define it in the example library, everything works fine. But
for some reason I can't define it in my own library; linking just
doesn't work.
There must be some straightforward way of making all this work, but
for the life of me I can't figure it out. This kind of thing is real
simple under Unix, don't know what is going wrong under Windows. Would
very much appreciate some assistance.
Thanks,
Matthew Fleming
------------------------------------------------------------------------------
Matthew G. Fleming, MD phone : 414.456.4072
Associate Professor fax : 414.456.6518
Department of Dermatology s-mail: Dept. of Dermatology
Medical College of Wisconsin Medical College of Wisconsin
MFRC Room 4061
e-mail: mgf@mcw.edu Milwaukee, WI 53226-4810
------------------------------------------------------------------------------
|
|
|
|
|
Generally speaking, the issue has to do with the "name mangling" a c++ compiler imposes. I beleive if you use:
extern "C" {
Func1();
Func2();
etc }
or
extern "C"
{
#include <my_c_header.h>
}
you should get better results.
MSDN has some info on this if you want more. I have not dealt with this since way back in my 16 bits days, but I think that is what you are probably running into.
|
|
|
|
|
I think you need to add your library in Project|Settings...|Link in category Input in the Object/Library modules field.
|
|
|
|
|
I want to use MS Agent control in my Dialog Base App.... and I don't know... your help is big.. please put it to my project...
Contact me by mail if you want to develop with me!!!!
nikado@pc.nu
/*
BETA
*/
|
|
|
|
|
>>your help is big.. please put it to my project...
I wish my wife would say things like this to me.....
Jonathon
|
|
|
|
|
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msagent/hh/msagent/pacontrol_6lyk.asp
The above URL should be a good starting point.
Michael
|
|
|
|
|
How will I put buttons and may be drop-down menus into a tab..... HOW!!!
/*
BETA
*/
|
|
|
|
|
I am again with the question refered before as COleDateTime.
I am using classes derived from CRecordSet to do ODBC connectivity. I want to pass null values to the database. The wizard have created variables for every table field. How do I pass null values to the DB especially DateTime.
This is urgent.. please.
|
|
|
|
|
Call CRecordSet::SetFieldNull. Pass field variable address as first param and TRUE as second.
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
|
I know this is more than likley a dumb question but... I have seen some dialog boxes where right below the menu they have drawn a simple straight line to devide the menu from the dialog box.. how do they draw a straight line?
Thanks,
Rob
|
|
|
|
|
Use a group box with no caption and make the height of the box smallest size.
cheers
Alfadhly
|
|
|
|
|
There are no dumb questions, only dumb people!
|
|
|
|
|
how can I send to a MFC called "A" information of a "mthing" to another MFC called "B"???
For example, I want to transmit to "A" a name stocked in "B" when I pushed a button "OK"
thanks...
|
|
|
|
|
whats an MFC?
an MFC window? an MFC program? an MFC Dll? an MFC Class?
if you want to transfer data between applications you can use any of the various IPC methods. The simplest way is to send a WM_COPYDATA message.
|
|
|
|
|
hi!!!
thanks to answer to my question!!!
I want to send parameters from a dialog Box "A" to a Dialog Box "B"....
|
|
|
|
|
You can create a new member variable for your CbDlg dialog box(example type CbDlg name m_dBdlg)in CaDlg class then use the class wizzard assign member variables to your drop down boxes, edit boxes etc.. now within dialog box "a" you can for example use m_dBdlg.m_editbox() etc..
Hope this helped. Not sure if im being very clear.
Rob
|
|
|
|
|
thanks!!!!
Link you later!!!
|
|
|
|
|
Anybody heard about CListCtrl... there is a member function called SetItemData(int,dword). I use this function when i retrieve data from an ado cursor
while (!RecSet->EndOfFile())
{
//here insert data from recset into CListCtrl
SetItemData(nItem,anyvalue);
RecSet->MoveNext()
}
Now the interesting part: Probably nobody believes me!(
After two loops no problem...In the third loop my application die.
Then i modified the code like this:
while (!RecSet->EndOfFile())
{
//here insert data from recset into CListCtrl
SetItemData(nItem,anyvalue);
for (int i=0;i<100.000;i++);
RecSet->MoveNext()
}
Error again...
Then I tried this:
while (!RecSet->EndOfFile())
{
//here insert data from recset into CListCtrl
SetItemData(nItem,anyvalue);
for (int i=0;i<1.000.000;i++);
RecSet->MoveNext()
}
NO PROBLEM AT ALL...
My question is WHY? WHY? WHY?
|
|
|
|
|
I think the problem is that the application need time to SendMessage to ListCtrl...
When you did the for from 0 to 1.000.000 the SendMessage had the necesary time. I belive that this is the problem.
Please try this:
while(!RecSet->EndOfFile())
{
//here insert data from recset into CListCtrl
SetItemData(nItem,anyvalue);
ProcessMessages();
RecSet->MoveNext();
}
void ProcessMessages()
{
MSG msg;
if(PeekMessage( &msg, NULL, 0, 0, PM_REMOVE ) )
{
TranslateMessage( &msg );
DispatchMessage( &msg );
}
}
Cheers!!!
Carlos Antollini.
|
|
|
|