|
Thanks guys. Went with your suggestions - works well.
|
|
|
|
|
...instead of a dialog. I can't get it working and it's seriously pissing me off! Could someone give me some lines of code on this... or tell me if its even possible or if I'm just wasting time here...
|
|
|
|
|
Come on please anybody, I'm begging you! I'm certain someone has tried (done?) this before... please..
|
|
|
|
|
How can i make the dockable windows just like the Developer studio has?
|
|
|
|
|
|
I am using script control. when i add a procedure to the script control.if the procedure is error free then it works fine, but if there is a run-time error then a dialog box with the title "Just-In Time Debugging" and containg the option of .Net Studio that do you want to debug it. I want that this dialog box should not be displayed and i can handle this runtime error my self.
|
|
|
|
|
I download the wtl library and install it.
I open a sample project and compile it,but something is wrong like this:
d:\wtl\include\atlframe.h(274) : error C2146: syntax error : missing ';' before identifier 'lpnm'
d:\wtl\include\atlframe.h(905) : see reference to class template instantiation 'WTL::CFrameWindowImplBase<tbase,twintraits>' being compiled
d:\wtl\include\atlframe.h(274) : error C2501: 'LPNMREBARCHEVRON' : missing storage-class or type specifiers
d:\wtl\include\atlframe.h(905) : see reference to class template instantiation 'WTL::CFrameWindowImplBase<tbase,twintraits>' being compiled
d:\wtl\include\atlframe.h(274) : error C2501: 'lpnm' : missing storage-class or type specifiers
.....
can anyone help me with the problem?
thanks a lot
|
|
|
|
|
|
First of all ,thank you .
but can plz tell me where can I download the sdk?
thanks again
|
|
|
|
|
|
|
Hi! everybody:
I'm developing a ActiveX control which is a windowless, If I find something special in my class, I want to SendMessage to this ctrl and let it do something , but I can not get the window handle of this ctrl, so this ctrl also can not get this message.(I have tried AfxGetMainWnd, it doesn't work)
Does anyone has similar experience? Plesae give me some ideas, I'll appreciate
your help.
Ray
|
|
|
|
|
Hi,
As far as I know, it is not possible. Windowless ActiveX controls have no HWND by definition. Of course, COM passes RPC calls using thread message queue (in a case if the object belongs to a single-threaded appartment) but it cannot be simulated (and must not be).
The simplest way to handle it is to call a method of your control at the moment you need. The result will be exactly the same as with SendMessage - the control will process your call and return back. This will requre your caller class to hold an interface pointer to the control or provide it via a callback function.
--
Best Regards,
Andrew
|
|
|
|
|
I have a vector of integer that can have around 10,000 into it. There are cases when all the values in this vector are same. Right now i am just iterating through all the vector to find this out. Just wondering if someone can advise any better and optimistic way of doing this.
|
|
|
|
|
You can make use of a map to increment a counter for every time your data has a value.
map <int,int> g_mapData;
void insert(int val)
{
map <int,int>::iterator it;
it = g_mapData.find(val);
if ( it != g_mapData.end() ) {
it->second++;
}
else
{
g_mapData.insert(pair<int,int>(val,1));
}
}
And here is a test program
void main()
{
insert(0);
insert(10);
insert(5);
insert(0);
insert(5);
insert(0);
map<int,int>::iterator i;
for(i=g_mapData.begin();i != g_mapData.end();i++) {
cout << i->first << " , " << i->second << endl;
}
}
And the results are:
0 , 3
5 , 2
10 , 1
John
|
|
|
|
|
Thanks for the reply, But is there some way of doing this within a vector without adding another data structure.
|
|
|
|
|
Either keep the values sorted when they are inserted, or keep an index as the previous answer said. Without keeping some sort of index on the data, all you can do is a brute-force search.
--Mike--
"Big handwavy generalizations made from a position of deep ignorance is one of the biggest wastes of time on the net today.
-- Joel Spolsky
Ericahist | Homepage | RightClick-Encrypt | 1ClickPicGrabber
|
|
|
|
|
If you want you can always add all items from the vector to the map only when you need to analyze your data.
John
|
|
|
|
|
Hi,
Ive been looking for examples of simple ActiveX applications (i have to convert an MFC program to an ATL one for a website. Instead of downloading an executable then running that file the dll is downloaded and the program is run off the website) and i cannot get my head round any of the resources ive found so far. Does anyone know a good place to start (with some simple examples)?
Thanks
|
|
|
|
|
Look at CodeProject COM section. Check CodeGuru and Mindcracker.
http://www.codeproject.com/atl/
http://www.codeguru.com/atl/index.shtml
http://www.mindcracker.com/mindcracker/c_cafe/atl.asp
Kuphryn
|
|
|
|
|
Hi,
I have added a menuitem to the systemmenu as..
xMenu.InsertItem(0, MF_POSITION, ID_SETTINGS, "&Settings");
Also, I have added a command handler as..
COMMAND_ID_HANDLER(ID_SETTINGS, OnSettings)
When I run the program, I can see the new menu item but when I click on it, the function OnSettings() doesn't get called!! What am I missing here?
thanx in advance
HV
|
|
|
|
|
make sure whether the menu message is send to your window
I am seeking...
For what?
Why did you ask me for what? I don't know!
|
|
|
|
|
You need to handle WM_SYSCOMMAND . Use MESSAGE_HANDLER .
rechi
|
|
|
|
|
|
Hi,
Can anyone point me towards a good example of using DBProp_ISequentialStream to save BLOBS with the VC7 ATL DB Consumer templates.
The AOTBLOB sample often referred to as the answer to such requests does not appear to work with VC7/JET 4.0 (as compiled straight from the MS archive) and I must confess to not being inclined to track down the specific problem.
Thanks,
Displaced Aussie. Currently in London, normally living in Melbourne.
modified 10-Jul-19 21:02pm.
|
|
|
|