|
No BoundsChecker or Purify at hand? They will give you much better diagnostic information.
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
I don't have an answer to your question. However, I'm curious as to why you can't figure out the source of the memory leak. I mean, usually when DevStudio spews out the memory leaks it also gives you the file and line number where the allocation took place. If you're not getting that, then it's probably because you haven't defined new to DEBUG_NEW at the top of your cpp files, like this:
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
Make sure all your cpp files have this at the top, after your includes. That should clear things up a bit.
Regards,
Alvaro
|
|
|
|
|
Does anyone know of any good sites with Pocket PC / Windows CE code snippets / samples?
Although Code Project is great for most things - it is a little light on specific CE issues.
|
|
|
|
|
I'm trying to save/restore the size and position of multiple views in an MDI.
Here is my dilema in it's simplest form. When I open a new child window by default I call:
CRect rect;
CFrameWnd* pParentFrame = GetParentFrame();
CWnd* pMDIClient = pParentFrame->GetParent();
pMDIClient->GetClientRect(&rect);
pParentFrame->MoveWindow(0,0,450,430);
which sets the size and location of my window. so then I try to save it by calling in the specific view:
GetWindowRect(&rect); but top = 163, bottom = 572, left = 3, right = 551;
and
GetWindowPlacement(&wp); but top = -3, bottom = 406, left = -3, right = 445
I would expect to receive top =0, bottom = 430, left =0, right = 450 since that's where I moved it.
Any ideas? Thank you
|
|
|
|
|
GetWindowRect is returning co-ordinates relative to the screen, and MoveWindow has positioned it relative to the parentframe. Call GetwindowRect and then call pPArentFrame->ScreenToClient to normalise the co-ordinates relative to that window.
Christian
After all, there's nothing wrong with an elite as long as I'm allowed to be part of it!! - Mike Burston Oct 23, 2001
|
|
|
|
|
Am looking into writing a small application to be run on a Pocket PC and I have requirement to stop the user of the Pocket PC use anything other than the application. I.e. I need to stop them getting to the apps like Inbox, the start menu etc.
In the WM_INITDIALOG of my app, I have added the following.
SHDoneButton(this->m_hWnd, SHDB_HIDE);
SHFullScreen(this->m_hWnd, SHFS_HIDETASKBAR | SHFS_HIDESTARTICON);
On running, the application is full screen - but the Start Menu is still there.
My device hasn't got a physical keyboard - If I had one of those would I need to prevent ALT-TABBING as well ?
One suggestion that I've had is that this isn't possible in Pocket PC and I'd have to get Platform Builder out and make my own version of CE - which sounds really scary ? Is this on the right lines ?
All help much appreciated.
|
|
|
|
|
Hi im trying to read a string in that format from a file (with sprintf)
asdf| hello| dee|
if i use (buf1 & buf2 are char[50])
sprintf( filestream, "%s%s",buf1, buf2), in buf1 i get "asdf|" and in buf2 i get "hello|".
But i want to use the "|" as the string delimiter. So i wrote:
sprintf( filestream, "%[^|]%[^|]",buf1, buf2)
With that function, i can only get buf1 correct but i get nothing for buf2.
Anyone has an idea of what is the problem?
thanks
|
|
|
|
|
Your snippet of code is confusing: sprintf will format a string based on your pattern ("%s%s"), and put it in the filestream string.
Surely you're using sscanf?
I'd consider using a combinateion of CString member functions, like CString::Mid and FInd and stuff
Sorry to dissapoint you all with my lack of a witty or poignant signature.
|
|
|
|
|
Sorry, your right! im using fscanf
Thankx for the correction Jon
|
|
|
|
|
I posted an article about parsing CStrings. Check it out here.
To hell with those thin-skinned pillow-biters. - Me, 10/03/2001
|
|
|
|
|
Hi,
Is there any good and fast way to print reports using Visual C++, ... using GDI and printing cannot be very proffesional looking, and add my own code for all the stuff it´s like crazy...
I have thought to use Word Automation, but that mean to have a program not so stable, and very slow... ( I mean if you have an EXE of Word running that is corrupted, then you can not print until you take the task manager and delete it ( quite intiutive for the user), and it takes a while to load Word to export and print a little thing...).
So can anybody help me ? ( I´m searching for free things to use, not magic controls that cost a lot of money ).
Thanks, Bye !
Braulio
|
|
|
|
|
In actual fact, using GDI to print can produce extremely professional results. Word itself uses GDI to do printing, as doo all other Windows applications, either directly or indirectly (i.e. through a class library, DLL, or COM object).
--
Andrew.
|
|
|
|
|
Hi !,
Yes, with GDI you can make a lot of nice stuff, but it takes some more extra time, ... if you need to print 10 standard reports... just looking for an ActiveX or whatever in which you pass the recorset, and Header, and you have it all done...
I can try to make a class like that for me, but I don´t like to reinvent the wheel..., and it´s sure that it won´t look so proffessional, because to make such thing quite, quite ok, you need some time to do it.
Bye !
Braulio
|
|
|
|
|
|
Thanks !,
I will take a look to that !. Does it work fine ? ( I have seen in the user comments that it has some bugs ?).
Bye !
Braulio
|
|
|
|
|
There are a couple of minor bugs, the fixes are in the user comments.
|
|
|
|
|
Hi,
I'm trying to walk the start menu and evaluate the targets of all shortcuts, and extract the version information from any EXE file that I find. This is in an attempt to get a list of installed software.
For the most part it works. But, Microsoft Office never shows up. Looking at the shortcuts ( Office 2000 by the way), they are kind of "special". Right clicking in explorer to get properties yields wierd information: ie the Target box is greyed out and contains "Microsoft Office 2000" instead of a files system path to the application.
When I use the IShellLink interface to decode the link, I can't get the target of these shortcuts (they just return empty strings).
Does anyone know how I can decode these "special" shortcuts??? I've been poking around for CLSID's in the registry but its way confusing and doesn't do much for my sanity.
I note that if I open the "Microsoft Word.lnk" file in a hex editor, I can see the target information that I want.
Please help!
Thanks
Jon
Sorry to dissapoint you all with my lack of a witty or poignant signature.
|
|
|
|
|
I have a derived CListCtrl in which I do a bit of custom drawing. The custom drawing had to be done because the first line of each "query" is more or less a header line. For example, if I have the programming staff's hours worked this week in a database, the first line (and subsequently, the first column) in the list control (report view of course) is the person's name. However, the real data on the next line is a date. So what's happening is that since the column is sized to handle a date, a person with a normal name has their name clipped.
I'm looking for a way when I get this "status line" that I can handle the painting and not have the name clipped but have it paint the line of text over multiple columns.
I've seen the examples for painting the list control when there's no items, but this isn't going to work in my situation because they're painting the entire list control which I don't want.
Any help is appreciated.
Bill
http://www.ratebeer.com
|
|
|
|
|
Basically, you have two choices. Owner-draw list control delegates all drawing to your code. You're responsible for everything and have full control. OTOH, the custom-draw is usable when you just want to alter some aspects of drawing, like text color or font. I'm not sure if you'll be able to draw unbounded by columns. There should be some articles on custom-draw list control on CP.
Maybe you should just use a grid - there's one right here on CodeProject. It supports multiple fonts, colors, etc.
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
I'm currently using custom draw to highlight particular rows. I couldn't figure out how to intercept the text drawing. I also noticed that when I looked at the rect struct that's passed into the custom draw function that top was set, but bottom, right and left were out in left field (uninitialized I'm guessing).
I really don't require any additional functionality other than this, so I'm not sure if the supergrid is something I want to add at this point, but who knows, maybe I'll end up going down that route.
Thanks for the feedback.
Bill
http://www.ratebeer.com
|
|
|
|
|
Is there anybody to tell me why my app wich load its resources from a resource only dll fails on WIN2000 OS. If I put back the resource in the .rc file of the app, it works !!!!!!!!!!!
elisabeth.sever@europlacer.fr
|
|
|
|
|
Hi
Can you recommend me bug tracking system which have interface as plug-in
with Visual C++ IDE,
and have report tools.
Ernst
|
|
|
|
|
I created the toolbar use CWindowImpl::Create method, and
I used SendMessage function(Message ID is TB_ADDBUTTONS) to
add buttons into the toolbar. But I just can add 5 buttons
from the sixth, the button can not show up or a access violation occurs, could some body tell me why?
^_^
|
|
|
|
|
I use SetCharFormat function in my project and I use SetWindowText to output my text. When I run my programm on systems Windows 95/98 this function can print symbols with code upper then 127, but when I run it on system Windows 2000, it does not work. Can anybody help?
|
|
|
|
|
Can this control use .gif files ?
|
|
|
|