|
|
Insert a #define WINVER 0x500 prior to the inclusion of shlwapi.h . If this does not work, you might need to download a newer version of the platform SDK.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Thanks. Where can i download the newest version of Platform SDK?
|
|
|
|
|
Follow the links from here.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
I keep getting an "Automation server can't create obect." errors, and then no links appear...
|
|
|
|
|
Don't know. It worked OK for me. Keep trying, or use another machine (if you have it available.)
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
|
See the VC forum FAQ (Link at the top of the page)
--Mike--
Just released - RightClick-Encrypt - Adds fast & easy file encryption to Explorer
Like the Google toolbar? Then check out UltraBar, with more features & customizable search engines!
My really out-of-date homepage
Sonork - 100.10414 AcidHelm
|
|
|
|
|
i have a split window that i put a CFormView derived view into. How can I call this view's OnFilePrint function? I have a message map in this view:
BEGIN_MESSAGE_MAP(CDisplayPrintTemplate, CFormView)
ON_WM_ERASEBKGND()
ON_COMMAND(ID_PRINT_SELECTED,CFormView::OnFilePrint)
END_MESSAGE_MAP()
how can i send a message from CMainFrame to this view to print? I have tried the following, but nothing occurs. In the class itself i have a button that i press which has the ID_PRINT_SELECTED id, and it works fine..
CDisplayPrintTemplate* pForm = (CDisplayPrintTemplate*)m_wndSplitter.GetPane(1,0);
pForm->SendMessage(ID_PRINT_SELECTED);
i will continue to look for examples, if someone notices something small could you please help me out? thanks!
-dz
|
|
|
|
|
Seems like the message is not being properly routed. Are you handling by error this command somewhere else? (like for instance in your main frame window)
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
I have changed my code to where i just call a member function - CDisplayPrintTemplate::ExternalPrint()
this in turn calls CFormView::OnFilePrint().. is there anything wrong with this? I know its a protected member, but i have tried the examples on message sending and i cant get any of my test functions to ever get called.. is it necessary to send a message or is a function call ok?
-dz
|
|
|
|
|
Have you tried Patrick's advice below? I think he's definitely pinpointed your error.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
I have looked at the article, and tried the following:
CMainFrame
----------
#define WM_TESTING WM_APP + 0x100 // defined above IMPLEMENT_DYNCREATE(CMainFrame, CFrameWnd)
...
pForm->SendMessage(WM_TESTING,1,NULL);
CDisplayPrintTemplate
---------------------
#define WM_TESTING WM_APP + 0x100
..
BEGIN_MESSAGE_MAP(CDisplayPrintTemplate, CFormView)
ON_WM_ERASEBKGND()
ON_COMMAND(ID_PRINT_SELECTED,CFormView::OnFilePrint)
ON_COMMAND(WM_TESTING, TestMe)
END_MESSAGE_MAP()
..
void CDisplayPrintTemplate::TestMe()
{
AfxMessageBox("Testme");
CFormView::OnFilePrint();
}
the message never pops up.. i am just calling the function directly now.. im trying to figure out how to keep the print dialog from popping up.. thanks for all of your help
-dz
|
|
|
|
|
Well. Commands are not messages. Commands are IDs sent along the only message WM_COMMAND . Try the following:
pForm->SendMessage(WM_COMMAND,MAKEWORD(ID_PRINT_SELECTED,0),0); Hopefully, this will work. See the difference? The command ID it's stored in the wParam arg, not in the message parameter (which must be WM_COMMAND .)
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
|
I have seen a lot of people post questions about problems sending messages to splitter windows. The problem is the frame and CSplitterWnd are not routing the message all the way down to the CView panes. Refer to the MSDN article "September 1998 Microsoft System Journal, Q&A". Just search for CSpliterWnd and it will be in the list.
This is the meat of what it says:
"... Fortunately, it's easy to let all the views in a splitter window handle commands. All you have to do is override your frame's OnCmdMsg function, like so:
BOOL CMainFrame::OnCmdMsg()
{
if (m_wndSplitter.OnCmdMsg()
return TRUE;
return CFrameWnd::OnCmdMsg();
} Then, override the splitter window's OnCmdMsg:
BOOL CMySplitterWnd::OnCmdMsg()
{
for (pView = ) {
if (pView->OnCmdMsg()
return TRUE;
}
return CSplitterWnd::OnCmdMsg();
} ..."
Note you should override CSplitterWnd. And the changes to the frame is to CMainFrame for a SDI application and to CChildFrame for a MDI application.
Hope this helps
Jonathan Craig
www.mcw-tech.com
|
|
|
|
|
Hi I have already made this post a while back,
I am trying again.
How can i get the total amount of memory used by a process at any given time?
I know about GetprocessWorkingSetSize, but this works only on Winnt and not
9x systems, also this function will give only the max and min usages.
|
|
|
|
|
I don't think you can know process's memory in Win95/98. Can task manager give you such information in those OS?
Philip Patrick
Web-site: www.stpworks.com
"Two beer or not two beer?" Shakesbeer
Need Web-based database administrator? You already have it!
|
|
|
|
|
Hi Prem. It is not easy task that you're trying to accomplish, but fortunately Keit Rule already wrote the stuff in his article Debugging & Testing Tips for Win9x (check GetHeapSize 's code.)
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Hi,
The Heap size is not enough for what i am trying to do.
I want to get the amount of virtual memory also,
In Winnt I can use the PSAPI function
GetProcessMemoryInfo to get the total amout of memory a process
is using.
Yeah I have looked at the ToolHelp functions already(which by the
way are not available in Winnt) do not give the Virtual memory
usage.
|
|
|
|
|
Please correct me if I'm wrong, but I'd say heaps account for all the memory available to a process (save the memory needed for the executable code.) If you know this is not so, I'd be grateful if you could ellaborate a little more.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Hi,
I think that the Heap is not the whole memory,
Functions using the the Virtual memory functions
might not be listed as a part of a heap, infact some
system dll's themselves are allocating using VirtualAlloc
and not calling VirtualFree in some circumstances, and
we want to test for it and force them to free it.
|
|
|
|
|
This app is a very good one.. but it's an app.. not code
TaskInfo 2000 @ www.iarsn.com
Rickard Andersson@Suza Computing
ICQ#: 50302279 (Add me!)
E-mail: nikado@pc.nu
I'm from the winter country SWEDEN!
|
|
|
|
|
Are you replying to my post? The code needed is shown in full in the article itself, you don't have to download the project.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
If he don't want to do it programmaticly (in fact he is but WTH ) I gave a good a example of an app that can show realy much info, such memory usage etc... I'm tired and can't spell or write sentences in english that is correct enough to understan (maybe)... I need my bed now...
sleep well my CP friend!
Rickard Andersson@Suza Computing
ICQ#: 50302279 (Add me!)
E-mail: nikado@pc.nu
I'm from the winter country SWEDEN!
|
|
|
|