Visual C++ :: Lag When Clicking MFC File Menu

Jan 9, 2014

I am developing a CFormView MFC app. When I go to click something on the menu, it takes awhile before the event happens. The project is build optimized in release mode. I have 3 additional threads and I thought they might be blocking the internal MFC framework stuff, but I use the Sleep() call in each thread to yield to the MFC main app.

View 7 Replies


ADVERTISEMENT

C# :: WPF Menu Item Not Clicking?

Nov 10, 2014

I have made a menuitem using the combo box, but when I add items in like in the image below:

[URL]

My problem is that when I move my mouse over the item it displays this darker box around the text:

[URL]

This stops me from clicking it and the code from being executed.

View 2 Replies View Related

Visual C++ :: Clicking On Radio Button Crashing Dialog

Mar 3, 2014

I have an existing dialog, having activex control, list control, tree control checkbox, button etc.... I added one radio button and executed the program. whenever i am clicking on the radio button, the dialog hang/crash. Even simply dragging one radio button from toolbox and executing also behaving in the same way.

View 2 Replies View Related

Visual C++ :: How To Show File Menu

Mar 14, 2013

I have an MDI application using different menus depending on the current document template in use.

I need to show the top-level File Menu from the IDR_MAINFRAME window when a command is sent from the active document.

I would like to application to deactivate the active child window and then show the File menu as if the alt-F key was pressed from the keyboard.

I have tried CMenu *pMenu=AfxGetMainWnd()->GetMenu();

but this does not display the menu at all.

View 2 Replies View Related

Visual C++ :: How To Modify File Menu Width

May 15, 2013

I derived a class from CRecentFileList in order to set the number of displayed chars for MRU.

The problem is that if I open the app with 256 set for this number (it is read from .ini file) the display is correct. But after I change it to 10 for e.g., File menu width remains unchanged altghough MRU are correctly displayed on 10 (or at least file name lenghts) chars.

how can I tell to the menu to shrink to actual width?

View 10 Replies View Related

Visual C++ :: SetTimer / OnTimer Causes File Menu To Flicker

Nov 26, 2012

I have a (large) application that works perfectly under XP. When I run it under Windows 7 the "File Edit View..." menu in my application flickers when everything is otherwise idle.

I have traced this down to SetTimer and its associated OnTimer function. OnTimer usually does nothing, so I have commented out everything leaving this:

Code:
void MyView::OnTimer(UINT nIDEvent) { }

I have also changed the SetTimer call to give one tick every five seconds.

I now see the same behaviour: the File menu is very briefly greyed-out every five seconds, leading to the flicker. Nothing else in the window is exhibiting this flicker.

So, I have a call to a null function every five seconds that manages to affect a menu.

what may be causing this?

View 12 Replies View Related

Visual C++ :: Enable / Disable Menu Item 2 In OnUpdate Handler Of Menu Item 1?

Sep 15, 2014

I have two menu items. When item 1 is disabled, I want item 2 to be disabled as well. In the OnUpdate handler of menu item 1, I have tried to use "t_pMenu = pCmdUI->m_pMenu;", "t_pMenu = pCmdUI->m_pSubMenu;" and "t_pMenu = pCmdUI->m_pParentMenu;" but I always get NULL t_pMenu. How can I achieve this purpose?

Code:
void CDummyView::OnUpdateMenuItem1(CCmdUI* pCmdUI)
{
if(m_bShowMenuItem1) {
pCmdUI->Enable(TRUE);

[Code]....

View 14 Replies View Related

C++ :: Menu Program Broken Down Into Series Of Calls To Function For Each Of Menu Items

Aug 19, 2013

I am trying to write a menu program that will be broken down into a series of calls to function for each of the menu items. Two of the menu items will be simple programs which I wrote.

I want two of the functions to run one of the two programs I am trying to include as items in the menu.

So far I am only familiar with variables, loops, if statements, and I just learned how to write functions.

The problem I am have is that I don't quite understand how to write a function that will run one of the two programs. Also I am having a hard time writing the program in away that would allow the user to select the menu items.

View 2 Replies View Related

C :: Program Based On Menu System - Option To Go Back To A Previous Menu

Apr 7, 2014

I'm creating a program that is based on a menu system. Basically each menu is its own user-defined function. The problem is at each menu you can input 'b' to go to the previous menu. I just have it call the function of that menu.

However, do the functions need to complete themselves eventually? If I just keep calling functions will I just keep going further and further deeper into ever running functions?

If so how do I avoid this and yet keep the option to go back to a previous menu/function?

View 2 Replies View Related

Visual C++ :: How To Reposition Menu Bar For Dialog Box

Dec 23, 2013

Normally, menu bar resides below the title bar. See attachment MenuBarOriginal.JPG

Is there a way that we can position the menu bar? For example,place it on the side or anywhere on the dialog box?

MenuBarModified.JPG is some sample of menu bar positions that I want to place.

I want to do this on a dialog box.

View 6 Replies View Related

Visual C++ :: Menu Item Separator

Aug 6, 2014

I'm using this tutorial for making an owner draw menu. [URL] ...

When I go into the .rc file and remove all of the MENUITEM SEPARATORs all the menu options are squished to the left of the menu as in the screenshot. As long as there is just one MENU SEPARATOR anywhere the menu is fine. If I could make the application without MENU SEPARATORs that would be awesome.

View 7 Replies View Related

C# :: Clicking A Button In WebBrowser Control?

Jul 8, 2014

I'm getting this strange problem with the webBrowser control that google can't find an answer for. When I click a button I get redirected to a page with just the letters 'e4' makes no sense to me?? is this a site problem or something to do with the webBrowser control?

View 9 Replies View Related

Visual C++ :: Change Menu Bar Font Size In Mainframe

Jul 30, 2014

Can change the menu bar font size in CMainFrame::OnCreate()? Here's what I have:

Code:

int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct) {
CRect rect;
GetClientRect(&rect);
if (CFrameWnd::OnCreate(lpCreateStruct) == -1) {
return -1;

[Code] ....

The line "m_wndToolBar.SetFont(&m_font);" does nothing.

View 2 Replies View Related

Visual C++ :: MFC - How To Change Font Of String With Menu Button

Dec 17, 2012

I want create menu button to change font of CString displyed in main window. We can see string "SAMPLE",and when i press menu button that i created i want to string "SAMPLE" to display with different font,i already created CFont object and added italic style with CreateFont;

This is my menu function:and CString m_text and CFont font1 are declared in FesbDoc.h

ON_COMMAND(ID_EDIT_FONT, &CFesbView::OnEditFont)
void CFesbView::OnEditFont() {
CFesbDoc* pDoc = GetDocument();
::::WHAT TO ADD HERE:::::::
Invalidate();
}

View 5 Replies View Related

Visual C++ :: How To Modify System Menu To Execute A Function

Feb 11, 2013

I wish to add the item 'Website' to an MFC Dialog app System Menu so that it can activate the following method:

Code:
void CMyDlg::OnWebpage()
{
ShellExecute( NULL, NULL, _T("[URL]..."), NULL, NULL, 0 );
}// OnWebpage()
I have tried this:

Code:

#define IDM_WEBSITE (WM_USER + 101)
//..
if (!strAboutMenu.IsEmpty())
{
pSysMenu->AppendMenu(MF_SEPARATOR);
pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu);
pSysMenu->AppendMenuW(MF_STRING, IDM_WEBSITE, _T("Website"));
}

[Code]...

The code compiles without error but and the 'website' item appears on the System Menu but it doesnt do anything.

I've inspected the following but don't really understand how it works and it seems to me there should be a simpler way to accomplish my end.

Modifying the System Menu By John Simmons 26 Jan 2007 [URL]....

View 8 Replies View Related

Visual C++ :: Menu Item To Explore Current Path

Feb 21, 2015

I quite often use an ide written in assembler: RadAsm3[URL] .....

It has a menu item to explore current path. I have used other ide's that have a similar feature but:

The one in RadAsm3 will activate a current Explorer window if the current path is the same as the one requested.
All others open a new Explorer window.

I would like to implement the RadAsm3 approach using Visual Studio 2013 Community c++ as my host compiler for testing.

I tried to get the title of current windows but it appears ShellExecute "explore" does not produce a conventional window???

View 1 Replies View Related

C/C++ :: Creating A Menu That Will Return The Menu After A Selection

Apr 7, 2014

This is what I have so far, it gives me a nice menu to select from and it all works but after I make a selection it closes the program. I tried to return to it but it won't work for me

#include <stdio.h>
int main() {
int choice;
int deposit;
int balance = 500; {
printf(" CHOOSE FROM THE FOLLOWING

[code]....

View 14 Replies View Related

Visual C++ :: Display Anti-aliased PARGB Bitmaps In A Menu

Dec 2, 2012

I'm attaching a project that demonstrates the issue. I need to display a context menu with anti-aliased bitmaps. I wrote my own method to convert an icon into a bitmap (see the CreatePARGBBitmapFromIcon() method) but the resulting bitmap seems to lose all anti-aliasing when displayed in a menu. What is interesting is that the same bitmap is displayed without any issues in a CStatic 'stPic1' control (the one in the middle.) The visual artifact also seems to be different on different OS. Take a look at the screenshots attached.

View 1 Replies View Related

C# :: (Grid) Stop User From Clicking Past A Certain Amount Of Block

May 21, 2014

0
down vote
favorite

So, I'm attempting to create a grid on the screen, and to do so, I've implemented a multidimensional array of Rectangles. When the program starts, I use a for loop to increase the x and y coordinates to form the grid.

public Form1() {
InitializeComponent();
for (int x = 0; x < 12; x++) {
for (int y = 0; y < 12; y++) {

[Code] ....

My issue is trying to figure out when the user has clicked on a rectangle, and furthermore, which rectangle in the array that he/she has clicked on. As I will change the border to red when given the correct rectangle.

I'm using Visual Studio 2008, and here is my code so far.

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;

[Code] .....

I'm making this into a real game, with classes and all.

View 7 Replies View Related

Visual C++ :: Member Function - Add Vertical Colour Text In Popup Menu

Jun 4, 2013

I was reading a c++ code written in embarcadero ide to add vertical colour text in popup menu.

While reading the code, I had seen following instructions.

private:

Code:
void __fastcall ExpandMenuItemWidth(TObject *Sender, TCanvas *ACanvas,int &Width, int &Height);

Code:
void __fastcall DrawNewItem(TObject *Sender, TCanvas *ACanvas, const TRect &ARect, bool Selected);

The above two methods used in the code like below:

Code:
PopupMenu1->Items->Items[i]->OnMeasureItem = ExpandMenuItemWidth;
PopupMenu1->Items->Items[i]->OnDrawItem = DrawNewItem;

What is happening when we are using member function without parameters like above?

I found above code at: [URL] ....

View 2 Replies View Related

Visual C++ :: Tool Tips Not Showing - Toolbar Menu Items Disabled / Inactive

Jan 8, 2014

My problem is ToolTips are not shown if any of the tool-bar menu items is disabled/inactive.

They are shown when all tool bar menus are active/enabled.

I am using TTS_ALWAYSTIP while creating Tool-Bar.

What to do to enable/display tool-tips always.

View 5 Replies View Related

C Sharp :: Show Results From Values In Text Boxes On Clicking Or Pressing Tab Button

Feb 21, 2013

I am developing application software.entering two textbox value,while click or pressing tab button in third textbox, the result needs to show in third textbox.

View 1 Replies View Related

Visual C++ :: CFileDialog Saves File In Project File - Not Specified File

Apr 12, 2013

I'm very new to MFC & VisualC++. I'm using MSVS2010 Pro. I am trying to write/debug a simple form that saves and restores the content of some edit controls. It seems to work as expected, except the file saves only to the Project Folder, regardless of where I browse and select to save the file.

Code:
void CMFC_FileDialogDlg::OnBnClickedbtnsave() {
this->UpdateData();
CFile f;
//Kinda Correct, Works but still saves in Project Folder
BOOL b_OpenFileDialog = FALSE;//this doesn't act as bool in CFileDialog?

[Code] ....

My only experience is a little simple VB programming in Excel, so any specific examples??? Also, rules seem to change from version to version? I have to "update" a number of undocumented programs.

View 4 Replies View Related

C++ :: Loading Menu For Files

Jun 11, 2014

I would like to make a program that automatically launches and loads a file when a file of that file type is double clicked within windows. As said I am unsure where to look for some information as to how to do that, and so turn to you all. Is there a simple way of doing such a thing without using any external libraries, if so, a simple tutorial or link to a reference for this; if there is no way of doing this without externals what would be a small and simple to use library for this?

View 2 Replies View Related

C :: Create A Menu With Program

Oct 29, 2014

So, I was trying to code a menu for a personal movie database. But I'm having some problems.So, this is what I did,

Code:
#include<stdio.h>
int main();
{
do
{printf("Menu

[Code]...

But this is not working.Furthermore I would also like add a sub menu.

View 7 Replies View Related

C :: Expandable Menu Framework

Mar 8, 2014

I'm new to C programming and I need to write a "small" expandable menu framework and I don't know where to start off.

This is my task: Create an expandable menu framework in C where you can add a infinite number of entries and Sub menus containing other Menu points or where the entries refer to a external function. So far I've created the structures I need

Code:
//Menu structure
struct menu {
char mtitel[MAX];
struct mpoint point;
struct menu *next, *prev;

[Code] .....

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved