|
hi
I have designed an activex control in vc++6.0.I wanna add maximize,minimize and close buttons in title bar.how to do that.
help me please.
Regards,
Sunita
|
|
|
|
|
As I know, the windows styles that are responsible for this are: WS_MAXIMIZEBOX , WS_MINIMIZEBOX and WS_SYSMENU .
|
|
|
|
|
thanks for ur reply.
But i need to add hover buttons in title bar.
I want to create my own buttons insted of WS_MAXIMIZEBOX, WS_MINIMIZEBOX.
How to create own title bar and buttons in activex control
Help me please.
Regards,
Sunita
|
|
|
|
|
See Here[^] maybe it is some helpful to you
whitesky
|
|
|
|
|
Hi,
How do I use a static control to draw on a dialog ?
So far, I have created a static text control and added a member control variable to it of type CStatic.
Now, I am required to subclass the text control so that i can override its OnPaint() function but i do not know how to achieve that.
Any help will be highly appreciated.
llp00na
|
|
|
|
|
Maybe this article[^] will help. It is about subclassing a CButton but the procedure is the same (AFAIK) for a static control.
Cédric Moonen
Software developer
Charting control
|
|
|
|
|
thanx for the gr8 article
llp00na
|
|
|
|
|
Hi,
Declare the member variable for that static control.
ex: if the subclass for static is cmystatic
initialize the variable in dlg cDlg.h
#include "mystatic.h"
CMystatic stat;
//Cdlg.cpp
void CDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CFirstDlg)
DDX_Control(pDX, IDC_STATIC_FIRST, m_fir);
//}}AFX_DATA_MAP
}
|
|
|
|
|
thanx, i am done now. I used the class wizard as david suggested
llp00na
|
|
|
|
|
llp00na wrote: Now, I am required to subclass the text control so that i can override its OnPaint() function but i do not know how to achieve that.
Use ClassWizard (Ctrl+W) to derive a new class from CStatic . Then you can override its OnPaint() method.
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
thank you. I am done now
llp00na
|
|
|
|
|
hello
i have to made an dialog based application and i want to insert a logo
at the begning of the form
can any one help me for inserting logo
Thanking you
Please mail me
|
|
|
|
|
You mean that before your application is up and running you want to show a splash screen sort of logo
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
I think you could use your "About dialogbox" for the same. DoModal your aboutbox then use a timer to make it disappear after a while. (EndDialog)
<marquee scrollamount="1" scrolldelay="1" direction="up" height="10" step="1">--[V]--
[My Current Status]
|
|
|
|
|
If you need to show the dialog you can display it by getting the bitmap handle and loading it.
Secondly you can take the picture controla nd set the log to it from the resource.
Cheers
"Peace of mind through Technology"
|
|
|
|
|
yogendra kaushik wrote: i have to made an dialog based application and i want to insert a logo
at the begning of the form
can any one help me for inserting logo
Thanking you
Insert SplashWnd in your Application
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
Private Declare Function concat Lib "d:\StringConcat1.dll" (ByVal Text1 As String, ByVal Text2 As String) As String
Private Sub Command1_Click()
Text3.Text = concat(Text1.Text, Text2.Text)
a = Len(concat(Text1.Text, Text2.Text))
MsgBox a
End Sub
The function of the vb code is given below. The form has three text fields
a) The first text field , enter the first string
b) The second text field , enter the second string
c) The third text field, concatation of the two string i.e result of the two strings is shown in third text field
d) One Command button at the bottom of the form.
When we call "StringConcat1.dll" dll the value entered through the two text fields is send as a argument by value to the dll and Concatenation of the strings is done in C++ .
the dll code is given below "test.cpp"
#include
char* __stdcall concat(char *string1 , char *string2)
{
return strcat(string1,string2);
}
the def is given "test.def"
LIBRARY StringConcat1
EXPORTS
concat @1
When I debug the code , the Concatenation is done in C++ but when the result is given to vb code ie front end only the first string that is entered in the first text is shown only as the output in the third text field.
for example
text1 : india
text2 : people
result text3 : india ( but the result should be indiapeople after the concatenation is done in C++(i.e dll does the function for concatenation , but the result shown is here is only "india").
Kindly note the point:
the C++ code works perfectly.
After computation ie Concatenation , the result is not shown in the vb code only text1 input is shown in text3 field.
Can any help me in this matter
From Phijo Philip
|
|
|
|
|
It's much more complicated than you think ! VB and C++ don't have the same format for string representation. It works the way you did to pass string from VB to C++ but the other way is more complicated (the return of the string).
But my question is: why do you want to call a dll to concatenate two strings ? What is the exact purpose of this dll ? why don't you simply concatenate the two strings in VB ?
Cédric Moonen
Software developer
Charting control
|
|
|
|
|
Before returning, try this.
<br />
char* __stdcall concat(char *string1 , char *string2)<br />
{<br />
strcat(string1,string2);<br />
AfxMessageBox(string1)<br />
AfxMessageBox(string1);oops sorry not like this.<br />
return strcat(string1,string2);<br />
return(string1);<br />
}<br />
And tell me what you get.
also
<br />
a = Len(concat(Text1.Text, Text2.Text))<br />
MsgBox a<br />
What's the length of the resultant text? I think it could only be of the first string's length. (as you get only the 1st string as the result).
Ok tell me what you got in the AfxMessageBox, If it's not an MFC DLL, try using MessageBox ..
And Also remove the BOLD SHOUT please...
<marquee scrollamount="1" scrolldelay="1" direction="up" height="10" step="1">--[V]--
[My Current Status]
-- modified at 6:09 Monday 12th June, 2006
|
|
|
|
|
I suggest you would go for an ATL (COM)DLL if you want to integrate you C++ code into VB. Which would be hassle free
<marquee scrollamount="1" scrolldelay="1" direction="up" height="10" step="1">--[V]--
[My Current Status]
|
|
|
|
|
The strcat(string1, string2) looks suspicious: since the strcat function stores the result of concatenation in the first string, the string1 passed from Visual Basic may not have enough room for concatenated destination string.
|
|
|
|
|
how we can change the mouse cursor
thank u in advance;
sree
|
|
|
|
|
HCURSOR SetCursor(
HCURSOR hCursor // handle to cursor
);
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
sorry.what i mean is changing the mouse cursor shape from arrow to hand.
thank u in advance;
sree.
|
|
|
|
|
if you want to change shape use
HCURSOR hcur=LoadCursor(AfxGetApp()->m_hInstance,(LPCTSTR)IDC_HAND);
SetCursor(hcur);
whitesky
|
|
|
|