|
See if my response here will get you started.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
Thanks for your response. Can you tell me how to find out the memory footprint for the processes from the program?
|
|
|
|
|
ben2 wrote:
Can you tell me how to find out the memory footprint for the processes from the program?
Do you mean the heap or the stack? If the former, see this article. If the latter, then I'm not sure.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
other people tell me if i want to change the icon on the window,i must send WM_SECTION to window,so i write: in initinstance of app
HICON hIcon=AfxGetApp() ->LoadIcon(IDI_ICON)
ASSERT(hIcon)
AfxGetMainWnd() ->SendMessage(WM_SECTION,TRUE,(LPARAM)hIcon)
,but when i compile note not declare WM_SECTION,why ,do you know?if true,tell me please.
|
|
|
|
|
vividtang wrote:
,but when i compile note not declare WM_SECTION
Do you mean that you receive a compiler error? If so, it may be because that message does not exist, at least that I could find. What is it used for?
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
then can you have an idea to help me solve the problem?thx
|
|
|
|
|
Not without some detailed information as to what you are wanting.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
Hi!
I guess you want to use WM_SETICON and not WM_SECTION ...
The latter windows message doesn't exist.
Regards, mYkel
|
|
|
|
|
hi: you are right ,run ok,thx
|
|
|
|
|
i can use the following get the notepad icon from other program,and draw the icon on my view.
(1)if( :: SHGetFileInfo(_T("c:\\windows\\notepad.exe"),0,
&stFileInfo,sizeof(stFileInfo),SHGFI_ICON))
{pDC ->DrawIcon(10,10,stFileInfo.hIcon);
}
but i want to use GetWindowsDirectory() first windows directory "c:\\windows" ,then i combine the windows path with "notepad.exe",by using the string operator "+",now i get str,if in console ,use cout<
|
|
|
|
|
vividtang wrote:
...but i want to use GetWindowsDirectory() first windows directory "c:\\windows" ,then i combine the windows path with "notepad.exe
Read the second part of my response here. It's not a good idea to assume that notepad.exe resides in any directory, or even exists for that matter.
Without knowing more of what you are doing, I'm inclined to think that FindExecutable() (or AssocQueryString() ) might be a better choice for what you want.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
DavidCrow wrote:
Without knowing more of what you are doing, I'm inclined to think that FindExecutable() (or AssocQueryString()) might be a better choice for what you want.
oh, nice, I learned something today ... !!!!
Thanks ...
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
(1)set the caption for toolbar
int CMainFrame : : OnCreate (LPCREATESTRUCT lpCreateStruct )
{// Set the caption of the toolbar .
m_wndToolBar.SetWindowText (_T "Standdard");
}
question:why not respond when running i cant see the caption
(2)Set title for View's MDI child frame window .
in CMyChildFrame::PreCreateWindow() or in CMyViw::PreCreateWindow write :
GetParentFrame( )-> SetWindowText (_T ("MDI Child Frame new title"));
no error when compile but once run terminate,why?
(3)i want to change default window style
BOOL CMainFrame:: PreCreateWindow
(CREATESTRUCT &cs)
{
cs.style &=~WS_MAXIMIZE;
cs.x=cs.y=0;
cs.cx=GetSystemMetrics(SM_CXSCREEN/2);
cs.cy=GetSystemMetrics(SM_CYSCREEN/2);
return CMDIFramewnd ::PreCreateWindow(cs)
}
but when i run ,why the maxsize still has on the window
|
|
|
|
|
Try
CChildFrame* pFrame = (CChildFrame*)GetParentFrame();
if(pFrame)
{
pFrame->MDIMaximize();
pFrame-> SetWindowText (_T ("MDI Child Frame new title"));
}
and put it into OnInitialUpdate
|
|
|
|
|
vividtang wrote:
cs.style &=~WS_MAXIMIZE;
This should be:
cs.style &= ~WS_MAXIMIZEBOX;
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
if i use the method of that mr anonymous,when run,the program will maximize,although i want to cancel maximize,but the caption of the child frame view is still not been changed.
|
|
|
|
|
How does IE display it's icon images in it's toolbar (or bitmaps) and have rounded edges blend almost seamlessly with the system background color???
My images are so anti-aliased it's brutal...is there any technique IE might use to blend the image?
Thanks
How do I print my voice mail?
|
|
|
|
|
I did something similar in a previous job, I had "source" bitmaps with default gradient, and manually updated the pixels depending on the user's color scheme.
The bitmap had a simple palette and computing the new color ramp was easy.
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
ok you lost me...
Can u explain in a little more detail?
tia
How do I print my voice mail?
|
|
|
|
|
|
I have a problem with one of the files in the VC++ SDK. Does anyone know what causes this:
...\Vc7\PlatformSDK\Include\WinNT.h(3568): error C2146: syntax error : missing ';' before identifier 'ContextRecord'
...\Vc7\PlatformSDK\Include\WinNT.h(3568): error C2501: '_EXCEPTION_POINTERS::ContextRecord' : missing storage-class or type specifiers
...\Vc7\PlatformSDK\Include\WinNT.h(3568): error C2501: '_EXCEPTION_POINTERS::PCONTEXT' : missing storage-class or type specifiers
From winnt.h:
typedef struct _EXCEPTION_POINTERS {
PEXCEPTION_RECORD ExceptionRecord;
PCONTEXT ContextRecord; //<- error here
} EXCEPTION_POINTERS, *PEXCEPTION_POINTERS;
|
|
|
|
|
Hello, I have a problem with a template, maybe you know a better solution:
template < class T, int Offset > class CList
{
};
class CAnything
{
CList< CAnything, offsetof( CAnything, m_List ) > m_List;
};
Thx for advice!
Greets, Alex
Don't try it, just do it!
|
|
|
|
|
What are you trying to do and what is your problem?
|
|
|
|
|
creating a list class similar to the LIST_ENTRY and CONTAINING_RECORD way.
Don't try it, just do it!
|
|
|
|
|
CONTAINING_RECORD is just a macro that defined as folow:
#define CONTAINING_RECORD(address, type, field) ((type *)( (PCHAR)(address) - (UINT_PTR)(&((type *)0)->field)))
Why would you need templates to do that?
|
|
|
|