|
Hi,
Thanks, for the answer
Processing WM_LBUTTONDOWN in a parental class is a special case, I wanted that edit itself was destroyed at click of the mouse outside of it
Best regards,
Eugene Pustovoyt
|
|
|
|
|
How can I convert GDI region object to GDI+ path object ? Any clue.
Sanju
The wizard
|
|
|
|
|
The only thing that I know of is to decompose a region into all of the separate rectangles it contains, further decompose the rectangle into its points, and find the concave hull that the resulting polygon creates. The only problem with this is you will have to figure out another way to find the holes in the region.
Build a man a fire, and he will be warm for a day Light a man on fire, and he will be warm for the rest of his life!
|
|
|
|
|
When I draw a graph in the CView every time, the available memory decrease accordingly. How to release the memory of the previous graph?
|
|
|
|
|
I draw graph in the CView,and I have overloaded OnEraseBkgnd and maken it return TRUE.But, when certain dialog move upon the CView, it flash very much.My code is following:
void CMyView::OnDraw(CDC* pDC)
{
CRect rect;
GetClientRect(&rect);
pDC->FillSolidRect(rect,ManExp.m_BackGroundColor);
}
However,when a dialog move on the frame of a window,the frame don't flash,why?
How to make it not flash?
|
|
|
|
|
You're must create the context device in the memory.
Fill him, and then bitblt him to the CDC.
Best regards,
Eugene Pustovoyt
|
|
|
|
|
I have added a toolbar to a dialog box and I wanted to 'Enable/Disable' and 'push in/pop out' the buttons to show the current status.
I have achieved this in the past within the Main Frame toolbar using a user interface (UI) handler function, but although I can add this function it never seems to get called.
Is this because the toolbar is attached to the dialog box, or am I doing something stupid?
Any help appreciated, thanks
ali p
|
|
|
|
|
ali p wrote:
Is this because the toolbar is attached to the dialog box
Yes. OnUpdateCmdUI() will not be called for the toolbar. You can call it yourself if you really want to do it that way, or you can just use GetToolBarCtrl().EnableButton() , GetToolBarCtrl().CheckButton() , etc.
--------
When will I realize that this skin I'm in
Hey, it isn't mine
And when will the kill be too much meat for me to hide on... -- Blind Melon, Skinned
|
|
|
|
|
Thanks, I gave this a go and got it working. Great.
ali p
|
|
|
|
|
Hi,
I've written a small code (the one given in
MSDN) for capturing video from a camera...
The problem is that i can capture it well..
but when i press the stop button.. the
Camera is not switched off..
Can anybody tell me why???
I am using DirectX (DirectShow)
Please help
Sameer
|
|
|
|
|
Hi everyone. I know this is a bit of a beginner question, but I never had to do this task before and am a bit confused as the best way to do it. I have a button on a dialog, which I want to place a bitmap on (specifically, the little printer bitmap under the graphics/bitmaps directory of VC++). I can either make a CButton object, and do it this way, or use CBitmapButton. I want the button to work like a toolbar button (that is, in the way it looks, and the fact only 1 bitmap is used for all button states, not the up to 4 that CBitmapButton uses).
I was going to use a CButton and place a bitmap on it, but I couldn't figure out how to get my bitmap (which is in the resource file as IDC_BMP_BITMAP) into an HBITMAP parameter, which CButton requires. I tried using CBitmap to get a HBITMAP handle back, but I couldn't quite figure out how to do this. I am sure this is a simple procedure, but it has me stumped tonight Thanks in advance for any help!
|
|
|
|
|
|
I used a class very very useful : CxSkinButton
If you want to have button of every shape and bitmap, try this link and I think you'll be surprised...;)
http://www.codeproject.com/buttonctrl/CxSkinButton.asp
Maybe you could tell me something too ?...
Actually I'm trying to display more than one bmp at the same location but it doesn't work properly...
I use the SetWindowPos function to place the bitmap and stretch it (or shrink it) to the correct size. It works well for the position and the size but not for the Z-Order (the first is over the second and I want the contrary). Setting the first parameter of the SetWindowPos to '&wndTop' does not change anything.
If you could help me...
Should computing stay as a source of benefit or become like knowledge : free and opened to every one ?...
|
|
|
|
|
... that would work on two keys, public and private, but not like RSA, where message can be encrypted using public key and decrypted using private key. Public key should be able to decrypt message and only private key would be able to encrypt it. I could use RSA and distribute private key, but i think that it is possible to generate public key from private key. Am i wrong?
|
|
|
|
|
In RSA, messages encrypted with private key can be decrypted with the public key, that's how RSA is used for digital signatures.
|
|
|
|
|
Hi.
I often see function parameters requiring a handle to a window. I believe the handle to main fram is m_hWnd. In general, how do you get a handle to a window from main frame to any view including splitters?
Thanks,
Kuphryn
|
|
|
|
|
kuphryn wrote:
how do you get a handle to a window from main frame to any view including splitters?
All CWnd objects will have an m_hWnd which is the underlying window HANDLE.
But to be safe call IsWindow on this handle before trying to do stuff with it, unless you are sure it is a handle to a valid window
Nish
Check out last week's Code Project posting stats presentation from :-
http://www.busterboy.org/codeproject/
Feel free to make your comments.
|
|
|
|
|
Thanks.
You wrote "call IsWindow() on this handle." How do you go about calling IsWindow on a handle? IsWindow() take not parameters and returns a BOOL.
Kuphryn
|
|
|
|
|
kuphryn wrote:
IsWindow() take not parameters
IsWindowThe IsWindow function determines whether the specified window handle identifies an existing window.
BOOL IsWindow(
HWND> hWnd
);
Nish
Check out last week's Code Project posting stats presentation from :-
http://www.busterboy.org/codeproject/
Feel free to make your comments.
|
|
|
|
|
Ahh. Thanks.
In other words, IsWindow() *internally* check m_hWnd to see if it matches that of the current view/window.
Kuphryn
|
|
|
|
|
Actually what it does is to verify that the window handle we have points to a valid window. There might be a situation that a window has closed but we still have a handle to it. In such situations, we must use this function.
Nish
Check out last week's Code Project posting stats presentation from :-
http://www.busterboy.org/codeproject/
Feel free to make your comments.
|
|
|
|
|
i would like to know how to use this function
i tried to do simultaniasly read/write from COM but it didnt work
thanks.
|
|
|
|
|
You have to do the following steps:
1) CreateFile() with FILE_FLAG_OVERLAPPED
2) Create 2 Events by using CreateEvent()
3) Create 2 OVERLAPPED STRUCT and put events (2) in here
4) now use WaitCommEvent(), ReadFile(), WriteFile() with STRUCTS (3) as calling-parameters
That`s it ...
So far ... RockNix///
------------------------------------
www.klangwerker.de
Need some articles about Threading,
Subclassing, Double Buffering ?
Go for it ...
Look out for free Win32
Serial Communication Module
for VC++ or Borland C++ Builder
Visit us on www.klangwerker.de
------------------------------------
|
|
|
|
|
Hi,
Has somebody worked on DirectX.. I have a
problem regarding Video Capture..
I am able to capture video from the Camera but
its like i just want one shot and want to
save it in JPG or BMP.. has somebody worked on
it..
Please help
Sameer
|
|
|
|
|
Could you show your source ?
About capturing video from camera ?
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|