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

C / C++ / MFC

 
Questionhow to save file name with unicode format??? Pin
shashankacharya26-Jul-11 23:29
shashankacharya26-Jul-11 23:29 
QuestionRe: how to save file name with unicode format??? Pin
Rajesh R Subramanian27-Jul-11 0:06
professionalRajesh R Subramanian27-Jul-11 0:06 
AnswerRe: how to save file name with unicode format??? Pin
shashankacharya27-Jul-11 0:17
shashankacharya27-Jul-11 0:17 
AnswerRe: how to save file name with unicode format??? Pin
Rajesh R Subramanian27-Jul-11 0:22
professionalRajesh R Subramanian27-Jul-11 0:22 
AnswerRe: how to save file name with unicode format??? Pin
«_Superman_»27-Jul-11 4:35
professional«_Superman_»27-Jul-11 4:35 
GeneralRe: how to save file name with unicode format??? Pin
Rajesh R Subramanian27-Jul-11 5:32
professionalRajesh R Subramanian27-Jul-11 5:32 
JokeRe: how to save file name with unicode format??? Pin
«_Superman_»27-Jul-11 7:28
professional«_Superman_»27-Jul-11 7:28 
QuestionManaging PushButton notifications under MFC Pin
tiwal26-Jul-11 23:01
tiwal26-Jul-11 23:01 
Hello
I have the following question.

I am new at MFC (I am using it with VC ++ 6.0).
I am trying to create a very simple window with a PushButton on it, supposed to activate a messagebox whenever it's clicked.
The wizard set the application with a MainFrame class, a View derived class, a Doc derived class (it's a SDI) and the usual App class.
On my behalf I added a simple CButton derived class.
This class has a constructor which receives the button's coordinates, calls the base constructor CButton () and then the Create () method on those coordinates.
I instantiate the button derived object on the InitInstance() method of the App derived class.
This object is a heap object , so I first declare a pointer and then call the contructor with some coordinates.
The pushbutton appears regularly, but when it comes to managing the BN_CLICKED event,things begin to get confusing.
I added the ON_BN_CLICKED () macro to the parent window's message map (which is the View class object), as MSDN suggests, and gave it my personal message handler's overload.
Well it seems that the BN_CLICKED event is never triggered : all I can detect is WM_LBUTTONDOWN
which I can manage, but the problem is, this event is triggered whenever I click on the window, no matter if I click on the button or not.
My question is : why does MSDN state that BN_CLICKED is triggered when a push button is clicked ? What can I do to get that event triggered and possibly managed ?

To avoid misunderstandings, I want to make it clear that I am NOT using a pushbutton in a Dialog , but right in a main window.

Thank you
AnswerRe: Managing PushButton notifications under MFC Pin
Richard MacCutchan26-Jul-11 23:11
mveRichard MacCutchan26-Jul-11 23:11 
GeneralRe: Managing PushButton notifications under MFC Pin
tiwal26-Jul-11 23:37
tiwal26-Jul-11 23:37 
GeneralRe: Managing PushButton notifications under MFC Pin
Richard MacCutchan26-Jul-11 23:43
mveRichard MacCutchan26-Jul-11 23:43 
GeneralRe: Managing PushButton notifications under MFC Pin
tiwal26-Jul-11 23:56
tiwal26-Jul-11 23:56 
GeneralRe: Managing PushButton notifications under MFC Pin
Richard MacCutchan27-Jul-11 2:39
mveRichard MacCutchan27-Jul-11 2:39 
GeneralRe: Managing PushButton notifications under MFC Pin
tiwal27-Jul-11 3:07
tiwal27-Jul-11 3:07 
GeneralRe: Managing PushButton notifications under MFC Pin
Richard MacCutchan27-Jul-11 3:19
mveRichard MacCutchan27-Jul-11 3:19 
GeneralRe: Managing PushButton notifications under MFC Pin
tiwal27-Jul-11 3:23
tiwal27-Jul-11 3:23 
GeneralRe: Managing PushButton notifications under MFC Pin
Richard MacCutchan27-Jul-11 3:29
mveRichard MacCutchan27-Jul-11 3:29 
AnswerRe: Managing PushButton notifications under MFC Pin
Madhu Nair26-Jul-11 23:35
Madhu Nair26-Jul-11 23:35 
GeneralRe: Managing PushButton notifications under MFC [modified] Pin
tiwal26-Jul-11 23:46
tiwal26-Jul-11 23:46 
QuestionHow to compile a file using unicode charset Pin
Cold_Fearing_Bird26-Jul-11 21:50
Cold_Fearing_Bird26-Jul-11 21:50 
AnswerRe: How to compile a file using unicode charset Pin
Madhu Nair26-Jul-11 22:01
Madhu Nair26-Jul-11 22:01 
QuestionDelete doesn't ^delete^ a reference? Pin
Dean Seo25-Jul-11 20:58
Dean Seo25-Jul-11 20:58 
AnswerRe: Delete doesn't ^delete^ a reference? Pin
Richard MacCutchan25-Jul-11 21:24
mveRichard MacCutchan25-Jul-11 21:24 
GeneralRe: Delete doesn't ^delete^ a reference? Pin
Dean Seo26-Jul-11 14:11
Dean Seo26-Jul-11 14:11 
AnswerRe: Delete doesn't ^delete^ a reference? Pin
Chris Losinger26-Jul-11 1:45
professionalChris Losinger26-Jul-11 1:45 

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.