|
Hi,
i would try to take the way of the voice recognise applications
so, can i see your proj. code?
Please, help me...may be i'll help you...
10x's so much for your attention.
JD
|
|
|
|
|
Hi,
people does any one of you have any idea about DYNAMIC_DOWNCAST...plz help
|
|
|
|
|
satadru wrote:
does any one of you have any idea about DYNAMIC_DOWNCAST?
Yes:
Outdated. Homegrown. Microsoft proprietary. Replaced by Standard-C++ dynamic_cast .
Who is 'General Failure'? And why is he reading my harddisk?!?
|
|
|
|
|
Could u tell anything about making matrix or non-matrix characters
vectorizable???
Thank u, any way!!!
Hello World!
|
|
|
|
|
Is there any way to set long type for sping box max and min value.
Right now I am using the spinbox. when i set spin box 10000000 for
max value and 1 for min value as i click up arrow, the value in edit bx
come down and vice versa for down arrow. I have to find a way to set
larger range for this spinbox
any help is appreciated
Shin
|
|
|
|
|
you can use the function SetRange32 to increase the range of your spin control.
kindly deselect "No thousands" check box in the spin control properties dialog.
CSpinButtonCtrl *pCtrl = (CSpinButtonCtrl *)GetDlgItem(IDC_SPIN);
pCtrl->SetRange32(lower limit,upper limit);
never say die
|
|
|
|
|
hi,
i have created the extension class ,but i am using this extension dll in an ocx control. though i export the whole class using AFX_EXT_CLASS and use it in my ocx, my ocx is not able to initialize in ActiveX test container. when i also export my functions ina .DEF file it initialize. I dont understant when it is already exported using AFX_EXT_CLASS why should i again export in a .DEF file.
implicit loading of the DLL has a problem, as extension
dll cannot be used in ocx as far as i know. so i have to
load it dynamically.
thanx for the help
Madhav
Desabhotlas
|
|
|
|
|
Hi guys,
I have a dialog with serveral CButtons. I notice I can go through (highlight) the button by pressing UP/DOWN/LEFT/RIGHT arrow key, however, it is not in the order I want. I am wondering if there is a quick way to change the "browse order" without manually doing it using WM_KEYDOWN. Has it got something to do with Resource.h ?
Also, in the dialog based application, Does hitting the Return(Enter) key always call the OnOK()? In my app (where there are child dialogs), sometimes it calls OnOK() of the parent dialog but sometimes it would launch OnBnClicked() of default button on the parent window. Is there a way I can insure to alawys call the OnOK()?
Please help,
Thanks alot.
|
|
|
|
|
you can choose tab order from the layou menu, to order the flow of control.
the button which you wish to get pressed on pressing enter key, set the button as default in its properties.
never say die
|
|
|
|
|
Hi,
I wrote a C++ program using Standard template library in linux 9.0.I used the same program in VC++.But it is giving errors.What should I do the get rid of these errors.
Karteek
|
|
|
|
|
karteek wrote:
But it is giving errors.What should I do the get rid of these errors.
First, tell us what they are.
Second, tell us what version (VC6, VC7, VC2003) you are using.
Then we might be able to help you. In this forum, there is a lot of knowledge assembled.
Who is 'General Failure'? And why is he reading my harddisk?!?
|
|
|
|
|
Hi,
It is giving a lot of errors and warnings. It is giving errors in functional header. I am using VC6
Karteek
|
|
|
|
|
karteek wrote:
It is giving errors in functional header
In <functional>? Probably not.
This might be where the compiler gives up, but the error is in your code. DoO you have an example of your code that gives an error?
Who is 'General Failure'? And why is he reading my harddisk?!?
|
|
|
|
|
hi there..
Thanks for the time firstly..
I wanted to know how can u add a shared menu to your active x control..also do we need to attach a verb to be able to use Shared Menus?
kind regards
safee
|
|
|
|
|
How do I change the value at certain positions in
a TCHAR*?
If I do..
TCHAR* pStr = _T("Bo Hunter");
pStr[pos] = _T('O');
it breaks with access violation.
If I do..
TCHAR szStr[MAX_SIZE] = {0};
lstrcpy(szStr, _T("Bo Hunter"));
szStr[pos] = _T('O');
it works.
Thank You
Bo Hunter
|
|
|
|
|
pStr[pos] = _T('O');
shouldnt it be
*pStr[pos] = _T('O');
or
*(pStr + pos) = _T('O');
My God is more powerfull Than Your God. (the line that divides the world)
|
|
|
|
|
I tried all of that before.
// Illegal indirection
*pStr[pos] = _T('O');
// Access violation writing location 0x0049924d.
*(pStr + pos) = _T('O');
I am within the bounds of the string for sure.
pStr starts at 0x0049924c
I thought for sure that
*(pStr + pos) = 'O';
was wright.
Thank You
Bo Hunter
|
|
|
|
|
Bo Hunter wrote:
TCHAR* pStr = _T("Bo Hunter");
Now pStr holds the adress of the constant string somwhere in the code. This memory is not writable. You need to copy the string to a writable location, either on the stack (as you did in your second example), or on the heap (by allocating memory using new ).
Who is 'General Failure'? And why is he reading my harddisk?!?
|
|
|
|
|
hi!
i'm trying to get the number of jobs that in queue of a shared printer.
i used the code that shows in the MSDN:
<br />
BOOL GetJobs(HANDLE hPrinter, JOB_INFO_2 **ppJobInfo, <br />
int *pcJobs, DWORD *pStatus) <br />
{ <br />
DWORD cByteNeeded,<br />
nReturned,<br />
cByteUsed;<br />
<br />
JOB_INFO_2 *pJobStorage = NULL;<br />
PRINTER_INFO_2 *pPrinterInfo = NULL; <br />
<br />
if (!GetPrinter(hPrinter, 2, NULL, 0, &cByteNeeded))<br />
{<br />
if (GetLastError() != ERROR_INSUFFICIENT_BUFFER)<br />
return FALSE;<br />
} <br />
pPrinterInfo = (PRINTER_INFO_2 *)malloc(cByteNeeded);<br />
if (!(pPrinterInfo))<br />
<br />
return FALSE; <br />
if (!GetPrinter(hPrinter,2,(LPBYTE)pPrinterInfo,cByte<br />
Needed,&cByteUsed))<br />
{<br />
<br />
free(pPrinterInfo);<br />
pPrinterInfo = NULL;<br />
return FALSE;<br />
} <br />
TRACE("NUM OF PRINT JOBS: %d\n",pPrinterInfo->cJobs);<br />
if (!EnumJobs(hPrinter,0,pPrinterInfo->cJobs,2,NULL,0,(LPDWORD)&cByteNeeded,(LPDWORD)&nReturned))<br />
{<br />
if (GetLastError() != ERROR_INSUFFICIENT_BUFFER)<br />
{<br />
free(pPrinterInfo);<br />
pPrinterInfo = NULL;<br />
return FALSE;<br />
}<br />
}<br />
pJobStorage = (JOB_INFO_2 *)malloc(cByteNeeded);<br />
if (!pJobStorage)<br />
{<br />
<br />
free(pPrinterInfo);<br />
pPrinterInfo = NULL;<br />
return FALSE;<br />
}<br />
ZeroMemory(pJobStorage, cByteNeeded); <br />
if (!EnumJobs(hPrinter,0,pPrinterInfo->cJobs,2,(LPBYTE)pJobStorage,cByteNeeded,(LPDWORD)&cByteUsed,(LPDWORD)&nReturned))<br />
{<br />
free(pPrinterInfo);<br />
free(pJobStorage);<br />
pJobStorage = NULL;<br />
pPrinterInfo = NULL;<br />
return FALSE;<br />
} <br />
*pcJobs = nReturned;<br />
*pStatus = pPrinterInfo->Status;<br />
*ppJobInfo = pJobStorage;<br />
free(pPrinterInfo);<br />
return TRUE; <br />
}<br />
This code returns the number of jobs, and a pointer to JOB_INFO_2 struct.
i'm using this code to clear the queue list of the printer:
<br />
JOB_INFO_2* jobs;<br />
int noj;<br />
DWORD status;<br />
BOOL err=false;<br />
if (err=GetJobs(hPrinter, &jobs, &noj, &status))<br />
{<br />
for (int j=0;j<(int)noj;j++)<br />
{<br />
SetJob(hPrinter, jobs[j].JobId, 0, NULL, JOB_CONTROL_DELETE);<br />
}<br />
free(jobs);<br />
}<br />
but if this printer is a shared printer (from another computer), some times i get num of jobs = 0, and some times the correct one.
most of the times, if i'm F11ing (stepping into) the GetJobs function it works, but if i just do F10 it returns num of jobs = 0. i tried to move the little yellow arrow (in VC++ .net) to the command and do it again, and after 2-3 times it return the correct num of jobs...
Is it a RPC error?
What can i do?!
thanks,
InfraRed
|
|
|
|
|
Hi,
I have a list box in my dialog.When I click a button called delete in my dialog box it should delete the selected item in the list box.How do I do this?
Karteek
|
|
|
|
|
CListCtrl* pListCtrl = (CListCtrl*) GetDlgItem(IDC_YOURLISTCONTROL);
ASSERT(pListCtrl != NULL);
POSITION pos = pList->GetFirstSelectedItemPosition();
if (pos == NULL)
TRACE0("No items were selected!\n");
else
{
while (pos)
{
int nItem = pList->GetNextSelectedItem(pos);
TRACE1("Item %d was selected!\n", nItem);
// you could do your own processing on nItem here
}
}
My God is more powerfull Than Your God. (the line that divides the world)
|
|
|
|
|
Hi,
I tried this.But I am getting the nItem value as 0 always though I am selecting items at different postions in the list.
Karteek
|
|
|
|
|
Another method is to iterate throught each item in the list and check wheather it is selected or not.
My God is more powerfull Than Your God. (the line that divides the world)
|
|
|
|
|
If you are using MFC:
int nIndex = listbox.GetCurSel();
listbox.DeleteString(nIndex);
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
Hi guys
I have a problem similar to this>
There is class A which is derived from CDialog.
I have no. of other classes which are derived from class A for creating dialog boxes.
I need to handle keyboard events in my dialog boxes.
If I add ON_WM_SYSCOMMAND()message and following functions in class A
void A::DoDataExchange(CDataExchange* pDX)
{
A::DoDataExchange(pDX);
}
and then handle keyboard events in
BOOL A::PreTranslateMessage(MSG* pMsg)
{
QB_ASSERT( pMsg, return FALSE;);
if (pMsg->message == WM_KEYDOWN)
{
if (pMsg->wParam == VK_F1 || pMsg->wParam == VK_ESCAPE)
{
//I will handle my keyboard event here
}
}
return CDialog::PreTranslateMessage(pMsg);
} //A::PreTranslateMessage
Will i be able to handle keyboard events in my classes that are derived from class A. I don;t want to add the redunudant code to my all derived classes.
Help me with your kind suggestions.
Regards
Chandok
|
|
|
|