|
Creating toolbars in dialogs is same as in normal frame windows, except that you might want to resize the dialog to accodmodate the toolbar. Alternatively you can leave enough space on top when you add your controls.
Nish
The posting stats are now in PDF:-
http://www.busterboy.org/codeproject/
Feel free to make your comments.
Updated - May 04th, Saturday
|
|
|
|
|
I draw an ellipse but it fill by CBrush, help me how to not fill it.
Thanks!!!
|
|
|
|
|
Use CPen instead of using CBrush.
Mazy
"The path you tread is narrow and the drop is shear and very high,
The ravens all are watching from a vantage point near by,
Apprehension creeping like a choo-train uo your spine,
Will the tightrope reach the end;will the final cuplet rhyme?"Cymbaline-Pink Floyd
|
|
|
|
|
DrawEllipse instead of FillEllipse, or set the brush to be a null brush ( which is not the same as NULL ) so that it is transparent.
Christian
The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
And you don't spend much time with the opposite sex working day and night, unless the pizza delivery person happens to be young, cute, single and female. I can assure you, I've consumed more than a programmer's allotment of pizza, and these conditions have never aligned. - Christopher Duncan - 18/04/2002
|
|
|
|
|
...
<code>pDC->SelectStockObject(NULL_BRUSH);</code>
pDC->Ellipse(...);
...
Best regards,
Eugene Pustovoyt
|
|
|
|
|
That's almost right, except does SelectStockOBject manage GDI resources better than SelectObject, or will it leak ?
Christian
The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
And you don't spend much time with the opposite sex working day and night, unless the pizza delivery person happens to be young, cute, single and female. I can assure you, I've consumed more than a programmer's allotment of pizza, and these conditions have never aligned. - Christopher Duncan - 18/04/2002
|
|
|
|
|
How Do I send a window message to another window that I have no source or control over to maximize?
Here is what I have so far.
In PretranslateMessage I
catch the F10 key and
BOOL CTestCapTabDlg::PreTranslateMessage(MSG* pMsg)
{
BOOL bMsgHandled = FALSE;
switch (pMsg->message)
{
case WM_KEYDOWN:
{
switch (pMsg->wParam)
{
case VK_F10:
// It is easy to substitute another key here but should I use SendMessage(WM_MAXIMIZE,...) to send through the pump? break;
I just want to send a meesage to all open windows to maximize.
ENUM windows I understand but I do not know the names or titles (TITLEBAR) captions of the open windows and don't need this information.
Just a plain message to the pump to maximize everything that is open, and has the cap. to maximize.
Best Wishes,
Baldwin
|
|
|
|
|
Baldwin wrote:
How Do I send a window message to another window that I have no source or control over to maximize?
Send a WM_SYSCOMMAND message and set the wParam to SC_MAXIMIZE
Nish
The posting stats are now in PDF:-
http://www.busterboy.org/codeproject/
Feel free to make your comments.
Updated - May 04th, Saturday
|
|
|
|
|
OK thanks,
I am still not making myself clear, this is a known (issue) bug in my body's OS.
If I set a system-wide hot key to maximize all open windows capable of being maximized....
Should I
1. BOOL bx = RegisterHotKey(NULL, 0x5A,MOD_ALT,VK_F10 );
2. Capture the Hotkey by
BOOL CSMaxMesDlg::PreTranslateMessage(MSG* pMsg)
{
BOOL bMsgHandled = FALSE;
switch (pMsg->message)
{
case WM_KEYDOWN:
{
switch (pMsg->wParam)....
3. Send the Message as you described.
or should I
1. BOOL bx = RegisterHotKey(NULL, 0x5A,MOD_ALT,VK_F10 );
2. Use the callback proc
LRESULT CALLBACK WindowProc(
HWND hwnd, // handle to window
UINT uMsg, // WM_SYSCOMMAND
WPARAM wParam, // system command type
LPARAM lParam // horizontal and vertical position
);
and send the message within the callback itself?
Best Wishes,
Baldwin
|
|
|
|
|
I have a program that has two views . rich edit view and edit view . I have done some syntax coloring in the rich edit view. But the probelm is that when I use the keys ctrl-x and ctrl-v in edit view the program gives debug assertion failure sighting some error in the viewrich.cpp
Samir Sood
|
|
|
|
|
SamirSood wrote:
have done some syntax coloring in the rich edit view.
Be careful: that can get real slow, real fast!
To better find the problem with your ASSERT, take a good look at (or better yet, post a snippet here) both the call stack and the failed expression.
Peace!
-=- James.
"Fat people are hard to kidnap."
(Try Check Favorites Sometime!)
|
|
|
|
|
Hi
I have a large MFC program and now would like to actually run it as a dyamically loaded dll from a launcher app.
How would I go about converting my MFC app to a dll?????
(this is opposed to writing a dll that would launch my app)
Thanks
(fyi - the mfc program is a 3d viewer that gets sent real-time simulation data to update the senario, I want the program to load when I start a simulation)
---
|
|
|
|
|
Hey,
I get this error in "Visual C++ 6.0" telling me it
can't find a .h file.
How do I tell^H^H^H^H show Visual C++ 6.0 where
to look for header files?
example)
#include
error cannot find "dir/header.h"
Normal I would a -I to a Makefile but I am going
Visual
Thanks!
|
|
|
|
|
The fact that you lost your #include to html parsing means you used < > instead of quotes. You should use quotes for your own headers, and you can include a path, virtual or absolute, in the #include.
Christian
The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
And you don't spend much time with the opposite sex working day and night, unless the pizza delivery person happens to be young, cute, single and female. I can assure you, I've consumed more than a programmer's allotment of pizza, and these conditions have never aligned. - Christopher Duncan - 18/04/2002
|
|
|
|
|
Go to Tools->Options and find the Directories tab. There you can add paths to includes and libs
Philip Patrick
Web-site: www.stpworks.com
"Two beer or not two beer?" Shakesbeer
Need Web-based database administrator? You already have it!
|
|
|
|
|
Hi there,
Is it possible to remove the sunken border of a web browser control and also the default scrollbar that appears when one loads a document, basically what I am trying to do is create a dialog that is actually powered by dynamic HTML but looks exactly like normal dialogs.. I also cant figure out how to change the hand/text cursors to pointer ones.
Thanks.
|
|
|
|
|
Just for fun (yes I'm sadistic) I set the warning level in VC6 to 4 and I got a butt load of warnings. Most of the warnings are from VC6's header files such as xmemory, xlocale, streambuf, etc.
What's the best way to set a warning level of 4 only on my .cpp/.h files?
Todd Smith
|
|
|
|
|
The STL headers will give tons of warnings at level 4. I think the most-often-seen one is about a debug symbol being longer than 255 characters. Just disable that one and things should go smoother.
--Mike--
Buy me stuff! (Link fixed now)
Like the Google toolbar? Then check out UltraBar, with more features & customizable search engines!
My really out-of-date homepage
Big fan of Alyson Hannigan and Jamie Salé.
Sonork - 100.10414 AcidHelm
|
|
|
|
|
Michael Dunn wrote:
debug symbol being longer than 255 characters.
Ok How do you turn of that particular error?
|
|
|
|
|
Suppose that there are two warnings:
Warning C999901 : Failure destructor generation.
Warning C999902 : Cross reference to destructor.
And you don't want to see them.
You use this to disable the specific 2 warnings:
#pragma warning(disable : 999901 999902)
Maxwell Chen
People say "No news is good news". Then, no code is good code!?
|
|
|
|
|
|
When i'm feeling masochistic, i'll wrap just my CPP code with:
#pragma warning(push,4)
and
#pragma warning(pop)
Anything in-between those lines will be compiled with warning level 4, everything else at the default warning level.
--------
Higher education helps your earning capacity. Ask any college professor. --Shog9 --
|
|
|
|
|
Do you need the pop? Will the pragma carry over to the next cpp module?
|
|
|
|
|
Anonymous wrote:
Do you need the pop? Will the pragma carry over to the next cpp module?
No, but if you don't include the whole file, then it's useful; I'll usually not write new code initially at level 4, instead i'll compile w/ level 4 as a final step (along with documentation ).
--------
Higher education helps your earning capacity. Ask any college professor. --Shog9 --
|
|
|
|
|
In order to only have to do it once, do something like this in your StdAfx.h (you are, of course, using PCH correctly...?):
<br />
#pragma warning( push, 1 )<br />
#include <vector><br />
#include <deque><br />
#include <...whatever...><br />
#pragma warning( pop )<br />
That will force the preprocessor & compiler into Warning Level 1 only for the processing of the specified #include s, which should nail most of the warnings.
Peace!
-=- James.
"Fat people are hard to kidnap."
(Try Check Favorites Sometime!)
|
|
|
|