|
More or less, look the exact syntax up in a book like I would.
As for your second question, what I've done is something like:
struct Data {
BYTE FirstFive:5;
BYTE LastThree:3;
}
Data In;
readByte(&In);
useFiveBits(In.FirstFive);
useThreeBits(In.LastThree);
or something like that.
|
|
|
|
|
i want to call/make incoming connection dialog with mfc vis.c++
i can call connection wizard using ras api, but there's no choice
for make an incoming connection.
i use incoming connection for accept a call from ras client.
i want to set incoming connection programmatically like we set ras api.
so, can anybody help me?
by the way thanks for any help for this problem........
|
|
|
|
|
hi all
how can i send a voice file(playing )to another computer over network with visual c++ ?
like voice chat . but this is a voice file . i want to play it and send it to another computer
|
|
|
|
|
you could use directplay or you just code your own audio streaming library... it is not difficult!
Don't try it, just do it!
|
|
|
|
|
Hi Everyone,
This might be sound very obvious to many of you, but being very inexperienced, and working on a short deadline, I really need to get some help. If someone can direct me on this issue, I would really appreciate it.
I have a very simple C++ programming where 20 files are given in one directory. I am to
1) Open all the files up, 2) loop through all the lines in each file 3) identify a specific word that was entered by the user. 4) Output the file name and the line that contains the word.
The output of the program would look like this.
Search word : Lisa How
Here are the results:
File A : Lisa How is nice
FileB : here is lisa how
File C: where is lisa how
.....
File 100 : I am lisa ...
... and so on.
The logic seems to be simple, but I am every inexperienced with this kind of work. I have started some code, but nothing too far
Please let me know
Thx!!!
Ps, I hope I have explained the issue clearly.
THX!!!
|
|
|
|
|
Does anyone know some docs or good exemples about VMR9?
The point is to get a pointer to the overlay surface and to save the current image to be displayed.
In fact I need to make a screenshot (so making a capture outside the application).
Could I have an indication about how to do this?...
|
|
|
|
|
Hello,
I need to insert Icons and text på a listbox byt it need to be icons that are 16*16 not 32*32. Is there anyone that can help me please.
|
|
|
|
|
how can i RELIABLY backup and restore the registry
through my program
it should work on NT and 9X
thanks
|
|
|
|
|
RegSaveKeyEx and RegRestoreKey , I think.
Stability. What an interesting concept. -- Chris Maunder
|
|
|
|
|
ppl tell me RegRestoreKey is not available on win9X
|
|
|
|
|
Those people are correct. On Windows 9x, the registry consists of the system.dat and user.dat files, which are located in the Windows folder. Read MSDN article Q132332 for more.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Does anyone know a quick, easy and free way to get a list of all the exports from a DLL?
Joel Holdsworth
|
|
|
|
|
I assume in your instance Depends.exe is out of the question!?
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fruity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Williams (Little Britain)
|
|
|
|
|
dumpbin /exports
Stability. What an interesting concept. -- Chris Maunder
|
|
|
|
|
Hi All,
I am working with a custom titlebar. I want to get the current size of the close button and set the value for the button which i am drawing. The problem is, if i put the left point in a CRect as
pCapRect->left = rcWindow.Width()-(sizeButton.cx);
and draw the close button using
pDc->DrawFrameControl(pCapRect, DFC_CAPTION, DFCS_CAPTIONCLOSE); // For Close
the left position (also the size) is not getting aligned with the default close button(which shows up), when i change from one skin to another.
Awaiting your reply
|
|
|
|
|
I need to print an enhanced metafile of size 26MB. It is containing a bitmap that is rotated while printing. The bitmap is 25MB in size.
If the emf is generated with bitmap rotation, the printer hangs while printing.
If the rotation is removed, the printing operation works fine.
Please help me if you find any solution to the printer hanging problem.
Thanks
Rupesh
|
|
|
|
|
Hi,
One of services is crashing randomly. The service is developed in VC++.
I got only the user dump file along with Dr. watson log. I am using windbg
tool to find out the location of the crash. Can anybody suggest me, how to
find out the exact location of the crash.
Thanks
|
|
|
|
|
This may not work on your existing program, but I found this article extremely useful and might be of interest to you for future releases.
Finding crash information using map file[^]
I Dream of Absolute Zero
|
|
|
|
|
(
Hi All,
I wanna to create mdi application with many childs form,they can enable move,resize,minimize within MDI form and when application starts
child forms are appear with mdi form like Phtoshop application.
Please explain me with demo application.I am waiting for your support.
Thanks
|
|
|
|
|
Select New from the File menu. Click the Projects tab. Select MFC AppWizard (exe) from the list. Give the project a name. Click the OK button. There you will see the option for SDI, MDI, or dialog application.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Hello Friends,
Can anybody give me the link about the FlexGrid in VC++ tutorial. I don't know anything about FlexGrid and how can I use it? A tutorial explaning its usage and methodology also. Please its very important for me as I have to use one in my projects.
Thank you
Bye
Neelesh K J Jain.
|
|
|
|
|
HI,
I've to set values in combo of 1 dialog box.
Then i've to call that value in the function in another class.
The function is defined in another class.
Dialogbox//
void settings::OnOK()
{
CString strTemp;
UpdateData();
nreturn=((CComboBox*)GetDlgItem(baudrate))->SetCurSel(m_dcb.BaudRate);
n2return=((CComboBox*)GetDlgItem(paritybits))->SetCurSel(m_dcb.Parity);
n3return=((CComboBox*)GetDlgItem(stopbits))->SetCurSel(m_dcb.StopBits);
strTemp.Format("%d", m_dcb.ByteSize);
n1return=((CComboBox*)GetDlgItem(databits))->SelectString(0,strTemp);
UpdateData(FALSE);
CDialog::OnOK();
}
class// fn definition:
BOOL serial::ConfigurePort(int BaudRate, int ByteSize,int fParity, int Parity, int StopBits)
{
if((m_bportready=GetCommState(m_hcom,&m_dcb))==0)
{
MessageBox("GetCommState error","Error",MB_OK+MB_ICONERROR);
CloseHandle(m_hcom);
return false;
}
m_dcb.ByteSize=ByteSize;
m_dcb.Parity=Parity;
m_dcb.StopBits=StopBits;
m_dcb.fBinary=TRUE;
m_dcb.fDsrSensitivity=false;
m_dcb.fParity=fParity;
m_dcb.fOutX=false;
m_dcb.fInX=false;
m_dcb.fNull=false;
m_dcb.fAbortOnError=TRUE;
m_dcb.fOutxCtsFlow=FALSE;
m_dcb.fOutxDsrFlow=false;
m_dcb.fDtrControl=DTR_CONTROL_DISABLE;
m_dcb.fDsrSensitivity=false;
m_dcb.fRtsControl=RTS_CONTROL_DISABLE;
m_dcb.fOutxCtsFlow=false;
m_dcb.fOutxCtsFlow=false;
m_bportready = SetCommState(m_hcom,&m_dcb);
if(m_bportready ==0)
{
MessageBox("SetCommState Error","Error",MB_OK+MB_ICONERROR);
CloseHandle(m_hcom);
return false;
}
return true;
}
In main class// this fn is called as
void CComDlg::Onreceive()
{
//if(!(port.ConfigurePort(115200,8,0,NOPARITY,ONESTOPBIT)))
if(!(port.ConfigurePort(comb.nreturn,comb.n1return,0,comb.n2return,comb.n3return)))
// if(!(port.ConfigurePort(comb.m_baudrate,comb.m_databits,0,comb.m_paritybits,comb.m_stopbits)))
{
MessageBox("Cannot Configure Communication Port","Error",MB_OK+MB_ICONERROR);
port.ClosePort();
}
My Question is in void CComDlg::Onreceive() ,
while using first if condition, it executes well.
But while using 2nd or 3rd if condn,
It gives " Set Comm state Error" and "Cannot Configure COmmn Port".
What's the problem there?
mithila
|
|
|
|
|
Check whether the combo items are properly populated.
Get the CComboBox item of the parent by using GetParent() function, fill the combo by the value from the popup dialog say in ur case settings.
|
|
|
|
|
anuchelvi wrote:
//if(!(port.ConfigurePort(115200,8,0,NOPARITY,ONESTOPBIT)))
if(!(port.ConfigurePort(comb.nreturn,comb.n1return,0,comb.n2return,comb.n3return)))
At this point, what are the values of comb.nreturn , comb.n1return , comb.n2return , and comb.n3return ? If they are not the same as those used by the call to ConfigurePort() that uses hard-coded values, it shouldn't surprise you that the results would be different.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Ok...I solved my previous questions.
This question deals with a deleteItem function that is to delete an item from an array. And I am passing a sorted array, its size, and the target element...this is what I have so far...
<br />
<br />
<br />
<br />
<br />
#include <iostream><br />
#include <string><br />
using namespace std;<br />
<br />
template<typename T><br />
void sortArray(T arr[], int size);<br />
<br />
template<typename T><br />
void searchArray(T arr[], int size, T target);<br />
<br />
template <typename T><br />
void deleteItem(T arr[], int &size, T target);<br />
<br />
template<typename T><br />
void printArray(T arr[], int size);<br />
<br />
int main()<br />
{<br />
<br />
int size;<br />
int target;<br />
int arr[10] = {9,8,7,6,5,1,2,3,0,4};<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
system ("pause");<br />
}<br />
<br />
template<typename T><br />
void sortArray(T arr[], int size)<br />
{<br />
int smallest;<br />
T temp;<br />
for(int i=0; i<size-1; i++)<br />
{<br />
smallest = i;<br />
<br />
for(int j =i+1; j<size; j++)<br />
{<br />
if(arr[j] < arr[j-1])<br />
smallest = j;<br />
}<br />
<br />
temp = arr[j];<br />
arr[j] = arr[j-1];<br />
arr[j-1] = temp;<br />
}<br />
<br />
}<br />
<br />
<br />
<br />
template<typename T><br />
void searchArray(T arr[], int size, T target)<br />
{ <br />
int size;<br />
int low = 0;<br />
int high = size -1;<br />
int mid = (low + high)/2;<br />
int target;<br />
<br />
bool found = flase;<br />
do<br />
{<br />
if(target == arr[mid])<br />
found = true;<br />
<br />
else if(target < arry[mid])<br />
high = mid-1;
<br />
else <br />
low = mid +1;<br />
<br />
if(!found)<br />
{<br />
mid = (low + high)/2;<br />
}<br />
<br />
}while (high >= low && !found)<br />
<br />
<br />
<br />
}<br />
<br />
<br />
template <typename T><br />
void deleteItem(T arr[], int &size, T target)
{<br />
<br />
<br />
<br />
}<br />
<br />
<br />
<br />
template<typename T><br />
void printArray(T arr[], int size)<br />
{<br />
for(int i=0; i<size; i++)<br />
{<br />
cout << arr[i] << " ";<br />
}<br />
}<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
Can anybody help me with the delete item method...I'M SO LOST!!!!!
THANK YOU FOR YOUR TIME!
Jason
|
|
|
|
|