|
Yes, it helped. Thanks a lot for your answers. I get the point now.
|
|
|
|
|
You're welcome!
|
|
|
|
|
Hi,
I have a ATL Exe server sending events(samples) to my client application. For some reason if I hold down the (X) close button on the client window without releasing it. It blocks the ATL exe server from firing the events to the client until I release the (X) button. Is this something to do with the threading model?
Regards,
Anthony
|
|
|
|
|
Kind of. COM uses window messages to communicate. When you hold down the X button, the UI thread enters a modal message loop and won't process COM related windows messages. Maybe have the event handler on a different thread in the client?
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
CodeProject MVP for 2010 - who'd'a thunk it!
|
|
|
|
|
Hi there,
I've written a WTL SDI application, that uses splitter windows. I'd like to know how what messages to listen for to pick up when the splitter windows are moved.
I've tried listening to WM_SIZE, but only the CMainFrame seems to send WM_SIZE messages.
Here's my CSplitterImpl derived class:
template <bool t_bVertical = true>
class CViewSplitterT : public CSplitterWindowImpl<CViewSplitterT<t_bVertical>, t_bVertical>
{
public:
DECLARE_WND_CLASS_EX(_T("Splitter"), 0, -1)
CViewSplitterT(){ }
};
typedef CViewSplitterT<false> CHorSplitter;
typedef CViewSplitterT<true> CVertSplitter;
What should I be listening for in the message map of my CMainFrame?
All suggestions welcomed!
modified on Friday, January 22, 2010 3:29 AM
|
|
|
|
|
When you don't know what messages are being sent, I'd suggest using Spy++ (distributed with Visual Studio) to look at what messages are flying around.
Using that method on a WTL app with splitter that I have, I don't think the main frame gets any notification of splitter position change. The only thing I can see is the views inside the splitter getting WM_WINDOWPOSCHANGING and WM_WINDOWPOSCHANGED messages when they are resized.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
MVP for 2010 - who'd'a thunk it!
|
|
|
|
|
Have a look at this article
[^]
|
|
|
|
|
|
I need a program in PHP which can extract the hidden biders from ebay.I will have to insert the item number and the program must show me all bidders of the auction and their emails.
Also the same program must extract the registered contact information for any specified bidder specially the email address
I will pay for this
If someone can help please contact me at totos_back@yahoo.com
Thanks
|
|
|
|
|
How to copy table with Data and constraints from one database to another database
Database A have 300000 columns
I need above table to copy in Database B but with constraints I am using below Query but here constraints are misssing
SELECT * INTO Table1
FROM A.dbo.Table1
Pls suggest me correct Query
|
|
|
|
|
Wrong forum.
L u n a t i c F r i n g e
|
|
|
|
|
I could not see SQL Server Option so I Posted here. Please Take it forward
|
|
|
|
|
Try the General Database forum instead - you'll have a better chance of getting help there.
L u n a t i c F r i n g e
|
|
|
|
|
ATL ActiveX control embedded in Internet Explorer not receiving WM_CREATE, WM_DESTROY, WM_SHOWWINDOW messages.
Other messages (WM_LBUTTONDOWN for example) are successfully handled.
The same control embedded in the test application works fine (all messages are received).
Thanks in advance
Oleg
|
|
|
|
|
Hi, i am using transform function to transform a vector to a map but getting the following error.
multiMapType.obj : error LNK2001: unresolved external symbol "struct std::pair<enum PC::PC_type,class PC> __cdecl std::make_pair(enum PC::PC_type const &,class PC const &)" (?make_pair@std@@YA?AU?$pair@W4PC_type@PC@@V2@@1@ABW4PC_type@PC@@ABV4@@Z)
Debug/MultiMapType.exe : fatal error LNK1120: 1 unresolved externals
The code snippet is as follows
int main( )
{
const PC::PC_type kind[] = { PC::IBM,PC::IBM, PC::Dell, PC::HP,PC::HP, PC::HP };
const int num_appliances = 3;
vector<PC> v;
for( int i = 0; i < num_appliances; ++i )
v.push_back( PC( kind[i], i, i ) );
typedef multimap<PC::PC_type,PC> PC_multimap_type;
PC_multimap_type stock;
const PC desired( PC::HP );
transform( kind, kind+num_appliances, v.begin(),inserter( stock, stock.end() ),make_pair<PC::PC_type,PC> );
PC_multimap_type::const_iterator stock_end = stock.end();
PC_multimap_type::const_iterator spot = stock.find( desired.appliance() );
if( spot != stock_end )
spot->second.print();
else
cout << "Don't have a " << desired.name() << " in stock\n";
return 0;
}
Please help.
Thanks
|
|
|
|
|
Given that I've made assumptions about context (definitions of PC? PC_type? headers you include?), it's difficult to say if I've done the same as you.
But your code compiles and links for me under VS2008. What version are you using?
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Hi,
Thanks for replying. I am using VS98(VC6.0) .
The headers file and defination of PC is as follows
#include <algorithm>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <string>
#include <utility>
#include <vector>
using namespace std;
class PC
{
public:
enum PC_type { Dell, HP, IBM, Compaq };
PC( PC_type appliance = Dell, int model = 220,
int serial = 0 );
bool operator<( const PC& rhs ) const;
PC_type appliance() const;
int model() const;
string name() const;
void print() const;
int serial() const;
private:
PC_type appliance_;
int model_;
int serial_;
};
|
|
|
|
|
ashtwin wrote: Thanks for replying. I am using VS98(VC6.0)
My commiserations - VC6 sucks for template usage.
Anyway - try declaring the make_pair instance you need before main():
template std::pair<PC::PC_type,PC> std::make_pair<PC::PC_type,PC>(PC::PC_type,PC);
int main( )
{
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Hi, i tried the declaration before main
template std::pair<PC::PC_type,PC> std::make_pair<PC::PC_type,PC>(PC::PC_type,PC);
int main( ){
but still getting the same error.
May be some problem in project settings.
|
|
|
|
|
No, shouldn't be project settings. And I don't have VC6 to test with. Oh well.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
The program is getting build properly if i use a function insted of make_pair in the last parameter of the function transform and return a pair from that function.
pair<PC::PC_type, PC> MyFunction(PC::PC_type pcType, PC pc)
{
return make_pair(pcType, pc);
}
transform( kind, kind+num_appliances, v.begin(),inserter( stock, stock.end() ),MyFunction);
|
|
|
|
|
Yes...I should have mentioned that solution In this one, you're not asking the compiler to automatically instantiate a function from the reference in transform, so yes, it includes all the necessary code.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Does it mean that whatever i was doing earlier was not correct.
|
|
|
|
|
Ummm - it should have been correct and OK - but VC6 is a bit rubbish, which is why it didn't work.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Ok, so the problem is with vc6.
Thanks for the help.
|
|
|
|