|
i would recommend netcat for these issues
very helpful tool!
:wq
|
|
|
|
|
Can you custom draw with in a Listview sdi? I don't see the NM_CUSTDRAW message with in my SDI.
Thanks,
Rob
|
|
|
|
|
I guess you can custom draw a CListView in the same way as you do with CListCtrl s: add ON_NOTIFY_REFLECT(NM_CUSTOMDRAW, OnCustomDraw) to your message map and then declare&define a void CYourListView::OnCustomDraw(NMHDR* pNMHDR, LRESULT* pResult) method.
You might want to take a look at Roger Onslow's article Generalizing Custom-Draw to Other MFC Custom Control Classes which generalizes the custom-draw thing to any kind of class supporting it.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Thanks, that worked just fine.
Rob
|
|
|
|
|
I am currently using Rational Purify, and would like to see what other tools are out there that help detect memory leaks. I am working on a largish library (c++) of code, coupled with a mfc gui that instantiates COM objects, as well as provides user scripting abilities via Active Scripting. In particular, are there any good tools that will enable me to detect addref/release mismatches (in addition to the standard "forgetting" to call "delete" leaks)?
thanks for any/all input...
|
|
|
|
|
I am using both Purify & BoundChecker. They can coexists just fine.
Some leaks better detected by BC (Gui & COm) others much better caught by Purify.
First I check with BoundChecker ( better UI + integration ). Next switch to purify rebuild project to rid of BC code.
My main complain about purify is if code containts InitCommonControlsEx calls purify goes nutz.
Brian
|
|
|
|
|
I've also tried Boundschecker but was underwhelmed by its interface and overall "clunkiness". Perhaps I did not evaluate the software sufficiently. Are there other tools (free or otherwise) that will enable to me to check for COM leaks? The other "major" vendor seems to be Parasoft's insure++ but that appears to be hardly COM aware.
|
|
|
|
|
I'm using Vc7 on WinXP Platform to write Fax application. And i have a problem :
- I'm try to receive Incoming fax, and TAPI 3.0 support this by using Fax Service Extended. And to do this, Fax Service support IFaxSever and IFaxSeverNotify interface. As MSDN July 2001, IFaxServerNotify interface require FaxComex.h and Fxscomex.dll. I found Fxcomex.dll file in Windows system directory, but i can't find FaxComex.h file (i'm using Visual Studio.NET Beta 2).
Where do i get this header file ??? Or i misunderstood something ?
Please help me, b/c i only have MSDN document, and it seem to not enough !!!
Waiting for your reply !!!
Thanks in advance !
nvhoang
nvhoang
|
|
|
|
|
I guess you have to download the latest version of Windows Platform SDK. MSDN article Obtaining the Complete SDK tells you how.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
How I can read data from bitmap files using opengl? I need to construct a 3D image from a series of 2D slices of that image which are located in bitmap files.
|
|
|
|
|
I may be missing your goal here but I do not see OpenGl as an issue. Just read the bitmap image with anycode you are comfortable with. I do not do much with bitmaps but did look at Davide Pizzolato's code http://www.codeproject.com/bitmap/cximage.asp and feel that I could use it to do handle basic chores. There are many more samples in the http://www.codeproject.com/bitmap/ bitmaps and paletts section. If your slices a lines you will need a schem to create the lines from the points found.
|
|
|
|
|
Hi,
I'm looking for a way to produce a program that will allow the user to store records of particular things they want, but they initially choose what type of data they want to store for the records.
For example, if the user wants to store loads of records consisting of three string types, all the program would need to store are three CStrings (or whatever).
If they want to store say two strings, two true and falses and a number, the program would need to be able to store two CStrings, two BOOLs and an int.
Basically it would be like a custom database, but the problem I've got with it is setting up how the storage would work in an array and saving to file.
At present, I've got 12 fields available (4 strings, 4 BOOLs and 4 ints) and the user can tick or untick them if they want them or not. All fields are stored.
But not only is this wasteful in terms of storage and memory in terms of the fields not being used, but it doesn't give the user as much control as I want to.
I know using an existing database engine would be a lot easier, but has anyone got any ideas or pointers as to how to go about creating a custom one?
Many thanks,
Peter Pearson
|
|
|
|
|
How would I go about making certain labels in my dialog blue, and when you click on them it takes you to a web page? I can't use the MFC class (just using straight Win32), and I can't get the WTL CHyperLink class to work
|
|
|
|
|
The WTL class should work, what problems are your having?
|
|
|
|
|
The ATL declarations in stdafx.h:
// the following lines are required for ATL support
#include "atlbase.h"
extern CComModule _Module;
//#include "atlcom.h"
#include "atlapp.h"
#include "atlwin.h"
#include "atlctrls.h"
#include "shellapi.h"
#include "atlctrlx.h"
The usage of CHyperLink:
CHyperLink MyLink;
// Mesage handler for about box.
LRESULT CALLBACK About(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
{
switch (message)
{
case WM_INITDIALOG:
MyLink.SubclassWindow(GetDlgItem(hDlg,IDC_MYEMAIL));
return TRUE;
The error:
C:\WINDOWS\Desktop\WP\WulframPoller.cpp(1173) : warning C4003: not enough actual parameters for macro 'SubclassWindow'
C:\WINDOWS\Desktop\WP\WulframPoller.cpp(1173) : error C2059: syntax error : '('
|
|
|
|
|
Is it possible to make a tabbed property sheet, using non-MFC Win32? If so, how?
|
|
|
|
|
Yes.
InitCommonControls();
hwndTab = CreateWindow (WC_TABCONTROL, "",
WS_CHILD | WS_CLIPSIBLINGS | WS_VISIBLE,
0, 0, rcClient.right, rcClient.bottom,
hwndParent, NULL, g_hinst, NULL); Note that a tab control is not a property sheet. An MFC property sheet contains a tab control (and property pages).
/ravi
"There is always one more bug..."
ravib@ravib.com
http://www.ravib.com
|
|
|
|
|
How would I make the tab control cycle between different dialog templates?
|
|
|
|
|
By selectively showing/hiding modeless dialogs (based on the different templates) depending on the currently selected tab. It's not impossible, but non-trivial. MFC's CPropertySheet makes this easy.
/ravi
"There is always one more bug..."
ravib@ravib.com
http://www.ravib.com
|
|
|
|
|
Unless I can find an example, I think doing it that way would be too difficult for me
|
|
|
|
|
Even if you find an example, it's a lot more work and is much harder to maintain. I would much prefer to use MFC.
/ravi
"There is always one more bug..."
ravib@ravib.com
http://www.ravib.com
|
|
|
|
|
I'm using NT with the latest service packs (both NT and Visual Studio).
Anyone else noticed this? According to MSDN, GetFileTitle() is supposed to return just the filename without the extension. If you open "wankitywank.txt" and then call GetFileTitle(), it should spit out "wankitywank". It even says so explicitly with an example (not the same filename )
Trouble is, that's not what it does. GetFileTitle() returns the same as GetFileName(). Why are they lying to me?!
CFile f;
f.Open("someexistingfile.txt", CFile::modeRead);
cout << (LPCTSTR) f.GetFileTitle() << endl;
cout << (LPCTSTR) f.GetFileName() << endl;
J
|
|
|
|
|
|
Great. That code is no good for me, but now I know that when I religiously uncheck "Hide file extensions for know file types" in explorer after every re-install, I control GetFileTitle().
Thanks a bunch. But man, all I wanted was a quick access method that would give me the filename WITHOUT the extension. You'd think MFC could handle this...
J
|
|
|
|
|
Quit complaining at Microsoft for making a function that does what it's supposed to. It would take all of about 2 seconds for you to write your own.
CString strFilename="MyDOcumenttxt";
CString strTitle;
int nPos;
strTitle= ((nPos=strFilename.Find('.')) != -1) ? strFilename.Left(nPos) : strFilename;
Sorry to dissapoint you all with my lack of a witty or poignant signature.
|
|
|
|