|
You haven´t understood my question. I don´t look for the class CSliderCtrl but for the class CSlider which is the base for the activeX-Control MS Slider Version 6.0 which you can integrate in Visual C++ by calling new controls from the COM-Interface.
...And about the birds: To decide to fly off is one step before doing it, so they still sit there on the fence with the other birds.
|
|
|
|
|
Indeed I assumed you meant CSliderCtrl. Oops. However, a quick test reveals that when you insert the Microsoft Slider Control control into a project (using Components and Controls Gallery), the files Slider.h and Slider.cpp are created and added to the project. There's nothing more to do, other than adding the control itself from the Controls dialog onto your dialog template.
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
Dear All,
I am developing an application using MFC VC++ Version 6.0 for Windows 2000.
I need to execute a routine in my application once the windows programs are just loaded.
(I mean to say that once the windows is rebooted or logged in is completed.)
Can anybody please tell any such event or any alternative way out to get such notification.
I hope my question is clear.
Thanks,
Rohit
|
|
|
|
|
There are several solutions. One solution is to simple add the program's path in the register under "Run." Another solution is to design the application as a service.
Kuphryn
|
|
|
|
|
I am sorry if this issue has already been raised but I was not able to find the way to find it.
I am trying to make a small game (Non DirectX) in which there is a lot of motion and hence re-drawing on the client area. Clearing and redrawing is creating a lot of flicker. I have already set WM_ERASEBKGRND to not redraw but still cannot get the motion to be as smooth as Pinball or Solitaire(when you move cards around).
How can I program to have flicker free redrawing motion.
|
|
|
|
|
If you are worried about repeating questions, why not search for "flicker" in the handy search box, first?
|
|
|
|
|
Hi,
What about drawing the image in an area of memory off screen and then copy it across onto the screen using BitBlt? I've done this before and works really well because the BitBlt function is very fast so you don't see the flicker.
I looked through my code but I haven't got a nice simple example, however its basically like this:-
CDC memDC;<br />
memDC.CreateCompatibleDC(pDC);<br />
<br />
CBitmap memBitmap;<br />
memBitmap.CreateCompatibleBitmap(pDC, nWidth, nHeight);<br />
<br />
memDC.SelectObject(&memBitmap);<br />
<br />
<br />
pDC->BitBlt(<br />
nLeft,<br />
nTop,<br />
nRight,<br />
nBottom,<br />
&memDC,<br />
0,<br />
0,<br />
SRCCOPY);
Hope that is some help, cheers
Ali
|
|
|
|
|
hi,
how to create crystal report control in runtime.
thanks in advance.
|
|
|
|
|
Dear Friends,
I have an RGB value. I want to convert it into long how ca i do so ?? Is there any macro or function available ???
|
|
|
|
|
Rather brutal way:
long lColor = *(long*)(&rgb); That's if you want to stuff it into an arbitrary variable.
If it needs to be a particular format for serialization, or working with Device Independent Bitmaps in memory (for example), copy the bytes.
|
|
|
|
|
RGB rgbGreen = RGB(0, 255, 0);<br />
long lColor = (long) rgbGreen;
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
Are you sure you don't want unsigned long? Why would you need a signed integer to store RGB information?
|
|
|
|
|
I think there's good chance that an RGB value is larger than the range that a signed long could handle.
|
|
|
|
|
Hi all,
i am using OnNCPaint() method to draw my own title bar, in order to give it a closing button, i am using this line of code:
dc.DrawFrameControl(closeRect,DFC_CAPTION,DFCS_ADJUSTRECT | DFCS_CAPTIONCLOSE);
where dc is the Device Context handler, and closeRect is the rectangle for the closing button.......
I can see the new title bar and closing button also. the problem is , i want to have a closing button as if my dialog is a tool window this means much smaller closing button.........
can any1 help me to fix?
thanks in advanced,
Yaron
Ask not what your application can do for you,
Ask what you can do for your application
|
|
|
|
|
I have a "handicapped" friend. He is using a graphical windows program. He type with one hand, and with one finger. This program has a functionality, by which he must press the Shift key and simultaneously use the mouse.
He cannot do that.
I like to write him a simple VC++ program: A dialogbased application with one button. If he turn on this button, that makes the Shift key down, if he turn off this button that releases the Shift key.
My ask:
Which MFC or windows function should I use?
I think: SendMessage(VK_SHIFT,????,?????)
Thank you!
(Exuse me for my english. I speak better Hungarian, or German.)
Pali
|
|
|
|
|
I point you to the Windows StickyKeys[^] function.
IIRC, StickyKeys works at the driver level and is implemented as a keyboard filter driver.
|
|
|
|
|
Hi!
I've created a HBITMAP from a Jpeg image (using Chris Losinger's JpegFile: http://www.smalleranimals.com/jpegfile.htm[^]).
When I ::BitBlt it the result is ok, but when I ::StrecthBlt it, the result is a skewed image.
Roughly, it looks like this:
+--------------------+
|\ |
| \ |
| \ |
| \ |
| \ |
+--------------------+ I'll try to explain what I see: It seems as each data line is longer than the specified image width, so that every line continues on the next, which results in a skewed image with a "diagonal" where the right edge should be. Understand?
Using JpegFile, I do this:
- Load the Jpeg file into a RGB buffer.
- Switch from RGB to BGR.
- Make the BGR buffer
DWORD aligned.
- Create the
HBITMAP with ::CreateBitmap (the DWORD aligned BGR buffer).
See anything crazy in that scheme? Any other ideas?
As I said ::BitBlt works with the HBITMAP , but ::StretchBlt doesn't.
Thanks for any input!
--
Human beings, who are almost unique in having the ability to learn from the experience of others, are also remarkable for their apparent disinclination to do so. (Douglas Adams)
|
|
|
|
|
|
Chris Losinger wrote:
CreateDIBSection
Yes! Thanks! Creating a DIB section solved it.
The new scheme is:
- Read the Jpeg to a RGB buffer.
- Swap RGB -> BGR.
- DWORD align.
- Vertically flip.
- CreateDIBSection.
- memcpy the flipped buffer to the DIB section.
- ::StretchBlt().
Tada!
--
Human beings, who are almost unique in having the ability to learn from the experience of others, are also remarkable for their apparent disinclination to do so. (Douglas Adams)
|
|
|
|
|
You must find the word boundary which is ususully 32 bit.
|
|
|
|
|
You must do this on a scanline by scanline basis. You must not be doing this.
|
|
|
|
|
Surely, you must mean 16 bits for a WORD.
--
Human beings, who are almost unique in having the ability to learn from the experience of others, are also remarkable for their apparent disinclination to do so. (Douglas Adams)
|
|
|
|
|
A computer word can be any size, it is the unit with which a the system operates. Actually DWORD should be a word, because we are all using 32 bit systems now, but it is a strange holdover from 16-bit days of windows.
|
|
|
|
|
My programs is getting slowed down and the GUI get updates slow IF another average heavy work is running on my computer.. ( like compiling something )
No other program is getting slow. And my program is at normal priority like the other program. It gets a little better if I raise it but I shouldn’t have to (I think).
The strange think is that this only happens if I run the version of my program that is compiled with VS2003. If I run the version I compiled with VS6 everything works fine.
I Also get some freeze up when I start a background thread ( worker thread ) and this thread is doing a lot of work and is sending messages to main thread to update a progress bar and stuff. This totally freezes up the application to until the thread is done.
And this also works fine in VS6. And only happens to the VS2003 compiled version.
So the question is.
Does anyone know what makes this happen?
Does anyone know if any difference from the MFC in VS6 to VS2003 that require some redesign or something?
Or do I have to go back to VS6 for MFC development
|
|
|
|
|
Is it possible to set the default printer as a PDF printer....are there any APIs which support commands to do the conversion
Maverick
|
|
|
|