|
|
|
any example? i'm too stupid
|
|
|
|
|
Hello, I have a recordset which contains a lot of data , I need to save it into map or any kind of dictionnary (which have a key and other data)
I have for example :
pRecordset->MoveFirst();
while (!pRecordset->EndOfFile)
{
vIdTrans =pRecordset->Fields->Item["id_translation"]->Value;
vCaption =pRecordset->Fields->Item["id_caption"]->Value;
vLang =pRecordset->Fields->Item["id_language"]->Value;
vTranslation =pRecordset->Fields->Item["translation_text"]->Value;
strIdTrans = CUtils::GetVariantAsCString(vIdTrans);
strCaption = CUtils::GetVariantAsCString(vCaption);
strLang = CUtils::GetVariantAsCString(vLang);
strTranslation = CUtils::GetVariantAsCString(vTranslation);
- id_translation : key of table
- id_caption and id_language are REFERENCES from other tables.
- translation_text : data
So , what I need after is getting data by (id_caption and id_language) and it will be more better if (id_caption, id_language and id_translation)
how do that ?
}
|
|
|
|
|
|
I have the chain of inheritance :
coclass _A
{
[default] interface _IA;
};
coclass _A_1
{
[default] interface _IA_1;
};
coclass A
{
[default] interface IA;
[default, source] dispinterface _IA_ControllerEvents;
};
interface _IA : IDispatch{
interface _IA_1 : _IA{
interface IA : _IA_1{
all class inherits from IDispatchImpl
In the COM map of the class CA that expose the interface IA, I didn't know the correct code and how I manage the macros COM_INTERFACE_ENTRY and COM_INTERFACE_ENTRY2
So I do :
BEGIN_COM_MAP(CA)
COM_INTERFACE_ENTRY(IA)
COM_INTERFACE_ENTRY2(IDispatch, _IA)
COM_INTERFACE_ENTRY(IConnectionPointContainer)
COM_INTERFACE_ENTRY(ISupportErrorInfo)
COM_INTERFACE_ENTRY(_IA)
COM_INTERFACE_ENTRY(_IA_1)
END_COM_MAP()
is this correct ? or should I add an other macro COM_INTERFACE_ENTRY2 like this :
COM_INTERFACE_ENTRY2(_IA, _IA_1)
?
Thank you.
|
|
|
|
|
Hi,
I have understood that in Windows 8 CP x64 the IE 10 is a 64 bit browser, but it is triggering 32 bit containers while Enhanced protected mode if OFF.
In this scenario, I am trying to lunch a .exe from my ActiveX using create process. Here createprocess() is failing with GetlastError() returning ZERO.
The same code works fine and successfully launching the .exe in Protected mode off.
Can any one put some light what additional stuff need to be done to achieve above mentioned scenario.
Birajendu
SonicWALL
Bangalore
India
|
|
|
|
|
Hello Friends,
I have to expose "ATL simple object" interface.
Now, I wanted to expose 3 interface objects. Each one has some common functionality, hence I am trying to keep common functionality in abstract class.
Now, my requirement is that each three class should have their own methods plus common functionilty [methods like Lock] inherited from common abstract base class.
Please suggest. Helpfull link would really help.
|
|
|
|
|
For those interested in this question, there are a couple of answers already:
How to do inheritance in ATL[^]
Pablo.
"Accident: An inevitable occurrence due to the action of immutable natural laws." (Ambrose Bierce, circa 1899).
|
|
|
|
|
I have created a STL List<customer> customer_list with several detail properties. all works fine.
However I now need to store a list of string for each customer. I have added a STL List<string> string_list to the customer object which is accessible the problem is the data in the list is not persisted.
Is it possible to have a list within a list? what could be the reason for the list not persisting the data?
Regards
Mark
|
|
|
|
|
Although it is possible to have a list within a list , it would help if you could post some relevant code.
You should use the STL vector class instead of a list if you do not do insertions and deletions from the middle of the list .
|
|
|
|
|
When you say persist do you mean...
a) After setting up string_list the next time you look the data isn't there?
b) The thing won't write to a file automatically?
c) Something else!
Cheers,
Ash
|
|
|
|
|
If elements in your STL list are more than just a simple type, you can wrap it up into an object, and just have STL list of objects.
I used it in a few places in the following article: ProSysLib: Dissecting the Process[^]
|
|
|
|
|
I need to generate the .H file (contains the interfaces, attributes...) from the DLL COM c++.
|
|
|
|
|
In Visual Studio, use #import .
It generates (and includes in your project) two files, with the extensions .tlh and .tli (short for 'type library header' and 'type library include'), and automatically includes them in your project.
You'll find more in the documentation for #import .
Hope this helps,
Pablo.
Pablo.
"Accident: An inevitable occurrence due to the action of immutable natural laws." (Ambrose Bierce, circa 1899).
|
|
|
|
|
Yes, I have the tlh and tli files
but I need the .H and .C files exactly
|
|
|
|
|
copy/paste from tlh/tli?
Pablo.
"Accident: An inevitable occurrence due to the action of immutable natural laws." (Ambrose Bierce, circa 1899).
|
|
|
|
|
I Think there is a method to have directly the .h file contains interfaces...
|
|
|
|
|
Use the OLE/COM Viewer. This allows you to save the definition out to IDL, .c or .h files.
|
|
|
|
|
Yes, it seems to work for me , but when I try to export to .h file
i have the error message :
---------------------------
OLEViewer 2.0 Interface Viewers
---------------------------
Error running MIDL.exe: 2
have you idea about this ?
|
|
|
|
|
Try the steps outlined here[^].
|
|
|
|
|
HI,
I have an application in which is not using mfc.But i got a requirement that i need to create and display a dialog box. Existing application is a Regular DLL.
Thanks & Regards,
Rajeev
|
|
|
|
|
Rajeev.Goutham wrote: i need to create and display a dialog box.
Add a dialog resource to your project and use DialogBox() [^] to run it.
Rajeev.Goutham wrote: Existing application is a Regular DLL.
A DLL is not an application.
Binding 100,000 items to a list box can be just silly regardless of what pattern you are following. Jeremy Likness
|
|
|
|
|
Using Windows API to create Dialog see this
|
|
|
|
|
Hello,
Please have a look at the code ,I can't realise the funcation.Thank you very much !
----------------------------------------------
BOOL CMultiProgressDlg::OnInitDialog()
{
.......................
hDownLoaderDlgWnd = this->m_hWnd;
...........................
}
void ShowProgress(LPVOID lpProgress)
{
CProgressCtrl *bpm_COMM= (CProgressCtrl*) GetDlgItem(hFlashDownLoaderDlgWnd,* (int*)lpProgress);
for(int i = 0; i< 100; i++)
{
bpm_COMM->SetPos(i);
Sleep(100);
}
}
void CMultiProgressDlg::OnOK()
{
// TODO: Add extra validation here
HANDLE hThrds[3];
DWORD dwThreadId[3] ;
UINT ProgressnID[3] = { IDC_PROGRESS1,IDC_PROGRESS2,IDC_PROGRESS3 } ;
for(int i = 0; i < 3; i++)
{
hThrds[i] =CreateThread(
NULL,//LPSECURITY_ATTRIBUTES lpThreadAttributes, // pointer to security attributes
0, //DWORD dwStackSize, // initial thread stack size
(LPTHREAD_START_ROUTINE)ShowProgress,// LPTHREAD_START_ROUTINE lpStartAddress,
&ProgressnID[i],
0, //DWORD dwCreationFlags,
&dwThreadId[i]);//LPDWORD lpThreadId
}
}
|
|
|
|