|
Nice that you want to, but (access restriction) it's not possible in win9x ... why don't you start reading about all the things you are asking here before wasting our time?
Don't try it, just do it!
|
|
|
|
|
Hey, Alex I have seen s/w that locks file and folder and prompts for password , how can i make a similar prog and through calling which api.
|
|
|
|
|
I have created a console C++ application that collects system information, including NFO file as follows
*****************************************************************************
SHELLEXECUTEINFO ShExecInfo = {0};
ShExecInfo.cbSize = sizeof(SHELLEXECUTEINFO);
ShExecInfo.fMask = SEE_MASK_NOCLOSEPROCESS;
ShExecInfo.hwnd = NULL;
ShExecInfo.lpVerb = NULL;
ShExecInfo.lpFile = "\"C:\\Program Files\\Common Files\\Microsoft Shared\\MSInfo\\MSInfo32.exe \"";
ShExecInfo.lpParameters = "/nfo c:\\SystemInformation.nfo";
ShExecInfo.lpDirectory = NULL;
ShExecInfo.nShow = SW_SHOW;
ShExecInfo.hInstApp = NULL;
ShellExecuteEx(&ShExecInfo);
WaitForSingleObject(ShExecInfo.hProcess,INFINITE);
***************************************************************************
The code above works, the problem is that there is no indication that the application still running during creation of the (*.nof) file which could be 1-1.5 mins. I tried a messageBox before the code is executed, but it will the same difference.
Any ideas how to display some sort of message/status bar to monitor progress?
|
|
|
|
|
Normally you can't create a progress bar for that because the msinfo32.exe does all the work for you and does not provide a callback or notify system.
Don't try it, just do it!
|
|
|
|
|
Instead of
WaitForSingleObject(ShExecInfo.hProcess,INFINITE);
you can wait for a specific amount of time:
do{ <br />
dwWaitResult = WaitForSingleObject(ShExecInfo.hProcess,INFINITE);<br />
switch( dwWaitResult ){<br />
case WAIT_TIMEOUT:<br />
break;<br />
case WAIT_OBJECT_0:<br />
break;<br />
case WAIT_FAILED:<br />
break;<br />
}<br />
}while( WAIT_TIMEOUT == dwWaitResult );
I truly CRINGE every time I see an INFINITE wait, anyhow.
|
|
|
|
|
hi,guy
Sometimes the big font(120 DPI) will cause the interface to look so bad when we expect software to be run under small font(96DPI) conditions.
This problem has troubled me for a long time.
Do you have any solution or advice to me.
Thank you for help me!
Best Regards,
KHLin
|
|
|
|
|
You will need to layout your application so that it looks acceptable at either desktop font size. If the current layout is too crowded, you should rethink how you are doing things.
Another option is to dynamically resize the controls in your application. Take a look at the articles in the 'dialog' section here on Code Project for some ideas.
Software Zen: delete this;
|
|
|
|
|
Can you not use Unicode strings in status bars?? The lParam of the SB_SETTEXT message is a LPSTR (not LPTSTR)...
|
|
|
|
|
See SB_SETUNICODEFORMAT.
Don't try it, just do it!
|
|
|
|
|
Thanks for the reply. I have another question - the SB_SETUNICODEFORMAT message says it needs comctl32.dll version 4.00 or later but the Remarks section says to see the remarks for CCM_GETUNICODEFORMAT which says it needs version 4.71 for WinNT or version 5.80 for Win95/98. Do you know which version it needs?
- thanks
|
|
|
|
|
I installed VS 2005.NET Beta 2 (the VS not an express edition) and I realised when making an MFC Application it has the same menus and buttons strips are equal to the 2003 version... I was expecting the same design of the Office 2003, since that happens when working without MFC...
Is this just my ignorance on MFC, or MS will change that soon?
|
|
|
|
|
When I generated the assembly code for both inline and non-inline function calls, I see no difference in code, they're exactly the same.
But it said to be inline version does not have the function call overhead?
|
|
|
|
|
inline is a suggestion to your compiler, it's not obliged to take your advice. I'm not sure if the compiler is allowed to inline without the keyword, though.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Christian Graus wrote:
I'm not sure if the compiler is allowed to inline without the keyword, though
It is, if you specify /Ob2.
Quoting from MSDN:
/Ob2 Expands functions marked as inline or __inline and any other function that the compiler chooses (expansion occurs at the compiler's discretion, often referred to as auto-inlining).
/Ob2 is in effect when /O1, /O2 or /Ox is used.
This option requires that you enable optimizations using /O1, /O2, /Ox, or /Og.
--
jlr
http://jlamas.blogspot.com/[^]
|
|
|
|
|
I thought that was the case in general, but could not remember exactly, hence my comment surrounded by caveats...
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I believe that the inline keyword has no effect when you are compiling for debug.
Also, the compiler treats inline only as a suggestion, not as a requirement. This means that if the function is large enough, is called in a lot of places, or some combination of the two, it may decide to not generate code for it inline.
Software Zen: delete this;
|
|
|
|
|
Hi,
I'm tring to control ICQ from a small external MFC app.
I'm doing it with Spy++ to identify the massages related to the action I want to simulate, and then sending those massages to the ICQ contorls with PostMassage function.
Now, my problem is - how to control the TreeList control (with the pepole names) within ICQ ?
What I want to do, is to open a chat window for each of the members in the list control... In the ICQ it's done by double-clicking on the user-name in the list control. but I didn't succses to understand how to do it manually with Windows-massages....
Actually, that question is related not specifically to controlling ICQ, but in general to remote control a treelist control in WINDOWS.
10X !
|
|
|
|
|
I'm not even sure if the user list control is a tree view. The only way to find out how to remote control it is Spy++ or other monitoring software.
You have to monitor all the messages that are sent to the control, find out what parameters they have, how they work, ..., and so you will be able to get a handle to the list control from your application and send messages yourself.
It could take some time, but that is the way I'd prefer.
Don't try it, just do it!
|
|
|
|
|
Hello,
I try to use the following code in the MS-Sample: "Browse".
SendMessage(hwndHTML, DTM_DOCUMENTDISPATCH, 0, (LPARAM) &pDisp);
pDisp->QueryInterface(IID_IPIEHTMLDocument, (void**)&pHTMLDocument);
but I get the Link error:
LNK2001: unresolved external symbol IID_IPIEHTMLDocument
Requirements
Pocket PC: Windows Mobile 2003 and later
Smartphone: Windows Mobile 2003 and later
OS Versions: Windows CE .NET 4.2 and later
Header: htmlctrl.h
Library: htmlctrl.lib <- This wrong - this file doesn't exist. I think it must be htmlview.lib.
I use the following lib files
aygshell.lib
htmlview.lib
gx.lib
webview.lib
I get the Link-Error with C++ 4.0 and with Visual Studio 2005.
What is wrong ?
Thank you for your help.
Thomas
TJ
|
|
|
|
|
I (and a couple of other people I have found out) have asked how to draw lines in RichEditView/RichEditCtrl. So far, no one has been able to answer the question. Anybody got an idea of how to do it?
|
|
|
|
|
Subclass the control using SubclassWindow, then handle the WM_PAINT message and draw your lines there.However you might need to handle some additional messages as well as scrolling, resizing, etc. could be involved.
Hope this helps.
|
|
|
|
|
I am using the RichEditView/Doc architure. I am using it so I can use formating as well as use the EN_LINK messaging. Will this interfer with the message handling in the RichEditCtrl?
|
|
|
|
|
Not if you are going to call DefWindowProc. Actually you will need to call this function because you will want first the RichEdit to display normally and after that make your changes.
|
|
|
|
|
I haven't work with subclasses in this way. Can you point me to info on how to use it? I tried help in Visual Studios but its as clear as mud. Thanks for the help.
|
|
|
|
|
plzz help.
how a can i write a program to copy function (as a whole) from one c++ file to another c++ file ,(appending to its end)
the inputs of the programe shoid be source file name,function name and destination file name.
|
|
|
|