|
Actually I haven't given any border for my control.
it is the default border, drawn by the CTabCtrl around the tab buttons.
Some other message or function is doing this. I want to know how could I change the border or how can i change the color
SaRath.
"Don't Do Different things... Do Things Differently..."
Understanding State Pattern in C++
|
|
|
|
|
I am afraid it is not so easy to interfere into built-in drawing procedures of the tab control. I suppose drawing is performed in the handler for WM_PAINT message. Some other controls post WM_CTLCOLOR message, which allows some customization, but this is not the case of the tab control. You have either to implement a custom owner-drawn control, derived from CControl, or simply try to draw your borders over the original ones.
|
|
|
|
|
thank my friends to reply soon, i will post my system interface here, and it can show you my system's problem. but i can't post it here. how post a picture here. thank you.
li zhiyuan
Li Zhiyuan
8/06/2006
|
|
|
|
|
li zhiyuan wrote: how post a picture here. thank you.
Upload your Picture to any free server and post theLink here!
"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
|
|
|
|
|
Hello
all of you
i am trying to make a login program in VC++ but, i don't know where i am wrong here
i am writing some of my code below:
Please any one tell me how i make correct my problem
Very Imp:" Actually it's contain two phase for one user name and password
open one form and for another user name and password open another form "
i this code it open only one form call by Admin.DoMolal in between
Code ===
int i, j, k;
MYSQL * Conn ;
MYSQL_RES * res , *res1;
MYSQL_ROW row ,row1;
CString sStr, sPwd,sQry;
GetDlgItem(IDC_LOGIN)->EnableWindow(FALSE);
SetDlgItemText(IDC_STATIC_LOGIN_MSG, "Logging in. Please wait...");
if ( (Conn = mysql_init((MYSQL*) 0)) &&
mysql_real_connect( Conn, "localhost", " ", NULL, NULL, NULL, NULL, CLIENT_MULTI_STATEMENTS ) )
{
if ( mysql_select_db( Conn, "login") < 0 )
{
SetDlgItemText(IDC_STATIC_LOGIN_MSG, "Can't select the database !\nTry later.") ;
goto exit_here;
}
}
else
{
SetDlgItemText(IDC_STATIC_LOGIN_MSG, "Can't connect to the mysql server !\nPlease try later.") ;
goto exit_here;
}
sStr.Empty();
GetDlgItemText(IDC_USERNAME, sStr);
GetDlgItemText(IDC_PASSWORD, sPwd);
sQry="SELECT userid FROM users WHERE 1";
if ( ! mysql_query( Conn, sQry) )
{
res = mysql_store_result( Conn );
i = (int) mysql_num_rows( res );
}
sQry.Empty();
sQry="SELECT password FROM users WHERE 1";
if ( ! mysql_query( Conn,sQry) )
{
res1 = mysql_store_result( Conn );
j = (int) mysql_num_rows( res1 );
}
while((row=mysql_fetch_row(res)) && (row1=mysql_fetch_row(res1)))
{
if((!strcmp(sStr,rowk)) && (!strcmp(sPwd,row1k)))
{
SetDlgItemText(IDC_STATIC_LOGIN_MSG, "Login Successful.") ;
// m_project.DoModal();
m_Admin.DoModal();
break;
}
else
mysql_free_result( res ) ;
mysql_free_result( res1 ) ;
goto exit_here;
}
}
here according my requirment i want that after chack UN & Pass it also open the another form for another use.
Please mail me
|
|
|
|
|
What exactly is the problem? Is it a compiler/linker error, or a runtime issue? Is an exception being thrown, or an assertion being fired?
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hi
I want to change WIDTH of my rich edit control as user types text in it, so that it displays the entire text instead of scrolling text horizontally. My rich edit is a multiline control
I have used EN_REQUESTRESIZE notification msg but this works only for adjusting height of control and EN_REQUESTRESIZE is working perfectly in case of height, i.e I use to change the control height when i get this msg to show all lines of text.
kindly help!!!! its urgent
Muhammad Azam
|
|
|
|
|
If your problem is the scroll-bars that unexpectedly appear even after you resized the rich edit control during ENM_REQUESTRESIZE , then please note that the new control size probably should include the width of the control’s borders. Try to specify a little bigger size.
Otherwise, what exactly occurs when you type a long line of text?
|
|
|
|
|
Thanks Viorel,
No the problem is not with scroll-bars the problem is that when user types some text in the control and the text reaches right border of control than how much should i increase width of my edit control (based on current font size, face name etc..) so that the next character typed, is visible and no scroll bar or word-wrapping should occur.
And when the control's width reaches right border of dialog than word wrapping should occur.
thanks
Muhammad Azam
|
|
|
|
|
hello ,
my problem is that i want to get hard disk no or id for preparing license , can anyone tell me how to get .
my application is MDI application.
thanks in advance
sachin gupta
|
|
|
|
|
Use GetVolumeInformation API
- NS -
|
|
|
|
|
|
Hi
If you want somthing more serious then volume serial number (GetVolumeInformation) which you can change, try to use http://www.codeproject.com/csharp/hard_disk_serialNo.asp. Additionally here is [^] whole another project. In my case it doesn't work properly with all drives but you can try.
-----------
Mila
-- modified at 12:04 Thursday 8th June, 2006
|
|
|
|
|
all of my friends, urgent aid, actually i completed my system, but i would like to improve it. after i increased another menus, they what i increased can't work, previous still can work.but after debug, no errors, just several warnings, for instance,"conversion from 'double' to 'long', possible loss of data".who can help me for now? thank you.
li zhiyuan
all of friends, my system has a problem, it is urgent for me, who can assist me? thank you.
my system is image processing using VC++,after i added 3 menus, they can't work, but after debug,no errors,just several warnings.thank you.
li zhiyuan
|
|
|
|
|
Man, your post is missing a lot of informations for us to help you. You even didn't described the problem. What does "It can't work" means ?
Anyway, I have THE ultimate solution that can help you in every situation like that: use your debugger. It will provide you with all the information you need to track the problem.
Cédric Moonen
Software developer
Charting control
|
|
|
|
|
Cedric Moonen wrote: Anyway, I have THE ultimate solution that can help you in every situation like that: use your debugger. It will provide you with all the information you need to track the problem.
My 5!
IMO, it seems as if there is a total lack of knowledge about debugging for certain posters.
Personally, I single-step all vital code before turning it over to the users. It has saved me heaps of work, during the years.
|
|
|
|
|
Hello li zhiyuan,
the warning is due to the fact that your are assigning a double value to a variable of type long . i.e.
double d = 3.5f;<br />
long l = d;
and the warning says that you will loose your data and l will caontain only 3 instad of 3.5.
if this is ok for you than you can suppress this warning by typecasting.
i.e.
double d = 3.5f;<br />
long l = (long)d;
hope this answers your quetion.
Also have you added message handler for the new menues that you are creating??
-- modified at 7:31 Thursday 8th June, 2006
|
|
|
|
|
hi,
i want to develop one application in VC++ 6.0-MFC ,which can able to store a PDF file to oracle database in a column - BLOG "datatype".
Is it possible to do that thing in VC++ 6.0
i found most of application in .NET ,not in VC++.
can any one please help for the same..
send reply
|
|
|
|
|
Hi
I added a class in my MFC dialog based project. Now i want to declare a pointer object of my dialog class in .cpp file of newly added class to access members of dialog class in that cpp file. I declared that pointer like this
CFileSenderDlg *fsD = new CFileSenderDlg;
But program crashes at the point where i use this pointer to access a member function of dialog class. What it the mistake i am doing? Can anyone please help me in this regard?
Thank you.
We Believe in Excellence
www.aqueelmirza.cjb.net
|
|
|
|
|
The code seems very clean.
1. Check whether the pointer get allocated properly or not (NULL or Junk value).
2. Check for the missing resources, which hadn' is not removed on deleting the control.
3. Check the message handlers
SaRath.
"Don't Do Different things... Do Things Differently..."
Understanding State Pattern in C++
|
|
|
|
|
Sorry i was wrong. In fact error occures when i try to declare the pointer.
When i tried to debug it, It took me to afxwin1.inl and current pointer was on following lines. Can you please tell me what is the problem?
_AFXWIN_INLINE HINSTANCE AFXAPI AfxGetResourceHandle()<br />
{ ASSERT(afxCurrentResourceHandle != NULL);
We Believe in Excellence
www.aqueelmirza.cjb.net
|
|
|
|
|
Sorry for the late reply.
Walk ur call stack and find from where this call occurs.
check for missing resources that may be the problem
SaRath.
"Don't Do Different things... Do Things Differently..."
Understanding State Pattern in C++
|
|
|
|
|
Aqueel wrote: CFileSenderDlg *fsD = new CFileSenderDlg;
After this, you should create the dialog box also like:
fsD->Create(IDD_WHATEVER,Parent);
Also check that the actual dialog resource is really present by looking at the resource view, and then checking the ID for the dialog.
this is this.
|
|
|
|
|
See here
<br />
CTest::CTest(CWnd* pParent )<br />
: CDialog(CTest::IDD, pParent)<br />
{<br />
Create(CTest::IDD,pParent);<br />
}<br />
--------------------<br />
CTest *m_Test;<br />
m_Test=new CTest(this);<br />
whitesky
|
|
|
|
|
Hi
Right now I am working with MessageBoxes.Is there a way to define my own Buttons for the MessageBox with a caption of my wish and handle the ButtonClicked event?
Thanks in advance
Taruni
|
|
|
|