Click here to Skip to main content
15,906,626 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Generalvariable question Pin
Timothy Grabrian6-Jul-04 7:21
professionalTimothy Grabrian6-Jul-04 7:21 
GeneralRe: variable question Pin
Jeremy Falcon6-Jul-04 7:28
professionalJeremy Falcon6-Jul-04 7:28 
GeneralRe: variable question Pin
Timothy Grabrian6-Jul-04 7:42
professionalTimothy Grabrian6-Jul-04 7:42 
GeneralRe: variable question Pin
David Crow6-Jul-04 9:29
David Crow6-Jul-04 9:29 
GeneralRe: variable question Pin
Timothy Grabrian6-Jul-04 14:55
professionalTimothy Grabrian6-Jul-04 14:55 
GeneralRe: variable question Pin
Ryan Binns6-Jul-04 18:31
Ryan Binns6-Jul-04 18:31 
GeneralRe: variable question Pin
David Crow7-Jul-04 2:33
David Crow7-Jul-04 2:33 
GeneralMFC CFrameWnd setting always-on-top Pin
_rubinho_6-Jul-04 6:19
_rubinho_6-Jul-04 6:19 
I've an application written in MFC. The main window is a subclass of CFrameWnd. I'd like to have an option to set the window always-on-top, so I've got a check menu item "Always on top" on my "View" menu. The command handler for this (method OnAlwaysOnTop) checks the state of the menu item check, toggles it (this works fine) then calls this->ModifyStyleEx( 0, WS_EX_TOPMOST ) or this->ModifyStyleEx( WS_EX_TOPMOST, 0 ) depending on whether it is setting or clearing the state respectively. For some reason I always get a zero return from ModifyStyleEx() meaning it has failed (non-zero means success) and the window does not go topmost.

- Can a CFrameWnd (or a derived class) have the WS_EX_TOPMOST extended style set?
- Does the WS_EX_TOPMOST extended style actually mean always-on-top or does it simply bring to front until another window is activated?
- The window is created using Create(), in order to use extended styles must I use CreateEx()?

In the debugger this is definetly the correct derived class.

Any tips on how I can achieve this feature?

Thanks all in advance. Please ask if I have been unclear on anything or you need more information.

Cheers,

Robin
GeneralRe: MFC CFrameWnd setting always-on-top Pin
palbano6-Jul-04 6:33
palbano6-Jul-04 6:33 
GeneralRe: MFC CFrameWnd setting always-on-top Pin
_rubinho_6-Jul-04 22:32
_rubinho_6-Jul-04 22:32 
Questionhow can I catch WM_DROPFILES from a list view control's in api win32 Pin
youpiyoyo6-Jul-04 5:47
youpiyoyo6-Jul-04 5:47 
AnswerRe: how can I catch WM_DROPFILES from a list view control's in api win32 Pin
palbano6-Jul-04 6:07
palbano6-Jul-04 6:07 
GeneralRe: how can I catch WM_DROPFILES from a list view control's in api win32 Pin
youpiyoyo6-Jul-04 6:10
youpiyoyo6-Jul-04 6:10 
GeneralRe: how can I catch WM_DROPFILES from a list view control's in api win32 Pin
palbano6-Jul-04 6:29
palbano6-Jul-04 6:29 
GeneralRe: how can I catch WM_DROPFILES from a list view control's in api win32 Pin
youpiyoyo6-Jul-04 11:42
youpiyoyo6-Jul-04 11:42 
GeneralRe: how can I catch WM_DROPFILES from a list view control's in api win32 Pin
palbano6-Jul-04 15:54
palbano6-Jul-04 15:54 
GeneralRe: how can I catch WM_DROPFILES from a list view control's in api win32 Pin
youpiyoyo7-Jul-04 5:55
youpiyoyo7-Jul-04 5:55 
GeneralMoveWindow problem Pin
BlackDice6-Jul-04 5:31
BlackDice6-Jul-04 5:31 
GeneralRe: MoveWindow problem Pin
0v3rloader6-Jul-04 5:44
0v3rloader6-Jul-04 5:44 
GeneralRe: MoveWindow problem Pin
BlackDice6-Jul-04 6:01
BlackDice6-Jul-04 6:01 
GeneralRe: MoveWindow problem Pin
palbano6-Jul-04 6:24
palbano6-Jul-04 6:24 
GeneralRe: MoveWindow problem Pin
BlackDice6-Jul-04 6:31
BlackDice6-Jul-04 6:31 
GeneralRe: MoveWindow problem Pin
palbano6-Jul-04 6:45
palbano6-Jul-04 6:45 
GeneralRe: MoveWindow problem Pin
BlackDice6-Jul-04 7:04
BlackDice6-Jul-04 7:04 
GeneralRe: MoveWindow problem Pin
palbano6-Jul-04 9:52
palbano6-Jul-04 9:52 

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.