Click here to Skip to main content
16,004,991 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Generaldefine "draw" area in CDC Pin
AnTri20-Aug-03 0:04
AnTri20-Aug-03 0:04 
GeneralRe: define "draw" area in CDC Pin
MCING20-Aug-03 0:20
MCING20-Aug-03 0:20 
GeneralRe: define "draw" area in CDC Pin
Steve S20-Aug-03 0:44
Steve S20-Aug-03 0:44 
Generalconvert Integer to String Pin
wow999919-Aug-03 23:46
wow999919-Aug-03 23:46 
GeneralRe: convert Integer to String Pin
MCING19-Aug-03 23:51
MCING19-Aug-03 23:51 
GeneralRe: convert Integer to String Pin
Ted Ferenc19-Aug-03 23:57
Ted Ferenc19-Aug-03 23:57 
GeneralWhere is the glitch in this code (minimizing and restoring another app) Pin
Kayembi19-Aug-03 23:37
Kayembi19-Aug-03 23:37 
GeneralRe: Where is the glitch in this code (minimizing and restoring another app) Pin
Dangleberry20-Aug-03 2:19
sussDangleberry20-Aug-03 2:19 
You could try using GetAncestor with the GA_PARENT flag instead of GetParent() because it sometimes returns an owner handle instead of a parent one (which means your foreground check would be in the wrong loop). Also, since the foreground check is only ever a 1 or 0 you should use

if(not_foreground == 1)
{
//do stuff
}
else
{
//Do stuff
}

Personally I would use SetWindowsHookEx with WH_CALLWNDPROC and a CallWndProc() CALLBACK to process the messages sent to the app for the loss of keyboard focus, window activation etc. This is event driven, much more efficient than polling the foreground window every time.
GeneralRe: Where is the glitch in this code (minimizing and restoring another app) Pin
Kayembi20-Aug-03 3:33
Kayembi20-Aug-03 3:33 
GeneralRe: Where is the glitch in this code (minimizing and restoring another app) Pin
Ryan Binns20-Aug-03 5:25
Ryan Binns20-Aug-03 5:25 
GeneralRe: Where is the glitch in this code (minimizing and restoring another app) Pin
Dangleberry20-Aug-03 6:00
sussDangleberry20-Aug-03 6:00 
GeneralRe: Where is the glitch in this code (minimizing and restoring another app) Pin
Ryan Binns20-Aug-03 14:55
Ryan Binns20-Aug-03 14:55 
GeneralRe: Where is the glitch in this code (minimizing and restoring another app) Pin
Dangleberry21-Aug-03 0:47
sussDangleberry21-Aug-03 0:47 
GeneralRe: Where is the glitch in this code (minimizing and restoring another app) Pin
Kayembi20-Aug-03 7:13
Kayembi20-Aug-03 7:13 
GeneralRe: Where is the glitch in this code (minimizing and restoring another app) Pin
Ryan Binns20-Aug-03 14:59
Ryan Binns20-Aug-03 14:59 
Generalgoing through each enumeration of an enum Pin
Jerome Conus19-Aug-03 23:29
Jerome Conus19-Aug-03 23:29 
GeneralRe: going through each enumeration of an enum Pin
Neville Franks19-Aug-03 23:55
Neville Franks19-Aug-03 23:55 
GeneralRe: going through each enumeration of an enum Pin
David Crow20-Aug-03 3:05
David Crow20-Aug-03 3:05 
GeneralFastest bitmap display Pin
MCING19-Aug-03 23:25
MCING19-Aug-03 23:25 
GeneralMMX optimization Pin
sharlila19-Aug-03 23:14
sharlila19-Aug-03 23:14 
GeneralSaving a dropped file into a specified folder Pin
YolandaSteyn19-Aug-03 22:53
YolandaSteyn19-Aug-03 22:53 
QuestionHow to convert TCHAR[] to CString? Pin
Exceter19-Aug-03 22:30
Exceter19-Aug-03 22:30 
AnswerRe: How to convert TCHAR[] to CString? Pin
Dominik Reichl19-Aug-03 22:34
Dominik Reichl19-Aug-03 22:34 
GeneralRe: How to convert TCHAR[] to CString? Pin
Exceter19-Aug-03 22:47
Exceter19-Aug-03 22:47 
GeneralRe: How to convert TCHAR[] to CString? Pin
RChin19-Aug-03 23:09
RChin19-Aug-03 23:09 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.