Click here to Skip to main content
15,890,372 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Nedd help/direction to create a UI Pin
TheGreatAndPowerfulOz21-Dec-05 10:35
TheGreatAndPowerfulOz21-Dec-05 10:35 
GeneralRe: Nedd help/direction to create a UI Pin
David Crow21-Dec-05 10:36
David Crow21-Dec-05 10:36 
QuestionRun hidden on startup Pin
lynchspawn21-Dec-05 9:48
lynchspawn21-Dec-05 9:48 
AnswerRe: Run hidden on startup Pin
TheGreatAndPowerfulOz21-Dec-05 9:54
TheGreatAndPowerfulOz21-Dec-05 9:54 
GeneralRe: Run hidden on startup Pin
Blake Miller22-Dec-05 6:04
Blake Miller22-Dec-05 6:04 
AnswerRe: Run hidden on startup Pin
Rajesh R Subramanian21-Dec-05 17:17
professionalRajesh R Subramanian21-Dec-05 17:17 
QuestionGetActiveWindow returns NULL Pin
wilbur_logan21-Dec-05 9:45
wilbur_logan21-Dec-05 9:45 
AnswerRe: GetActiveWindow returns NULL Pin
TheGreatAndPowerfulOz21-Dec-05 9:52
TheGreatAndPowerfulOz21-Dec-05 9:52 
GetActiveWindow returns windows relative the the current thread, not the entire system.

From the docs:

The GetActiveWindow function retrieves the window handle to the active window attached to the calling thread's message queue.

Syntax

HWND GetActiveWindow(VOID);
Return Value

The return value is the handle to the active window attached to the calling thread's message queue. Otherwise, the return value is NULL.

GetForegroundWindow is the one you want to use. The docs say:

The GetForegroundWindow function returns a handle to the foreground window (the window with which the user is currently working). The system assigns a slightly higher priority to the thread that creates the foreground window than it does to other threads.
GeneralRe: GetActiveWindow returns NULL Pin
wilbur_logan21-Dec-05 10:02
wilbur_logan21-Dec-05 10:02 
GeneralRe: GetActiveWindow returns NULL Pin
TheGreatAndPowerfulOz21-Dec-05 10:18
TheGreatAndPowerfulOz21-Dec-05 10:18 
GeneralRe: GetActiveWindow returns NULL Pin
wilbur_logan21-Dec-05 10:40
wilbur_logan21-Dec-05 10:40 
AnswerRe: GetActiveWindow returns NULL Pin
Rajesh R Subramanian21-Dec-05 17:22
professionalRajesh R Subramanian21-Dec-05 17:22 
GeneralRe: GetActiveWindow returns NULL Pin
wilbur_logan22-Dec-05 7:39
wilbur_logan22-Dec-05 7:39 
QuestionErase item from std::vector? Pin
Lord Kixdemp21-Dec-05 9:38
Lord Kixdemp21-Dec-05 9:38 
AnswerRe: Erase item from std::vector? Pin
TheGreatAndPowerfulOz21-Dec-05 9:39
TheGreatAndPowerfulOz21-Dec-05 9:39 
GeneralRe: Erase item from std::vector? Pin
Lord Kixdemp21-Dec-05 9:51
Lord Kixdemp21-Dec-05 9:51 
GeneralRe: Erase item from std::vector? Pin
toxcct21-Dec-05 21:38
toxcct21-Dec-05 21:38 
GeneralRe: Erase item from std::vector? Pin
Lord Kixdemp24-Dec-05 16:11
Lord Kixdemp24-Dec-05 16:11 
QuestionEvent Pin
sam117321-Dec-05 8:49
sam117321-Dec-05 8:49 
AnswerRe: Event Pin
TheGreatAndPowerfulOz21-Dec-05 9:38
TheGreatAndPowerfulOz21-Dec-05 9:38 
GeneralRe: Event Pin
sam117321-Dec-05 10:54
sam117321-Dec-05 10:54 
GeneralRe: Event Pin
Blake Miller22-Dec-05 6:07
Blake Miller22-Dec-05 6:07 
QuestionSwapping items in ListBox? Pin
Lord Kixdemp21-Dec-05 8:17
Lord Kixdemp21-Dec-05 8:17 
AnswerRe: Swapping items in ListBox? Pin
David Crow21-Dec-05 8:27
David Crow21-Dec-05 8:27 
GeneralRe: Swapping items in ListBox? Pin
Lord Kixdemp21-Dec-05 9:06
Lord Kixdemp21-Dec-05 9:06 

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.