|
As a note, you could use:
CWnd *pFocus = GetFocus();
if (pFocus && pFocus->IsKindOf(RUNTIME_CLASS(CEdit)))
{
UINT id = pFocus->GetDlgCtrlID();
// makse use of the controls id here....
Roger Allen - Sonork 100.10016
Roger Wright: Remember to buckle up, please, and encourage your friends to do the same. It's not just about saving your life, but saving the quality of life for those you may leave behind...
|
|
|
|
|
Thanks a lot, that's exactly what I was looking for!
I'm a beginner, so I'm learning...
Dave
|
|
|
|
|
Maybe I'm missing something, but why can't you just GetFocus() ? This will return a CWnd* of the window having the focus.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
Hi all,
For example &File. If you press Alt + 'F' the file menu opens. ... I would like the underline to always display
Thanks all
|
|
|
|
|
no idea,
in fact, i'm not sure we really can. every App' i use show like you say, and i've never found a way to underline to always display... if only you find the solution, please tell me.
TOXCCT >>> GEII power
|
|
|
|
|
Are you talking about the way Windows XP hides the underline until you press Alt?
If you are, this is a setting that you can change in the Display Properties (Control Panel -> Display or right-click on the desktop).
There you go to "Appearance", click on "Effects" and unselect the "Hide underlined letters for keyboard navigation until I press the Alt key".
I don't know how to change this from inside a program, but as it is a user's setting, you better keep it as the user choosed it to be.
|
|
|
|
|
Bin2Hex wrote:
Are you talking about the way Windows XP hides the underline until you press Alt?
The feature is not exclusive to Windows XP.
Bin2Hex wrote:
I don't know how to change this from inside a program...
Check out the NoChangeKeyboardNavigationIndicators value in the following two registry keys:
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
DavidCrow wrote:
The feature is not exclusive to Windows XP
I didn't know...
I still work with 2k but never noticed that "feature"...
Anyway, thanks for the info about the registry.
(although I still think that it is something not to be messed with, as it is an user setting)
|
|
|
|
|
If you want to change it from inside a program, probably the best way to do it is like so:
BOOL a_bSet = TRUE;
SystemParametersInfo( SPI_SETKEYBOARDCUES, 0, (PVOID)&a_bSet, SPIF_SENDCHANGE );
Chris Richardson
|
|
|
|
|
Hi
I want to manipulate the MFC classes to intercept TCP calls from normal applications like Internet Explorer or WS_FTP to 'connect' using the connect function in my socks client instead of the normal TCP call.
However, I am not sure what to use to implement this.
Can anyone tell me how to use MFC classes to do that?
Thanx!
babtbaby
|
|
|
|
|
sounds like u need to use the CVirus class
or if ur really doing it for legit reasons then go read about the osi model for tcp/ip stacks
"there is no spoon" biz stuff about me
|
|
|
|
|
Could someone please take the time and explain how to add tooltips to an existing mfc application?
I have an edit box that I would like to add tool tips to so the user knows exactly what needs to be input. I read something on msdn about it but for me msdn is not clear.
thanks for your help.
win32newb
"Making windows run worse than it already does"
|
|
|
|
|
Did you read this article?
http://www.codeproject.com/miscctrl/pptooltip.asp?target=tooltip
-----
We are what we repeatedly do. Excellence, then, is not an act, but a habit.
|
|
|
|
|
I looked that linke looks very good thanks.
Win32newb
"Making windows programs worse than they already are"
|
|
|
|
|
HELP!
When running this code on a SINGLE PROCESSOR machine I get a fairly accurate 100ms timer. When running on a DUAL PROCESSOR I see about a 110ms timer. In the app I am having trouble with I am requesting a 100ms timer but getting about 150ms!!! Does anyone know how to "fix" this issue?
<br />
<br />
#include "stdafx.h"<br />
#include "stdlib.h"<br />
#include "stdio.h"<br />
#include "memory.h"<br />
#include "windows.h"<br />
#include "time.h"<br />
<br />
typedef BOOL ( CALLBACK CreateTimerQueueTimerProc ) ( PHANDLE, HANDLE, WAITORTIMERCALLBACKFUNC, PVOID, DWORD, DWORD, ULONG );<br />
typedef BOOL ( CALLBACK DeleteTimerQueueTimerProc ) ( HANDLE, HANDLE, HANDLE );<br />
<br />
<br />
VOID CALLBACK Win32TimerQueueProc(PVOID lpParameter, BOOLEAN TimerOrWaitFired)<br />
{<br />
SYSTEMTIME myWin32SystemTime;<br />
<br />
::GetSystemTime(&myWin32SystemTime);<br />
<br />
ULONG currentMilliseconds = myWin32SystemTime.wSecond * 1000 + myWin32SystemTime.wMilliseconds;<br />
<br />
SYSTEMTIME* myLastWin32SystemTime = (SYSTEMTIME*)lpParameter;<br />
<br />
ULONG lastMilliseconds = myLastWin32SystemTime->wSecond * 1000 + myLastWin32SystemTime->wMilliseconds;<br />
::printf("%d\n", currentMilliseconds - lastMilliseconds );<br />
<br />
*myLastWin32SystemTime = myWin32SystemTime;<br />
}<br />
<br />
<br />
int main( int argc, char** argv)<br />
{<br />
HMODULE hKernel32 = ::LoadLibrary("kernel32.dll");<br />
<br />
CreateTimerQueueTimerProc* pCreateTimerQueueTimerProc = (CreateTimerQueueTimerProc*) ::GetProcAddress( hKernel32, "CreateTimerQueueTimer" );<br />
<br />
if( !pCreateTimerQueueTimerProc )<br />
{<br />
::printf( "timer code will not function - system must be W2K or later" );<br />
return 1;<br />
}<br />
<br />
DWORD timeDelta = 100;<br />
<br />
SYSTEMTIME myLastWin32SystemTime;<br />
<br />
HANDLE myTimer;<br />
(*pCreateTimerQueueTimerProc)( &myTimer, <br />
NULL, <br />
Win32TimerQueueProc, <br />
&myLastWin32SystemTime, <br />
timeDelta, <br />
timeDelta, <br />
0 );<br />
<br />
::Sleep(50000);<br />
<br />
return 0;<br />
}<br />
<br />
|
|
|
|
|
there's 2 function in microsoft flex grid, GetMouseCol() and GetMouseRow() i think this 2 function return the grid value that has been clicked. anyone know how to use it and what it does?
|
|
|
|
|
Presumably in response to an event like a click, you can call these to work out where the user is?
Steve S
|
|
|
|
|
Hy everybody!
I'm trying to make my app list all files that have in one directory into strings... but I'm losing time... does anyone know a easy way to do that?
thanks a lot!
cheers!
|
|
|
|
|
FindFirstFile, FindNextFile until it returns FALSE, FindClose.
Stability. What an interesting concept. -- Chris Maunder
|
|
|
|
|
YeahP!
That's it!
thanks Mike!
|
|
|
|
|
Have a look at CFileFind .
|
|
|
|
|
Ok! Thanks Iain!
I'll look right now!
Thanks guys!
|
|
|
|
|
check the right section here on cp .. there are several classes that do exactly what u want
"there is no spoon" biz stuff about me
|
|
|
|
|
How can I get a HICON from a Resource ID in a CDialog class?
|
|
|
|
|
Will LoadIcon() work?
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|