Click here to Skip to main content
15,892,809 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Trapping Kill Focus from my Custom Control Pin
tabish12120-Jan-04 5:10
tabish12120-Jan-04 5:10 
GeneralRe: Trapping Kill Focus from my Custom Control Pin
Roger Allen20-Jan-04 5:18
Roger Allen20-Jan-04 5:18 
GeneralRe: Trapping Kill Focus from my Custom Control Pin
tabish12120-Jan-04 7:01
tabish12120-Jan-04 7:01 
Generalhelp Pin
Anonymous20-Jan-04 3:12
Anonymous20-Jan-04 3:12 
GeneralRe: help Pin
Larry J. Siddens20-Jan-04 3:39
Larry J. Siddens20-Jan-04 3:39 
GeneralMFC code works in some directorys and not others Pin
BrockVnm20-Jan-04 3:05
BrockVnm20-Jan-04 3:05 
GeneralRe: MFC code works in some directorys and not others Pin
Ravi Bhavnani20-Jan-04 4:38
professionalRavi Bhavnani20-Jan-04 4:38 
QuestionHow to create Listbox VC .NET Pin
sallas20-Jan-04 2:37
sallas20-Jan-04 2:37 
I am trying to add a member to a listbox in VC .NET dialog project to add a list of string entries (m_list.AddString("A")).
In VC 6 MFC it's a matter of right clicking the list box and selecting classwizard, member variables and selecting add variable.
In doing the same in .NET (Right click list box, add variable) and before adding any code and just compiling, I get the following error:
"Unhandled exception error at 0x00000000 in project.exe: 0xC0000005: Access violation reading location 0x00000000."

I even created a brand new Dialog project and just added a list box, added the member and get the exact same error msg! Doing it in VC 6 MFC, it works a treat!

Also can any one offer advice on how using VC++ .NET (MFC App) to take 'focus' of a button and its associated menu item on selection of another button and its associated menu item.

For example, I have two projects one being Single doc and the other a dialog based. They each do the same thing, however on
selection of Button A (or its corresponding menu Item in Single doc):
1. In the single document I need to take focus (i.e. Grey out) off 3 buttons on the toolbar and their corresponding menu items.

2. Same above for the dialog project, only instead of buttons it is a list box and there are menu items.

I thought in the Update Command for ButtonA I could simply add something like:

pCmdUI->Enable(!button1)
pCmdUI->Enable(!button2)
pCmdUI->Enable(!button3)

However this just disables Button A! I then tried adding:

If (checked)
pCmdUI->Enable(!button1)

to all of the buttons Update Command function that would have the variable 'checked' set to true by action of code in Button A's Command function. However this only worked if the button to be greyed was selected after Button A was.


Any ideas??

TIA


AnswerRe: How to create Listbox VC .NET Pin
Michael P Butler20-Jan-04 3:42
Michael P Butler20-Jan-04 3:42 
GeneralRe: How to create Listbox VC .NET Pin
sallas20-Jan-04 11:12
sallas20-Jan-04 11:12 
AnswerRe: How to create Listbox VC .NET Pin
Larry J. Siddens20-Jan-04 3:42
Larry J. Siddens20-Jan-04 3:42 
QuestionAccessing contents of Shell Folder Query? Pin
arrya_amit20-Jan-04 2:28
arrya_amit20-Jan-04 2:28 
QuestionHow to get/set the position of buttons, ListCtrl etc.? Pin
P-Rex20-Jan-04 1:52
P-Rex20-Jan-04 1:52 
AnswerRe: How to get/set the position of buttons, ListCtrl etc.? Pin
SJolly20-Jan-04 2:21
SJolly20-Jan-04 2:21 
AnswerRe: How to get/set the position of buttons, ListCtrl etc.? Pin
David Crow20-Jan-04 2:56
David Crow20-Jan-04 2:56 
QuestionAnybody who knows about Visual C++ Speech applications? Pin
satcat20-Jan-04 1:20
satcat20-Jan-04 1:20 
GeneralLoading Bitmap over the Button Pin
P. Gnana Prakash20-Jan-04 1:11
P. Gnana Prakash20-Jan-04 1:11 
GeneralRe: Loading Bitmap over the Button Pin
Monty220-Jan-04 1:48
Monty220-Jan-04 1:48 
GeneralRe: Loading Bitmap over the Button Pin
Anonymous20-Jan-04 1:57
Anonymous20-Jan-04 1:57 
GeneralRe: Loading Bitmap over the Button Pin
David Crow20-Jan-04 2:57
David Crow20-Jan-04 2:57 
GeneralMFC Clist and adding new objects Pin
Anonymous20-Jan-04 0:37
Anonymous20-Jan-04 0:37 
GeneralRe: MFC Clist and adding new objects Pin
Mike Dimmick20-Jan-04 2:02
Mike Dimmick20-Jan-04 2:02 
Questionhow can i define a new language in VC++ ?? Pin
cyberiafreak20-Jan-04 0:34
cyberiafreak20-Jan-04 0:34 
AnswerRe: how can i define a new language in VC++ ?? Pin
TrueKaine20-Jan-04 1:09
TrueKaine20-Jan-04 1:09 
GeneralCD3DFont Pin
Exim20-Jan-04 0:01
Exim20-Jan-04 0:01 

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.