Click here to Skip to main content
15,887,434 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralD3DXCreateTextureFromFile and CBitmap Pin
akira325-Aug-05 12:51
akira325-Aug-05 12:51 
Questionhow to create 2 splitters in a window (using MFC) Pin
/*Trucker*\5-Aug-05 11:21
/*Trucker*\5-Aug-05 11:21 
AnswerRe: how to create 2 splitters in a window (using MFC) Pin
GKarRacer5-Aug-05 12:00
GKarRacer5-Aug-05 12:00 
GeneralRe: how to create 2 splitters in a window (using MFC) Pin
/*Trucker*\5-Aug-05 13:03
/*Trucker*\5-Aug-05 13:03 
GeneralRe: how to create 2 splitters in a window (using MFC) Pin
GKarRacer5-Aug-05 13:32
GKarRacer5-Aug-05 13:32 
GeneralRe: how to create 2 splitters in a window (using MFC) Pin
/*Trucker*\5-Aug-05 14:05
/*Trucker*\5-Aug-05 14:05 
Generalgrid with comboboxes in CFormView Pin
Spiritofamerica5-Aug-05 11:10
Spiritofamerica5-Aug-05 11:10 
GeneralOpening system menu with code don’t work Pin
Patric_J5-Aug-05 10:27
Patric_J5-Aug-05 10:27 
Hi, I want to open the system menu of a window from code instead of as usual letting the user do it by right mouse-clicking on the top left icon. I use GetSystemMenu() to get the system menu and TrackPopupMenu() to display it. The system menu shows up but when I click on any menu item, nothing is routed back to the window. OnSysCommand() which normally receives system menu clicks is not called. However if the system menu is opened by the user as usual, everything works fine. What do I do wrong? How do I trap the menu item clicks?

Here’s the code from my test project, a standard dialog based application, TestDlg inherits from CDialog so this pointer is the dialog itself with the OnSysCommand() method.

void TestDlg::OnButton()
{
CMenu* pSysMenu = GetSystemMenu(FALSE);
pSysMenu->TrackPopupMenu(0, 100, 100, this);
}

/Thanks, Patric


/Patric
My C# blog: C# Coach
GeneralRe: Opening system menu with code don’t work Pin
GKarRacer5-Aug-05 11:35
GKarRacer5-Aug-05 11:35 
GeneralRe: Opening system menu with code don’t work Pin
Patric_J8-Aug-05 3:25
Patric_J8-Aug-05 3:25 
GeneralCommon Language Runtime Debugging Services Error Pin
sysx5-Aug-05 8:52
sysx5-Aug-05 8:52 
GeneralRe: Common Language Runtime Debugging Services Error Pin
Trollslayer5-Aug-05 10:20
mentorTrollslayer5-Aug-05 10:20 
GeneralRe: Common Language Runtime Debugging Services Error Pin
sysx5-Aug-05 15:45
sysx5-Aug-05 15:45 
GeneralRe: Common Language Runtime Debugging Services Error Pin
sysx6-Aug-05 7:19
sysx6-Aug-05 7:19 
GeneralDrawing in a Memory DC Pin
Axonn Echysttas5-Aug-05 6:59
Axonn Echysttas5-Aug-05 6:59 
GeneralRe: Drawing in a Memory DC Pin
Jose Lamas Rios6-Aug-05 16:46
Jose Lamas Rios6-Aug-05 16:46 
Generalcomplex numbers error Pin
Oriented5-Aug-05 6:00
Oriented5-Aug-05 6:00 
GeneralRe: complex numbers error Pin
BlackDice5-Aug-05 7:36
BlackDice5-Aug-05 7:36 
Generalit dosn't work either!! Pin
Oriented5-Aug-05 8:03
Oriented5-Aug-05 8:03 
GeneralRe: complex numbers error Pin
Gary R. Wheeler5-Aug-05 15:36
Gary R. Wheeler5-Aug-05 15:36 
QuestionInterlockedExchangeAdd - how much contention? Pin
peterchen5-Aug-05 5:33
peterchen5-Aug-05 5:33 
GeneralRe: InterlockedExchangeAdd - how much contention? Pin
Alexander M.,7-Aug-05 4:46
Alexander M.,7-Aug-05 4:46 
QuestionHow to find the memory usage programatically? Pin
appuanbu5-Aug-05 5:01
appuanbu5-Aug-05 5:01 
AnswerRe: How to find the memory usage programatically? Pin
Blake Miller5-Aug-05 6:09
Blake Miller5-Aug-05 6:09 
GeneralRe: How to find the memory usage programatically? Pin
appuanbu5-Aug-05 6:18
appuanbu5-Aug-05 6:18 

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.