|
lol
What I mean with trace is: If you click on an image, you can somehow select that image or determine how it looks like...
A student knows little about a lot.
A professor knows a lot about little.
I know everything about nothing.
|
|
|
|
|
"and now i am just stopped on thinking of dragging"
That was the reason why I said "lol"
Mandalay wrote:
(in this case you are monkey-sh*t)
I'll take this as serious offence and you won't get any 'hints' from me anymore.
A student knows little about a lot.
A professor knows a lot about little.
I know everything about nothing.
|
|
|
|
|
Mandalay wrote:
(in this case you are monkey-sh*t)
With that kind of language you won't get any help around here.
// 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 am trying to create a bitmap during runtime. I would like to use an RGB color to create a bitmap (15x16) of just that color.
I tryed this code:
HDC dc= CreateCompatibleDC(NULL);
BITMAPINFO i;
ZeroMemory( &i.bmiHeader, sizeof(BITMAPINFOHEADER) );
i.bmiHeader.biWidth=16; // Set size you need
i.bmiHeader.biHeight=15; // Set size you need
i.bmiHeader.biPlanes=1;
i.bmiHeader.biBitCount=32; // Can be 8, 16, 32 bpp or other number
i.bmiHeader.biSize=sizeof(BITMAPINFOHEADER);
VOID *pvBits;
HBITMAP hbmp= CreateDIBSection( dc,
&i,
DIB_RGB_COLORS,
&pvBits,
NULL,
0 );
HBITMAP oldBmp= (HBITMAP) SelectObject(dc,hbmp);
RECT rect= {0,0,16,15};
FillRect(dc, &rect, (HBRUSH) Currentcolor);
but i got always black rectangle (not color).
Please help me.
|
|
|
|
|
You must create compatible DC from the real context.
Just add next lines
HDC hdc= ::GetDC(NULL);
HDC dc = ::CreateCompatibleDC(hdc);
<span class=cpp-comment>
::DeleteDC(dc);
::ReleaseDC(hdc);
That's all
Best regards,
Eugene Pustovoyt
|
|
|
|
|
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 );
|
|
|
|