|
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!)
|
|
|
|
|
I am working with C++ and MSAccess trough ODBC and I have a ligistics nightmare when it comes to releasing new versions of my databases. Right now, If I make a change to my database structure I have to write a little patch program that will add, remove, or edit columns or tables in the database and these things are hardcoded and can only work for specific versions.
I was wondering if anyone knows of any utility programs that will let me make the changes over multiple versions. Basically, if the user has version 1.0 and wants to upgrade to 3.0 the utility will then change the existing database appropriatly. Or a user wants to go from 2.0 to 3.0 and so forth.
So a utility that will let me store what needs to changed in the database from version to version, and make these changes on upgrade. That way, the users don't lose any data and the program won't crash from trying to access a column that was not in the older versions.
Thanks in advance,
I also posted this on the Database board, but this moves faster, sorry if it is in the wrong spot
***********************
Tony Fontenot
Recreational Solutions
tony@recsolutions.com
***********************
|
|
|
|
|
I tried to install the Soap Toolkit 2.0, but it fails to register SOAPISAP.dll on install. No sample runs cause it can't create the COM objects it needs. I can't register any of the DLLs manually. I run WinXP and VS .NET.
Any ideas ?
Thanks
|
|
|
|
|
I just loaded Visual C++.net along with the existing Visual C++ 6.0. Has anyone got these two together on one machine. I seem to be having strange results on programs that worked fine before on C++ 6.0. I am running XP and after loading Visual C++.net a week ago I had to redo my whole machine as everything became unstable.
Also what's with the 1 hour loading time and 2gbyte size for the new compiler. So far it's feeling like a big step backwards.
|
|
|
|
|
|
Make sure your system INCLUDE, LIB and PATH environment variables don't mess up.
|
|
|
|
|
Hey,
I'm not sure if this is actually a CString problem or not. I'm working on a program that reads a log file, converts it to an HTML table, then saves it as a user defined HTML file. When I first started I hardcoded it to save as output.html. Then I added a little edit control that lets you define the file. This is the code I use for it:
void CMFC2Dlg::OnSave()
{
CStdioFile File;
CString FileName;
GetDlgItemText(IDC_OUTNAME, FileName);
if(File.Open(FileName, CFile::modeCreate | CFile::modeNoTruncate | CFile::modeWrite | CFile::typeText))
File.WriteString(LogConvert);
else
MessageBox("Could not write file", FileName, MB_OK);
}
I thought it might have got stuck in my ram somewhere, but I restarted my computer and it still doesn't work... I'm clueless.
Any help is very much appreciated, thanks in advance!
|
|
|
|
|
Have you tried stepping through the code to see where it fails ? I won't bother nagging you about how you should use proper C++ streams
Christian
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
|
|
|
|