|
Schlaubi wrote:
it should in any cases pass MK_LBUTTON as wParam
yes it should but no....
I want to detect SHIFT+LBUTTONDOWN+MOUSEMOVE to move window without CAPTION.
if you have a solution to do this without detect all this event ?!
Thx again Schlaubi for your help
|
|
|
|
|
Well, perhaps this[^] article helps you.
|
|
|
|
|
YEEEEEEEEEES
<big>SendMessage(WM_NCLBUTTONDOWN,HTCAPTION);</big>
THX for your article that is the solution !! i went to code a lot of code to move my window without caption,but with this solution i need only 2 lines !!
THX THX !!
|
|
|
|
|
I'm glad to hear that
You should have told me earlier what you intended to do....;)
I went on a course. Learning to love yourself. I came top. - Jane
|
|
|
|
|
Schlaubi wrote:
You should have told me earlier what you intended to do....
Yes of course i'm stupid
I would never have thought that it was so easy !
|
|
|
|
|
He, I have a problem and not the solution !
After starting my computer (under Win2000), I would like run automaticaly my App (C++), and after the user will not access to OS (explorer, tasks manager, ...) except if the user enter the good password on App. Do you have an Idea ?
Please !
MyEden
|
|
|
|
|
Dear all;),
I have being using DAO to connect to oracle 8i DB, but
I try to pass a sqlstatememet = "select * from table where datefield = to_date ('2002-01-23','yyyy-mm-dd')" in the
code
CDaodatabase database;
CDaoRecordset recset(&database);
recset.Open(AFX_DAO_USE-DEFAULT, sqlstatememet);
I always get this problem error message
"Undefined function 'to_date' in expression"
Anyone pls help!!!!
|
|
|
|
|
Hi !!!
I read somewhere that it is possible for an app to use an ActiveX located on a remote computer.
I tried to do that with an App which works fine when the ActiveX is local, then, I removed the local ActiveX and installed it on a remote computer, connected with my computer through a normal TCP/IP connection (with a hub, no switch or routers). It doesn't work : my app doesn't find the ActiveX.
I guess I have to tell my app where the ActiveX is, but I have no idea how to do that.
Anyone could help me ?
Thanks in advance !
Jerome
|
|
|
|
|
COM+(MTS) is the easiest way. Otherwise you have to read a lot on configuration and registry settings for remote COM.
|
|
|
|
|
Read up on DCOM. There are several good articles here on CP.
Jason Henderson "You must be the change you wish to see in the world." - Gandhi
articles profile
|
|
|
|
|
Hi friends,
I am using CRecordset and Access Database for one of my database projects. I need to update field which is having character greater than 255. So I declared the MS Access field as Memo( 64K). But when I update the database I am getting assertion.
The Assertion is pointing at:
if( pvBind != pInfo->m_pvBindAddress)
{
TRACE1("Error: CString buffer (column %u) address has changed\n", nField);
ASSERT(FALSE);
}
The nField is showing the same field where I am trying to write more than 255 characters.
What I have to do if I want to write more than 255 characters??
Thank You.
Satya
|
|
|
|
|
Guys i am declaring two C++ classes in a single header file. My code is something like this:
class A
{
class B;
friend class B;
B sum;
};
class B : public something
{
};
But on compiling, the compiler is giving me following error:
: error C2079: 'sum' uses undefined class 'B'
Can any one tell me whats the problem ????
|
|
|
|
|
How can the poor compiler know that later in the file class B gets declared and defined?
At the moment where he need it, he does not find an entry for class B in his table of known identifiers.
Solution:
Add a line
class B;
just before your class A. That is called a 'forward declaration'.
This way, he finds an entry for B and is happy (for now...)
My opinions may have changed, but not the fact that I am right.
|
|
|
|
|
I know about forward declaration, and ofcourse i am doing whatever you said, but your suggestion not worked. Try it yourself, just create a simple console app and add the following code in some header file:
class B;
class A
{
public:
class B;
friend class B;
A();
virtual ~A();
B sum;
};
class B
{
};
|
|
|
|
|
Use B *sum; .
As the compiler said, it cannot allocate a member that has not been defined at compile time.
rechi
|
|
|
|
|
You can treat forward declarations as a promise to the compiler that in
some other obj file the full declaration will be provided. Otherwise you will
get unresolved external symbols.
If you try to make an instance of class B inside class A will not work
because at this moment the ctor of B must be already declared.
|
|
|
|
|
When the compiler is allocating the data space for class A, it needs to know the exact size of each of the objects that make it up. If you have a B sum; in class A's declaration, the compiler needs to know its exact size, which is currently not defined. This is an error. If it was declared as B* sum , the compiler knows the size of a pointer to an object, so can work out how big class A is going to be. This is OK.
If you still need to declare class A with a B sum then you will have to move the declration of class B before class A. But as you said in your original post, class B will be referencing class A in some way. If both do somthing like B sum and A total then one of your classes will have to use a pointer to the object otherwise you will not be able to get the code to compile due to a circular definition.
Roger Allen
Sonork 100.10016
Were you different as a kid? Did you ever say "Ooohhh, shiny red" even once? - Paul Watson 11-February-2003
|
|
|
|
|
I'm hooking another app and subclassing it. When I work with the WM_GETMINMAXINFO msg and set the MINMAXINFO data then return 0, my settings are overriden by the app if my ptMinTrackSize.x or ptMinTrackSize.y are less than what the app allows. Basically, what I'm asking is, how is the app setting the min and max window size if I'm overriding the WM_GETMINMAXINFO msg and returning 0?
|
|
|
|
|
You should be able to shrink app to:
Y = GetSystemMetrics(SM_CYCAPTION)+GetSystemMetrics(SM_CYDLGFRAME);
X = n*GetSystemMetrics(SM_CYDLGFRAME);
Boyond that requires patching OnNcCalcSize
|
|
|
|
|
Hi
If I have a number of radi buttons on a dialog that are grouped together clicking on one unclicks the others. Using SetCheck for a button however from in the code leaves the others unchanged ie checked if they were the previously selected button.
Is there a way to easily achieve the same functionality of clicking from within the code ?
|
|
|
|
|
Perhaps calling CWnd's CheckRadioButton helps?
|
|
|
|
|
How can I replace CSpinButton inside TabCtrl????
Cann't use "PreSubclassWindow()" as control may not be created at that time?
May be someone has ideas how to detect when CTabCtrl created Spin?
Thanks,
Brian
|
|
|
|
|
The spin button sends a WM_PARENTNOTIFY msg to the tab control when it's created. If the low order word of wParam is WM_CREATE then get the child control's class name (lParam is a pointer to the child's HWND). If the class name is "msctls_updown32" then you hit the jackpot
|
|
|
|
|
Thanks, worked like a charm....
One more question... If I want to hide Spin, what would be the best way to do this...
|
|
|
|
|
subclass the spin control and then on WM_WINDOWPOSCHANGING set the flags like this:
((LPWINDOWPOS)lParam)->flags &= ~SWP_SHOWWINDOW;
((LPWINDOWPOS)lParam)->flags |= SWP_HIDEWINDOW;
|
|
|
|