|
I want to use MSDEV as the editor for a rather lame, but other necesary IDE we are using. The options I've tried so far are:
1) I can pass the "msdev <filename>" as the command line, but it starts up multiple instances of developer studio.
2) I can pass just the name of the file, and if an instance is already running it uses that
However, I need to also pass an optional line number. It seems my only choice is to use a macro, but that leads back to the problems with 1.
Any suggestions?
|
|
|
|
|
You could write a quick little application that sends DDE commands to MSDEV.
-Ben
---------
On the topic of code with no error handling -- It's not poor coding, it's "optimistic"
|
|
|
|
|
Hey Gang,
It has been a very long week and my brain is totally fried.
I'm trying to use the function CoSetProxyBlanket and getting a return of "undeclared identifier", however, CoCreateInstance operates perfectly and they are both defined in objbase.h.
What did I forget?
|
|
|
|
|
Hey Rhoam.
Yeah, it was a rather long week - but the solution is a quite simple : add this definition into stdafx.h #define _WIN32_DCOM and enjoy.
Best regards,
-----------
Igor Soukhov (Brainbench/Tekmetrics ID:50759)
igor_soukhov@yahoo.com | ICQ:57404554 | http://siv.da.ru
|
|
|
|
|
DOH! I knew it would be simple.
Thank you very much for your assistance. Think I'll take the rest of the weekend off and get some sleep!
Rhoam
|
|
|
|
|
Can anyone tell me how to test the memory leak......this test can tell me where the leak is.....
Also....i have one more question.......When i write a WinNT program and want to transfer to Win9X, do i have to do some modification to the program? If yes....what? Because....seems liked always has problem if i'm doing that.....
Thanks
|
|
|
|
|
Question 1: Boundschecker will help you find memory leaks, but it's quite expensive. There are some alternative wrappers around that basically wrap 'new' and 'delete'. First of all, do you realise if you run in debug mode, when you exit VC tells you the locations of memory leaks ? It sometimes gets it wrong, but may be able to help you.
Question 2: There are a number of issues. First is Unicode, which I don't know enough about, so I'll leave it to someone more knowledgeable. I know that a program not compiled for Unicode running under NT converts all strings to Unicode as it passes them on, but I'm not sure about vice versa, having read Richter four times and still understanding about 1/10th of it ( largely because I've not had opportunity to *work* with the stuff in there ). Second, there are commands certainly in GDI that NT supports and W95 does not. I'm not sure if W98 supports them all, but I don't think so. I'd venture a guess that this would be true in other areas as well, and if you look in the MSDN, some commands accept different parameters in different OS, etc. However, having said that, by steering clear of such commands and writing my own, I've had no problems running my paint program under W95 W98 WME NT4 and NT5, so I wouldn't have thought it was a major issue.
What problems are you having ?
Christian
#include "std_disclaimer.h"
People who love sausage and respect the law should never watch either one being made.
The things that come to those who wait are usually the things left by those who got there first.
|
|
|
|
|
BoundsChecker is indeed afaik the best tool for finding memory leaks (and not only). If You cannot afford it, maybe try the evaluation version - there should be some.
In MFC exist several functions which may help You. See for example:
AfxCheckMemory, AfxEnableMemoryTracking, AfxSetAllocHook...
Though I still recommend You BoundsChecker
|
|
|
|
|
I didn't suggest the evalutation of BoundsChecker because getting one is like pulling teeth. Fill in a form, pass a phone interview, download the demo, get call after call from reps who know the lingo but wouldn't know how to write a hello world program....
Christian
#include "std_disclaimer.h"
People who love sausage and respect the law should never watch either one being made.
The things that come to those who wait are usually the things left by those who got there first.
|
|
|
|
|
When using the SetWindowPos the first parameter a const CWnd*.... so.. HWND_TOPMOST is not able!
so I checked the MSDN library and then I saw a nother constant to send... wndTopMost...
BUT damn VC++.... the MSDN library says SetWindowPos has a const CWnd* parameter but when using the
wndTopMost the compiler error is cannot convert parameter one from const CWnd to const CWnd* !!
HEEELP!!!
I know that sounds crazy but thats it!!
/*
BETA
*/
|
|
|
|
|
You should use &wndTopMost and make sure that SWP_NOZORDER flag is not set.
Does it help?
Farhan Noor Qureshi
|
|
|
|
|
have you tried &wndTopMost instead just wndTopMost?
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|
|
&wndTopMost. You'll find that & converts a variable to a pointer to that variable. * dereferences a pointer ( converts back )
Christian
#include "std_disclaimer.h"
People who love sausage and respect the law should never watch either one being made.
The things that come to those who wait are usually the things left by those who got there first.
|
|
|
|
|
I want to set the font in a MDI-application. So I need a command like "UpdateAllViewsInAllDocuments", but that doesn't exist.
Any suggestions?
Thanks
Friedrich
|
|
|
|
|
You could use:
CWinApp * pApp = AfxGetApp ();
ASSERT_VALID ( pApp );
POSITION posTemplate = pApp->GetFirstDocTemplatePosition ();
while ( NULL != posTemplate ) {
CDocTemplate * pTemplate = pApp->GetNextDocTemplate ( posTemplate );
ASSERT_VALID ( pTemplate );
ASSERT_KINDOF ( CDocTemplate, pTemplate );
POSITION posDocument = pTemplate->GetFirstDocPosition ();
while ( NULL != posDocument ) {
CDocument * pDocument = pTemplate->GetNextDoc ( posDocument );
ASSERT_VALID ( pDocument );
pDocument->UpdateAllViews ( NULL );
}
}
-Ben
---------
On the topic of code with no error handling -- It's not poor coding, it's "optimistic"
|
|
|
|
|
c:\my documents\visual c++ work\lu\crc.cpp(165) : fatal error C1010: unexpected end of file while looking for precompiled header directive
I've never seen this one before, can't seem to figure it out. The following is a link to the error description on msdn:
http://msdn.microsoft.com/library/devprods/vs6/visualc/vccore/c1010.htm
It doesn't help me any, got and ideas?
|
|
|
|
|
#include <stdafx.h>
or
Project -> Settings -> C/C++ tab -> Category "Precompiled Headers" -> Select "Not using precompiled headers"
---
Multitasking: Screwing up several things at once.
|
|
|
|
|
Although it probably works as shown the stdafx.h should go in quotation marks.
|
|
|
|
|
If you use quotation marks you should lose the less than/greater than signs.
Christian
#include "std_disclaimer.h"
People who love sausage and respect the law should never watch either one being made.
The things that come to those who wait are usually the things left by those who got there first.
|
|
|
|
|
Hi everyone,
I have an explorer like app in which File with their icons are displayed
using the system Image List. This works fine, however, for certain
files I want to display some CUSTOM ICONS. I had this working under WIn98
(because it returns the entire system image list when creating it, so I just made a copy of that and added the custom ones to the end) however, under win2K i can't get it to work! Any ideas on how I can achieve this?
I'd prefer to NOT 're-register' these filetypes in the registry.
and going through every possible file on the system to 'populate' the list
seems a bit 'slow'
Thanks!
Stefan
|
|
|
|
|
Hi,,
I like to write a help file for my application,,
does anyone know how can i go about that?
Thanks
Ehsan Behboudi
|
|
|
|
|
For creating help file, you must create file by RTF format, it have some rules for design ...
Then, in vc++ is the execute program for compile the RTF file to help file ...
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
salam hadi
thanks for your reply
I didn't really understand, what is RTF format,,
is there any website that i can check it out and learn more about it..
Ehsan
Ehsan Behboudi
|
|
|
|
|
You can find tons of info on MSDN
MSDN Web:
http://msdn.microsoft.com/library/devprods/vs6/visualc/vccore/_core_help.3a_.context.2d.sensitive_help_overview.htm
MSDN CD:
mk:@MSITStore:F:\Program%20Files\Microsoft%20Visual%20Studio\MSDN\2001APR\1033\vccore.chm::/html/_core_help.3a_.context.2d.sensitive_help_overview.htm
Not sure if the CD link is the same on yours but the MS web site one will work.
-Ben
---------
On the topic of code with no error handling -- It's not poor coding, it's "optimistic"
|
|
|
|
|
How do I make the enter key stay in the rich edit and and not cause the ok button from being activated and dissmising the properties sheet.
|
|
|
|