|
I used SQL Server 2000 created a data source.Then I put it on to my homepage.Although The server support SQL Server DataBase,but it is impossible for him to run a srever App for my Client App.So I must use my ID and Password connect to it directly from my Client App.Also I want it to work very smoothly no matter where my Client App runs . How can I do this on VC6?
|
|
|
|
|
How do I get my custom bitmaps in a CBitmapButton object to appear in colors appropriate to the user's custom desktop colors?
|
|
|
|
|
Hi,
Help me please with the following:
I created an application,
and added a dialog box to that,
and, in the dialog box there are edit boxes, and I can't manage the following: when I press the OK Button I want to check if there are any empty edit boxes, and if there are, not to closing the dialog box go to that edit box?
Thanx.
|
|
|
|
|
Are you using a class library? If you're using MFC (just guessing), you do your checks in OnOK() . If the data doesn't pass your checks, just don't call CDialog::OnOK()
--Mike--
Ericahist | Homepage | RightClick-Encrypt | 1ClickPicGrabber
Latest art~!@#2rDFA#@(#*%$Rfa39f3fqwf--=
NO CARRIER
|
|
|
|
|
Thanx for your quick reply.
Yeah, that was really silly question.
I should know that.
|
|
|
|
|
Oh, one more thing
how that is done with tabbed dialog boxes?
I did that in single dialog box, works fine, but in the tabbed dialog boxes i cant manage.
thanx.
|
|
|
|
|
|
well,
for Cancel button I need nothing,
what I need is when the OK button pressed, to check if the Edit Box is Empty, if it is empty, not closing the dialog (Tabbed) Box, go set the Focus to that Edit Box.
I managed to check the Edit, but the Dialog (tabbed) Box closes.
I do not press te Cancel Button.
|
|
|
|
|
You need to do validation in the page's OnKillActive() function. Returning FALSE will keep the user from switching to the other tab(s). Also, When the OK button is clicked, OnKillActive() is called first to see if it is ok to proceed. Set breakpoints in these two methods to see how things work.
|
|
|
|
|
Exceter wrote:
when I press the OK Button I want to check if there are any empty edit boxes, and if there are, not to closing the dialog box go to that edit box?
Do not allow the OK button to be clicked until ALL controls contain valid data. Your users will be very annoyed that the OK button is allowed to be clicked when there is invalid data; this violates the basic principles of GUI design.
|
|
|
|
|
How can I disallow the OK button in tabbed dialog box?
|
|
|
|
|
It was not meant to be "disallowed." See my reply about OnKillActive() .
|
|
|
|
|
Hello,
I've been out of the MFC world for about a year. Do y'all recommend upgrading to VC++.net from 6.0? Reasons?
thanks!
JennyP
|
|
|
|
|
The compiler and standard library are much better.
The IDE is different - some people like it some don't.
If you are just using MFC then I wouldn't bother.
|
|
|
|
|
TomM wrote:
The IDE is different
That's a nice way of putting it. I'd call it "horrible" along with the awful unusable new MSDN viewer.
--Mike--
Ericahist | Homepage | RightClick-Encrypt | 1ClickPicGrabber
Latest art~!@#2rDFA#@(#*%$Rfa39f3fqwf--=
NO CARRIER
|
|
|
|
|
Hi,
I am using a CDateTimeCtrl in my application to display a date picker control.
The problem is that I can't seem to find any method in it to set the date...
When I instantiate it, it comes up with today's date and that's all.
I have a COleDateTime object that I am sure I can use to init the control, but how ?
Thanks,
Shay
|
|
|
|
|
Did you have a look at CDateTimeCtrl::SetTime?
// Afterall, I realized that even my comment lines have bugs
When one cannot invent, one must at least improve (in bed).-My latest fortune cookie
|
|
|
|
|
I have my CEditorView class, which is derived from CRichEditView. I put a breakpoint in my CEditorView::OnDraw function and it was never getting called. Why is OnDraw not getting called?
Reason is, I want to be able to draw the line numbers and a margin, but I can't now that OnDraw is not getting called?
Any help is appreciated!!
|
|
|
|
|
is it virtual? What is the signature of CEditorView::OnDraw ?
|
|
|
|
|
The definition for CEditorView::OnDraw is:
virtual void OnDraw( CDC *pDC );
|
|
|
|
|
Sorry - had to ask . I think problem is the following
void CCtrlView::OnPaint()
{
// this is done to avoid CView::OnPaint
Default();
}
Default - is just a call to default winproc, instead of
CView call to OnDraw(&dc);
|
|
|
|
|
OK, where is CCtrlView? Do I have to call Default to avoid this problem? I appreciate your responses, but I am a little confused about how to fix this with your current reply.
|
|
|
|
|
Looking at the class def for CRichEditView there is no virtual OnDraw() function. I've never used CRichEditView but I assume it is quite different to other CView derived classes.
I suggest you have a look at some of the articles here on CP that use CRichEditView and see how they go about any drawing of there own.
Neville Franks, Author of ED for Windows. Free Trial at www.getsoft.com
|
|
|
|
|
If I modify a static variable in my derived CView class, let's say the text color, how can I make ALL views in my MDI App update to use the new color ? What I want is for "AllDocs" to "UpdateAllViews".
|
|
|
|
|
The point of doc/view and the UpdateAllViews feature is that you're storing the data in the document. When that data is updated, calling UpdateAllViews allerts all views working with that data that it has changed.
Cheers,
Tom Archer
Inside C#, Extending MFC Applications with the .NET Framework
It's better to listen to others than to speak, because I already know what I'm going to say anyway. - friend of Jörgen Sigvardsson
|
|
|
|