|
|
Hi,
sorry guys, for delay replying and I'm thankful for ur prompt responses.
> I don't want to use any tools...
It means, any third party tools ie, exe shouldn't be called from my application.The functionality should be incorporated in my application.
I can use these Process32First,Process32Next calls, but these should be written in service and should be called for every second which is burdon..
I wish to write the info in a log when the process is started and when it is stopped...This functionality is seen in "Process Logger"
Please sugget me where to get the info for this functionality..
Regards,
nag.
|
|
|
|
|
I have a dialog that I want to be shown as full screen. On this dialog I have 2 CListBox objects. I would like to have the listboxes be the full height of the screem, depending on what resolution the user has set. I get the height using GetSystemMetrics( SM_CYMAXIMIZED ) but I don't see what I have to do so it is drawn with that height.
Also, is there something else I can use with ShowWindow instead of SW_SHOWMAXIMIZED that won't cover the start menu but still show as full screen?
Thanks in advance.
|
|
|
|
|
How about:
CRect rc;
GetParent->GetClientRect(rc);
m_listbox.MoveWindow(nLeft, 0, nWidth, rc.Height());
"The largest fire starts but with the smallest spark." - David Crow
|
|
|
|
|
I suggest use this way in wm_size
whitesky
|
|
|
|
|
Hi Guys,
I want to send a "SendMessage" from within my windowControl as follows,by passing a return key.
MyControl.SendMessage(WM_KEYDOWN,13);
What macro do I have to include in my messagemap & which meesagehandler should I include to take care of my message..
Thanks
|
|
|
|
|
Send message doesn't rewire any macro to be handled..
If you are saying about WM_KEYDOWN then you have to hanfle that Message.
Cheers
"Peace of mind through Technology"
|
|
|
|
|
Okay,So u meant to say that I habe to catch it in the "OnKeyDown"
messageHandler...
|
|
|
|
|
yes
Cheers
"Peace of mind through Technology"
|
|
|
|
|
|
Pazzuzu wrote: Okay,So u meant to say that I habe to catch it in the "OnKeyDown"messageHandler...
but you have to handle WM_KEYDOWN message for that!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
|
I wanted to avoid this technique (what you have suggested is already written in my code)...
thought there is a simplier better way..
thanks
Yaron
Interface basics click here :
http://www.codeproject.com/com/COMBasics.asp
don't forget to vote
|
|
|
|
|
YaronNir wrote: pressing enter will cause the button to be clicked (such as pressing space bar does)
into PreTranslateMessage you can hook the enter key (key up and down)and translate that events to space key:
if(pMsg->wParam==VK_RETURN) pMsg->wParam=VK_SPACE
YaronNir wrote: simplier better way
Can we use PreTranslateMessage , or it is too complex?
Russell
|
|
|
|
|
interesting, depends wether i use PreTranslateMessage or not....
thanks
Yaron
Interface basics click here :
http://www.codeproject.com/com/COMBasics.asp
don't forget to vote
|
|
|
|
|
Yes,
I think that PreTranslateMessage is one of the most powerfull instruments to create the program interface,...but, often, it is not very easy to be prepared.
Cheers,
Russell
|
|
|
|
|
What do I use to find all the shared printers on a network. I want to be able to offer the user the choice of netwrok printer in a app setup without having to showw the printer lialog box every time they print.
The second part I have gotten right, no to be able to select the printer
Any help out there?
|
|
|
|
|
tcss wrote: What do I use to find all the shared printers on a network. I want to be able to offer the user the choice of netwrok printer in a app setup without having to showw the printer lialog box every time they print.
try NetServerEnum api
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
Use:
DWORD WNetEnumResource(
HANDLE hEnum,
LPDWORD lpcCount,
LPVOID lpBuffer,
LPDWORD lpBufferSize
);
Also see:
NETRESOURCE structure and
DWORD WNetOpenEnum(
DWORD dwScope,
DWORD dwType,
DWORD dwUsage,
LPNETRESOURCE lpNetResource,
LPHANDLE lphEnum
);
this function starts an enumeration of network resources and further you can enumerate by calling WNetEnumResource .
Cheers
"Peace of mind through Technology"
|
|
|
|
|
thanks
Will go away and try this.
|
|
|
|
|
tcss wrote: go away and try this.
Try the Following Code
doEnum(int level, NETRESOURCE *pnr)
{
DWORD rc;
HANDLE hEnum;
CString strTemp;
DWORD count, bufsize, ui;
NETRESOURCE buf[200];
const char *type, *cont;
rc = WNetOpenEnum( RESOURCE_GLOBALNET, RESOURCETYPE_PRINT, 0, pnr, &hEnum );
if ( rc == ERROR_ACCESS_DENIED )
{
return 1;
}
while ( 1 )
{
count = (DWORD) -1L;
bufsize = sizeof buf;
rc = WNetEnumResource( hEnum, &count, buf, &bufsize );
if ( rc != NO_ERROR )
break;
for ( ui = 0; ui < count; ++ ui )
{
switch ( buf[ui].dwDisplayType )
{
case RESOURCEDISPLAYTYPE_DOMAIN:
type = "domain"; break;
case RESOURCEDISPLAYTYPE_GENERIC:
type = "generic"; break;
case RESOURCEDISPLAYTYPE_SERVER:
type = "server"; break;
case RESOURCEDISPLAYTYPE_SHARE:
type = "share"; break;
default:
type = "unknown"; break;
}
cont = ( buf[ui].dwUsage & RESOURCEUSAGE_CONTAINER )? "container": "";
if(level==2)
{
CString networkmachinename;
networkmachinename=buf[ui].lpRemoteName ;
networkmachinename.TrimLeft("\\");
m_machinenames.AddString(networkmachinename);
}
if(level==3)
{
m_sharedfolder.AddString(buf[ui].lpRemoteName);
return 0;
}
if ( buf[ui].dwUsage & RESOURCEUSAGE_CONTAINER)
doEnum( level + 1, &buf[ui] );
}
}
WNetCloseEnum( hEnum );
return 1;
}
Knock out 't' from can't,
You can if you think you can
|
|
|
|
|
anyone knows any smart c++ function/library that will convert url type of character entities like those in this one? http://search.targetwords.com/u.search?x=4722%7C1%7C1%7C%7C%7Conline......
i mean %nn sequences. i would like to transform them into characters.
regards
-- modified at 9:29 Monday 22nd May, 2006
|
|
|
|
|
|
scoroop wrote: anyone knows any smart c++ function/library that will convert url type of character entities like those in this one? http://search.targetwords.com/u.search?x=4722%7C1%7C1%7C%7C%7Conline......
i mean %nn sequences. i would like to transform them into characters.
See the following link where you can get the list of URL - encodings
http://www.w3schools.com/tags/ref_urlencode.asp[^]
you may write your own function for same..
Knock out 't' from can't,
You can if you think you can
|
|
|
|
|
Use UrlUnescape() .
"The largest fire starts but with the smallest spark." - David Crow
|
|
|
|