|
an activeX control acess the oracle by ODBC interface,such as a windows application.coun't it realize? if can ,tell me how to do,Thanks a lot !!
|
|
|
|
|
|
How can, to you too.
I Dream of Absolute Zero
|
|
|
|
|
Hi,,,
|
|
|
|
|
what do u want buddy
-----------------------------
"I Think It Will Help"
-----------------------------
Alok Gupta
visit me at http://www.thisisalok.tk
|
|
|
|
|
First. I appreciate that you spend your time to read my question.
I have question about how to define an object array at private area.
For example: I have a class which is call base_class; I want to create a new class which is called
new_class; But I want to define base_class[50] in my new class. Could someone help me?
The following code is what I define in my new class;
class new_class
{
public:
// define some public function here.
private:
base_class datause[50];
};
I got wrong message when I create new_class object in my main program.
|
|
|
|
|
What error message did you get ?
Can you be a little bit more precise...
|
|
|
|
|
did you #include the declaration of base_class before declaring new_class
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
Hi all,
Now I have image items in thumbnail view in CListCtrl(it looks like Explorer), and I want to implement drag and drop image items in the control. Could you tell me the way?
Thank you!
phucfbk@yahoo.com
|
|
|
|
|
|
Hai Frens
My application is a form based application and has an combo box disabled at the initial state. . .I need to enable that combo on clicking a menu item.
Can any one suggest me how to do that ?
I need another suggestion for selecting multiple rows in flexgrid by pressing Ctrl key.
Thanx
|
|
|
|
|
I want my SDI application to have always the same size and position on screen.
Resizing and Moving is disabled by the code below; which is inserted in OnCreate of main frame
CMenu* pTopMenu = GetSystemMenu(FALSE);
if(pTopMenu != NULL)
{
pTopMenu -> RemoveMenu(SC_SIZE, MF_BYCOMMAND); //No ReSize
pTopMenu -> RemoveMenu(SC_MOVE, MF_BYCOMMAND); //No Move
}
for Resize and move above code works fine!
BUT for size let us look at PreCreatewindow of Mainframe
BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
{
if( !CFrameWnd::PreCreateWindow(cs) )
return FALSE;
// TODO: Modify the Window class or styles here by modifying
// the CREATESTRUCT cs
cs.style &= ~FWS_ADDTOTITLE;
cs.x = 0;
cs.y = 77;
cs.cx = 1000;
cs.cy = 500;
return TRUE;
}
the above code didn't work; if i change one value in the structure the other is automatically changed/ignored, gives unexpected positioning. May be some sort of aspect ratio problem which windows might be maintaining internally.
Another soloution is to use Move in the initinstance but i want to avoid it since it first shows main frame at the 0,0 position and then moves it to required postion, with a slight but observable delay.
Please help to solve the above problem.
|
|
|
|
|
How to retrieve the list of public folders in an exchange server using ADSI programming(vc++).Please give the code.
|
|
|
|
|
hi all,
I have created a DialogBase Application using MFC ,Visual C++..
Now I want to create Web Interface to my Application..How am I going to do that ?..
If any one know that please reply me..
Thanks in advance..
|
|
|
|
|
If it's a dialog application just use the ActiveX web browser control.
How do I print my voice mail?
|
|
|
|
|
Your question is a little confused.
Are you wanting to create a web interface that runs on a web-server and users access via a browser? Or do you want to emulate the web-look and feel like Microsoft Money attempts to.
If you want to run your app off a web-server, then you'll need to look into one of the web technologies such as ASP.NET or PHP or ASP.
Michael
CP Blog [^]
|
|
|
|
|
Does anyone know if it is possible to cast a GDIPlus *Image to a GDIPlus Bitmap? I can't seem to figure this one out.
Forever Developing
|
|
|
|
|
i have serial class library.
i use read data function.
this is following.
//Serial.cpp
////////////////////////
int CSerial::ReadData( void *buffer, int limit )
{
if( !m_bOpened || m_hIDComDev == NULL ) return( 0 );
BOOL bReadStatus;
DWORD dwBytesRead, dwErrorFlags;
COMSTAT ComStat;
ClearCommError( m_hIDComDev, &dwErrorFlags, &ComStat );
if( !ComStat.cbInQue ) return( 0 );
dwBytesRead = (DWORD) ComStat.cbInQue;
if( limit < (int) dwBytesRead ) dwBytesRead = (DWORD) limit;
bReadStatus = ReadFile( m_hIDComDev, buffer, dwBytesRead, &dwBytesRead, &m_OverlappedRead );
if( !bReadStatus )
{
if( GetLastError() == ERROR_IO_PENDING )
{
WaitForSingleObject( m_OverlappedRead.hEvent, 2000 );
return( (int) dwBytesRead );
}
return( 0 );
}
return( (int) dwBytesRead );
}
//testdlg.cpp
////////////////////////////
char lpBuffer[500];
int nBytesRead = serial.ReadData(lpBuffer, 500);
m_receivebyte=nBytesRead;
CString m_strreceive;
m_strreceive.Format("%d",nBytesRead);
if (m_receivebyte!=0)
{
AfxMessageBox("Receive Data "+m_strreceive);
}
/////////////////////////////
i want to know how to get string data from comport.
(for example - please enter string)
now,i receive only int data
(for example - 123)
please answer my application problems..
|
|
|
|
|
How about showing your string, lpBuffer, instead of the character size of lpBuffer?
char lpBuffer[500];
int nBytesRead = serial.ReadData(lpBuffer, 500);
m_receivebyte=nBytesRead;
CString m_strreceive;
<code>
</code>
if (m_receivebyte!=0)
{
<code>
lpBuffer[m_receivebyte] = '\0';
m_strreceive = lpBuffer;
</code>
AfxMessageBox("Receive Data "+m_strreceive);
}
"After all it's just text at the end of the day. - Colin Davies
"For example, when a VB programmer comes to my house, they may say 'does your pool need cleaning, sir ?' " - Christian Graus
|
|
|
|
|
Initializing an Array in a managed class viru_lent 19:47 1 Nov '04
Greetings everyone. I'm just playing around with a very basic class, which I have probably really screwed up, but am looking to create an array of the classes. This is just a module for me to learn how to play with some of these tricks. What is happening, is the variables all get passed, and stored, but my output is only the last inputted infomation, not what should be the prior stored information in the array. I believe it has something to do with using the pointers on the strings, but I haven't figured out anything else to do with them yet. I'm still teaching myself all this fun stuff, so bear with the easy questions.
/*
I'm trying to create my own class to store information about a person
in this example, an employee. This is just a test run to be able to
create a class, instantiate an aray of objects based on that class,
and update them as we need to input the record. This is just the first block of a larger scope program.
*/
#using "mscorlib.dll" //ignore the quotes, had to alter to use HTML here
using namespace System;
__gc class NameStorage
{
public:
String* GetName()
{
fullName = String::Copy(String::Concat(lastName,", ", firstName));
return fullName;
}
String* GetCompany()
{
return company;
}
double GetSalary()
{
return salary;
}
void SetFirstName(String* input)
{
firstName = String::Copy(input);
}
void SetLastName(String* input)
{
lastName = String::Copy(input);
}
void SetCompany(String* input)
{
company = String::Copy(input);
}
void SetSalary(double input)
{
salary = input;
}
private:
String *firstName, *lastName, *company, *fullName = "";
double salary = 0;
};
void main()
{
NameStorage *names[] = new NameStorage*[3];
for(int i = 0; i < 3; i++)
{
// Error is coming in that the individual elements of the array are not
// being updated independently.
Console::Write("First Name: ");
names[i]->SetFirstName(Console::ReadLine());
Console::Write("Last Name: ");
names[i]->SetLastName(Console::ReadLine());
Console::Write("Salary: ");
names[i]->SetSalary(Convert::ToDouble(Console::ReadLine()));
Console::WriteLine(names[0]->GetName());
Console::WriteLine(Convert::ToDouble(names[0]->GetSalary()));
Console::WriteLine(names[1]->GetName());
Console::WriteLine(Convert::ToDouble(names[1]->GetSalary()));
Console::WriteLine(names[2]->GetName());
Console::WriteLine(Convert::ToDouble(names[2]->GetSalary()));
}
return;
}
This is an edited version of the code, I think I am missing my initialization of the array elements, but with them, i was getting the same results. Again, thank you for any insight to this, my proffessor is an old FORTRAN COBOL programmer who has never seen any of this stuff, and is no help at all
Virulent
Aspiring Programming Master of All Languages
Still has All Languages to go
|
|
|
|
|
in your code
void main()<br />
{<br />
NameStorage *names[] = new NameStorage*[3];<br />
you create here an array of pointers not an array of objects
use
void main()<br />
{<br />
NameStorage *names = new NameStorage[3];<br />
and in stead of calling further in your main func
names[i]->Setblabla()
use
names[i].Setblabla()
also you should put your writeline commands outside the for-loop.
Greetings,
Davy
|
|
|
|
|
Thanks Davy. I think I've tried this... Now I'm getting a compile error. I'm using Visual Studio .net 2003 by the way.
/*
I'm trying to create my own class to store information about a person
in this example, an employee. This is just a test run to be able to
create a class, instantiate an aray of objects based on that class,
and update them as we need to input the record. This is just the first block of
a larger scope program.
*/
#using mscorlib.dll
using namespace System;
__gc class NameStorage //Starting the class definitions
{
public:
String* GetName() //GetName method to return a constructed name from inputed data
{
fullName = String::Copy(String::Concat(lastName,", ", firstName)); // Builds the full name string
return fullName; // using .Net String class methods
}
String* GetCompany()
{
return company; // Self explanatory
}
double GetSalary()
{
return salary; // Self explanatory
}
void SetFirstName(String* input)
{
firstName = String::Copy(input); // Following code inputs the data inputed
}
void SetLastName(String* input)
{
lastName = String::Copy(input);
}
void SetCompany(String* input)
{
company = String::Copy(input);
}
void SetSalary(double input)
{
salary = input;
}
private:
static String *firstName, *lastName, *company, *fullName = ""; // Variable inits.
static double salary = 0;
};
void main()
{
NameStorage *names[] = new NameStorage[3];
for(int i = 0; i < 3; i++) //Meat of the program, asks for input and assigns it to the objects.
{ // Error is coming in that the individual elements of the array are not
// being updated independently.
Console::Write("First Name: ");
names[i].SetFirstName(Console::ReadLine());
Console::Write("Last Name: ");
names[i].SetLastName(Console::ReadLine());
Console::Write("Salary: ");
names[i].SetSalary(Convert::ToDouble(Console::ReadLine()));
Console::WriteLine(names[0].GetName()); //Displays the contents of each array element for troubleshooting.
Console::WriteLine(Convert::ToDouble(names[0].GetSalary()));
Console::WriteLine(names[1].GetName());
Console::WriteLine(Convert::ToDouble(names[1].GetSalary()));
Console::WriteLine(names[2].GetName());
Console::WriteLine(Convert::ToDouble(names[2].GetSalary()));
}
return;
}
Now I'm getting the following errors:
StringSorter.cpp
StringSorter.cpp(62) : error C2691: 'NameStorage' : invalid type for __gc array element
StringSorter.cpp(62) : error C3149: 'NameStorage' : illegal use of managed type 'NameStorage'; did you forget a '*'?
StringSorter.cpp(62) : error C2691: 'NameStorage __gc *' : invalid type for __gc array element
StringSorter.cpp(68) : error C2228: left of '.SetFirstName' must have class/struct/union type
type is 'NameStorage __gc *'
did you intend to use '->' instead?
Last Error repeats for each reference back to the class.
|
|
|
|
|
is there a way to create them programmatically?
|
|
|
|
|
My guess is that you are wanting to create an alogrithm that creates a wav file. This will be MUCH harder than making a standard recording due to the number patterns you will need to make in order to get the sound you want. In fact this would be a guessing game that may never produce the intended results. But to answer your question you will first need to create a program that creates the correct file structure. Here is a link to a place that describes this:
http://www.daubnet.com/formats/RIFF.html
Wav files are just a form of riff files (which were originally called iff files and were made by electronics arts for video games). For the ID section you will want to put "wav " and the data will consist of pairs of signed bytes. The byte pairs correspond to the push and pull that the speaker magnet will produce when the file is played.
Good luck
|
|
|
|
|
What is the best way to get the size of a block of code? I thought maybe I could treat labels as pointers sticking one at the beggining and on at the end, but my compiler won't let me do it that way. Any other ideas? I think it might take some ASM code to accomplish, but I barely know any. So if anyone happens to know the best approach...
|
|
|
|