|
Check this out :-
WS_EX_TOOLWINDOW
Regards,
FarPointer
|
|
|
|
|
Thanks Nibu & Farpointer.It worked...
Thanks one again
|
|
|
|
|
Would you be kind enough to say how you made it to work.
Regards,
FarPointer
|
|
|
|
|
Hello all,
How to trap/catch system calls from an application.
say for Ex: A File I/O Program,in which file open & close system calls needs to
trapped.
I have some utilities to monitor the system calls generated from an application.
But,I need to do it programmatically(in VC++). A Sample code for doing the same will be more helpful!!.
Thanks in Advance
Rane
|
|
|
|
|
|
Hello,
How to get the recordview pointer thru which I will get the recordset pointer, if I have put on a tree view, and a list view in my MFC application with database? It's because the record view is not the default view in this application, how to get this recordview pointer so as to get the recordset pointer contained in it? Please help.
Thanks,
Software Developer
Sanjay Khapre
|
|
|
|
|
Have you derived a class from CRecordset ?
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
Hi all,
I have a very special case: a skin dilog (without thick frame, without title bar), movable from anywhere you klick ( OnNcHitTest returns HTCAPTION if the parent reterns HTCLIENT). Furthermore has rounded corners
CRgn rgnWindowRegion;
rgnWindowRegion.CreateRoundRectRgn(0, 0, Rect.Width(), Rect.Height(), 4, 4);
SetWindowRgn(rgnWindowRegion,TRUE);
This dilog is not resizable, but it must be one if the user clicks on a special button, and drags the mouse with the left button down. Has anyone an idea how can I do this? May be a similar example?
For any suggestion thanks in advance.
Regards,
Emanuil
|
|
|
|
|
You mean to say that it should become resizable after the user clicks the button then handle the wm_size set a boolean flag(On button click) and if its true send the message to the default implementation else discard it.
Regards,
FarPointer
|
|
|
|
|
Yes, the dialog should be resiable, but only during the click on the button. So the user clicks the button and with LBUTTONDOWN resizes the dialog as you do on the margine. When LBUTTONUP, then the dialog is on the final size and no more resizable (of course until the next click on button).
Code like:
LONG lSTYLE = GetWindowLong(m_hWnd, GWL_STYLE);
lSTYLE &= ~WS_THICKFRAME;
lSTYLE |= WS_THICKFRAME;
SetWindowLong(m_hWnd, GWL_STYLE, lSTYLE);
makes a nasty border, and after I reset the region with rounded corner the window do not invalidates the border regions.
I guess I must do something special (what ?) and send WM_SIZE by myself to the window. The button can be also a special region, e.g. where a bitmap is shown. Important: the window must be redrawn from another place than the window border.
THANKS,
Emanuil
-- modified at 1:58 Friday 31st March, 2006
|
|
|
|
|
CStringArray myclass::getStr()
{
CStringArray csa;
csa.Add("str1");
csa.Add("str2");
return csa;
}
I got this error
what to do?
error C2558: class 'CStringArray' : no copy constructor available
How to return two dimensional array?
JAYARAJ
|
|
|
|
|
Rather than returning the value, pass the paramter as a reference.
void myclass::getStr(CStringArray& csa)
{
csa.Add("str1");
csa.Add("str2");
}
|
|
|
|
|
This is my code snippet, and it does not work, since CStringArray does not implement a copy constructor (meaning that this probably fails to compile:
CStringArray csa=getStr();
Do as suggested above, pass the CStringArray as an argument to the function.
~RaGE();
|
|
|
|
|
maybe it is some helpful to you
////h File////////////
CStringArray *a();
CStringArray* CAnswer::a()
{
CStringArray* a;
a=new (CStringArray);
a->Add("123");
a->Add("12");
return a;
}
if you check count then return ->2
CStringArray *b;
b=a();
int cb=b->GetCount();
|
|
|
|
|
Hi,
Works. Yet not a good solution. The caller is supposed to delete the array though it may not do it.
The best choice, I think, is to pass by refernce as a parameter.
--
======
Arman
|
|
|
|
|
yes
It's only a suggestion because we need to delete array
|
|
|
|
|
Hello,
My problem is I want to create child windows of user defined sizes in the MDImainframe window once it shows and show various documents in them, so I required some help regarding how to create a MDI child winodw or get the MDI child window pointer to create it? May be a similar example. Please help.
Software Developer
Sanjay Khapre
-- modified at 1:25 Friday 31st March, 2006
|
|
|
|
|
SanjaySMK wrote: My problem is I want to create child windows of user defined sizes in the mainframe window and show various documents in them, so how to create or get the MDI child window pointer? Please help.
Using GetActiveFrame() get a pointer to the active frame.
Next use GetWindow to traverse through all siblings of the frame window.
Nibu thomas
Software Developer
|
|
|
|
|
Hi,
There are so many gurus here who are doing the VC++, COM, ATL , MFC programming. Could people share the interview questions they faced with these technologies. There are rarely any site which mentions the interview questions for these programming skills. Any link to site if anybody knows.
Thanks,
Lee
|
|
|
|
|
Here is a question to you on C++: Can a class constructor be declared private? If not, explain why. If yes, explain why you would do it.
|
|
|
|
|
For those who don't know, Yes it can! You would use this if you wanted to prevent anybody creating this object with a call to "new". Therefore the object itself must control it's own creation and deletion.
Another question if you are in the gaming industry may be something like:
What is a quaternion, why is it different from Euler and what are the advantages/disadvantages of both?
When I die I'd like to go peacefully in my sleep like my father, not screaming in terror like his passengers!!!
|
|
|
|
|
Hi,
I want to have a palette which will have some icons.. (As I click the icon the respective command becomes active.). if I kept the left mouse button pressed, I can see the sub command Icons from which any icon can be selected by moving pressed mouse button.. this sub palette can be dragged (pulled )out too to have sub palette.
Thanks
Lee
|
|
|
|
|
This is not a question. What is it that you want ?
~RaGE();
|
|
|
|
|
I want to know hwo to proceed with it.
Which base classes to be used. How can be the
things combined.
Thank you
lee
|
|
|
|
|
Hi all,
In my MDI application, I've drawn an image as the background in OnEraseBkgnd() function. I'd like to keep the image always in Center. But I'm not able to get the center of the window in OnSize. If anyone could help to come out of this problem, it would be quite helpful for me.
Thanks in advance,
Sarvan AL
|
|
|
|