MFC DLL class problem...very strange!Well, here is the (strange!) situation. I wrote couple of classes that I
first test in an exe. Then I decided, to export them to an MFC DLL. I
created the DLL and of course, added the AFX_EXT_CLASS (this is not the
first time I'm doing that) to the headers. Now here is the really strange
thing. I'm calling the GetQueuedCompletionStatus(). This function returns
(among other things) an object pointer as part of the IOCP. The pointer that
this function returns (the overlapped pointer) and please be patient here,
is 4 bytes higher then the ACTUAL address of the formerly passed point...
XML editor using MFC #2i need sourse code for xml editor using MFC and having functions
parser and tree view.
<chobhe.amruta@gmail.com> wrote in message
news:9d750e34-ced6-4d7a-a17f-e116c0b1be30@i12g2000prf.googlegroups.com...
>i need sourse code for xml editor using MFC and having functions
> parser and tree view.
The Ultimate Toolbox is now open source, at this link download the samples,
there is a sample called "Parser" for their OXParser which shows a tree of
XML elements and the contents of the element on the right side.
http://www.codeproject.com/KB/MFC/UltimateToolbox.aspx
-- Dav...
Problems with controls in MFC !I inserted 2 ComboBoxes Controls in a MDI Child FormView.
I have defined 2 class member variables of type CComboBox using
ClassWizard (tab variables) to manage the controls but each time I try
to use these variables to call a CCombox method (or inherited methods
from CWnd) especially EnableWindow() the call raises an assertion
failure on ASSERT(IsWindow(h_Wnd))
Test in EnableWindow() method in file winocc.cpp . h_Wnd seems to be
NULL
I encountered the same problem with a Datagrid control. I have eahc
time to call getDlgItem(IDC_DATAGRID) to get a instance of the
control.
Why it is not possibl...
MFC program errorHi,
I am new to MFC and I want to know how to make a program work behind
the scenes(memory resident).Can anyone help on that please?
All programs execute memory resident. In fact, that is the definition of a program: it is
a bunch of instructions resident in memory.
The old "terminate and stay resident" of MS-DOS was just a poor hack at attempting to have
multiple programs running at once. In Windows, all programs are running.
There are more serious questions, such as "what do you want it to do?" and "do you want it
running for the logged-in user?"
System...
About DRAG/COPY in CDHTMLDialog created in MFC DLLHi,
I have a question about using CDHTML dialog in DLL.
If you create a simplest project about popup a CDHTML
dialog from a MFC DLL, you will find that you cannot
select and copy the HTML's contents and drag a link or
drop a link into it.
If you make the example more complex, you can make one
CDHTML dialog created by local executable project, another
by calling the function of the MFC DLL you created; then
you will find a strange thing: if you open the local
generated DHTML dialog first, then both dialog's drag/copy
functions correctly; if you open the DLL function calling
dia...
how to add controls to a group control in mfc?Hii ..
I have a really simple question, Im trying to add some controls (e.g
edit boxes and radio buttons) to a group box in MFC in visual studio
2003.
What I want is that in the Dialog editor when I move the group box with
my mouse, all the controls inside the group box move along with it too.
Also I want to enable / disable all the controls inside the group box
on the fly by just enabling/disabling the groupbox
Is it possible to do that?
Thanks
Arfeen
arfeengodil@gmail.com wrote:
> Hii ..
>
> I have a really simple question, Im trying to add some controls (e.g
> edit boxes an...
MFC...
I Have an MFC App, my view inherit from CFormView and I had inserted a ListBox inside the form, how can adjust the heigth of this ListBox to the heigth of my client area, I try and try... but I can't do..
Can any one help me? Please..
You can change its size using SetWindowPos. To get the size of the view, you can call
GetClientRect on it.
--
Ajay Kalra [MVP - VC++]
ajaykalra@yahoo.com
"George Douglas" <hecodalys@hotmail.com> wrote in message
news:66C2FC84-3ABA-4913-83E9-E5B8719BF79C@microsoft.com...
|
|
| I Have an MFC App, my view inherit from CFormView an...
Migrating an mfc application from windows 2000 to Windows 2003Hi,
I am developing a tool in C# for the Project "Migrating an mfc application
from windows 2000 to Windows 2003" in which if you are giving your
application developed in windows 2000 as input then it will scan through the
code in your application and find out the functions which are changed
(parameter changes or deprecated) for the windows 2003 and list those
functions. For that I would like to know the list of mfc function's that have
obsolete and also changed in Windows 2003(but present in Windows 2000). Could
you please furnish
Additional URL's for our reference....
MFC class for newsgroupsHello,
I was just wondering if there is a MFC class to access Newsgroups ? Thanks
for you time.
Willy
"Willy" <whoffman@frii.com> wrote in message
news:%23O$l1mkRDHA.3796@tk2msftngp13.phx.gbl...
> Hello,
>
> I was just wondering if there is a MFC class to access Newsgroups ? Thanks
> for you time.
>
> Willy
>
>
I think CSocket or one of its derivatives is the way to go. Open the
connection to the server on port 119 (the NNTP port).
--
MiniDisc_2k2
To reply, replace nospam.com with cox dot net.
Keep away from CSocket. Very far away. As far as y...
seh and mfci need to use structured exception handling with mfc.
the idea is to protect a code fragement from memory access violation.
but the compiler gives the error cannot use seh in function that requires
object unwinding.
my question is - how does the OS - Windows - does it?
if my MFC app fails for memory access violation, theOS will trap the
exception using SEH, even that my destructor was supposed to be called, I
really don't think it will be called.
so how do I protect my MFC code against OS failures?
TIA
z f wrote:
> i need to use structured exception handling with mfc.
> the id...
registering for .NET events from MFC C++ (How)?Folks,
I have a C# .NET Assembly that is called from an MFC C++ application. The
assembly is marked as COM visible so I'm accessing the assembly from MFC C++
via COM. Everything works great but here is my question:
I need to create an event in the .NET Assembly and have the MFC C++
application register for this event and handle the event.
Can anyone provide an example or a link for doing this? Any help would be
appreciated.
Thanks in advance,
--
Anthony Yott
It is mush easier if you add CLR support to your MFC app.
"Anthony Yott" <anthonyyott@hotmail.com> д���ʼ�
...
MFC calling another MFCHi Guys,
Can anyone tell me how to call an MFC from another MFC, for example, I
have this Main Menu GUI from which I would call another sub-menu MFC
dialog, for that point I'd like to close the Main-Menu GUI and
continue with sub-menu GUI, after I've done with Sub-Menu GUI, I'd
like to call Main-Menu GI again.
What are pros and cons regarding this?
Thanks.
Regards,
Ginanjar
I am not sure if this means MFC calling another MFC. All you are doing is
showing a dialog in a command and hiding the main frame window and vice
versa. I am assuming both the windows belong to the same
...
Running DOS program within MFC GUI APPHi All,
Within the MFC environment, what is the preferred way to synchronously spawn
(i.e. execute and wait) a DOS console application (with an argv argument
list). Sure, I could use CRT's _spawn, but is there a more appropriate way
within the MFC classes/Afx<*> functions?
I do understand that I have should start the DOS app in it's own thread to
not block the calling GUI, so that's no problem.
Thanks in Advance!
C.
>Within the MFC environment, what is the preferred way to synchronously spawn
>(i.e. execute and wait) a DOS console application (with an argv argume...
MFC and ATL SimpleObjectHow to create a component like ATL SimpleObject in MFC ?
Thanks,
Could please tell Excatly where does the ATL SimpleObject lies
--
With Regards
Alok Gupta
Visit me at http://alok.bizhat.com
"I Believe this will Help"
"Tom Alter" <Lord2702@MSN.com> wrote in message
news:ul4Hu4lJFHA.2884@tk2msftngp13.phx.gbl...
> How to create a component like ATL SimpleObject in MFC ?
>
> Thanks,
>
>
Hello Alok:
You can create this SimpleObject, or COM+ 1.0 Object when you want to add an ATL class,
just like you add an ActiveX contr...
CheckedListBox in MFCTo start with let me say I am completely new to VS so my questions are
newbie's and may be real stupid.
Please bear with me.
I started writing an application in VS C++ and built it as a Window Forms
Application.
This was all ok until I realised I wanted a container window with
sub-windows.
So, I created an MFC SDI.
Now I wish to recreate my application there.
However, I can't find the CheckListBox in the list of items in the tools
box.
I tired using "Custom Control" and setting the class to CCheckListBox but
that didn't work.
Can anyone explain what I SHOULD be doing...
Repeating Button in MFC?I am trying to use a button on a dialog box that has the property that
whenever it is held down with a left mouse click, the message handler
will be called repeatedly until the user removes his hand from the left
mouse button. The default OnButtonClicked handler is only called when
the button is released. Any suggestions would be appreciated.
Bob
On 12 May 2005 11:09:05 -0700, Bob wrote:
> I am trying to use a button on a dialog box that has the property that
> whenever it is held down with a left mouse click, the message handler
> will be called repeatedly until the user remove...
Unicode MFC program error in mfc70ud.dllHi ,
I am writing an unicode MFC program, I found that after my program have been
run for few hours, a error message popup.
The error message shows " Unhandled exception at 0x7c36743b (mfc70ud.dll) in
program.exe: User breakpoint"
After that, I click "Play", the error is inside the function "OnPaint".
Anyone knows what is happening??
Thanks in advance!
Best Regards
Crystal
"Wing Yee" <linwingyee@hotmail.com> wrote in message
news:%234mDRwpsEHA.3200@TK2MSFTNGP14.phx.gbl...
> Hi ,
>
> I am writing an unicode MFC program, I found t...
ATL DLL project with MFCI am using VC++ .NET 2002
I created a new ATL DLL project with MFC support using the wizard. When I
build the project, I get the following error:
fatal error LNK1104: cannot open file 'mfc42d.lib'
I have not added any code, just using the default wizard generated files.
Is this an installation problem? Do I need to add some libraries or paths
first?
I do have the mfc70* libs in the lib folder and it is in the path.
This also happens when I create a regular DLL with dynamic MFC project.
- Ajay
...
What MFC Objects Can't be created on the Stack?For example: I need to change fonts quite a bit in my application. I am not sure
which objects must be persistent, and which objects can be immediately destroyed
upon use. In the following function only Screen is persistent. Will this lead to
resource or memory leaks? Where can I find out more about preventing resource
leaks?
ChangeFont(CDC& Screen) {
CFont NewFont;
LOGFONT lf;
ChangeLOGFONT(lf);
NewFont.CreateFontIndirect(&lf);
Screen.SelectObject(&NewFont);
}
Peter Olcott wrote:
> For example: I need to change fonts quite a bit in my application. I am not su...
Running Windows Media Player from MFC Application Query?Hi all
I am making an application in which i displaying in a list control all the
mp3 files belonging to a folder selected by the user.
I want to add the following functionality.
As soon as the user double clicks on any of the displayed MP3 file, i want
to invoke the windows Media Player and play that MP3 file.
Now how i invoke the Windows Media Player for my MFC Application?
Waiting for suggestions
Regards
...
If I could.. another MFC / UNicode questionThanks for the help so far folks..
I have recoded my app to use unicode and it compiles fine. It did not link
as there were a large amount of unresolved external symbols.
All of which are the wide versions of the MFC lib.. like GetWindowTextW,
WriteProfileStringW, etc etc..
I reinstalled VS.NET 2003 and I selected the unicode libs / dlls to be
installed but the build still fails to link..
I must be missing something stupid..
Thanks
Elan.
"Elan Magavi" <Elan@nomailnospam.com> wrote in message
news:YFM9h.9584$6t.7336@newssvr11.news.prodigy.com...
> Thanks for the...
How to play a ppt presentation in a view of an mfc app?Hi,
Is it possible to play a ppt presentation within a view of an mfc app? I've
seen some examples on the Net that use the application object and play
presentations outside of mfc apps' windows. Ideally I'd like to either
provide my own window to PowerPoint (preferably Viewer) or get PowerPoint's
window and use it as a child in relation to my CView-derived class. I guess
this would be similar to what you can do with WMP, FlashObject, etc.
Any suggestions, pointers, or examples will be very appreciated.
Thanks,
Bogdan
Here is an example:
http://www.learnstar.com/A...
Visual C++ 2005 express edition and MFC ?Hello.
Before downloading the "Visual C++ 2005 express edition" to try it, is there
somebody who can tell me if this new tool enables to create MFC applications
?
With many thanks.
Marc
AFAIK, the answer is "no". See FAQ 42 at
http://msdn.microsoft.com/vstudio/express/support/faq/default.aspx :
"42.Does Visual C++ 2005 Express Edition include MFC and ATL?
No, MFC and ATL are not included with Visual C++ 2005 Express. MFC and ATL
will be included in all other Visual Studio 2005 Editions."
Mike
"Marc Loiry" <nospam@nospam.fr> wrote in me...
how can I read Word document by MFC?How can I read Word document by MFC
Can this infomation be found in MSDN
Thank
Troy
INFO: Using Visual C++ to Automate Office
http://support.microsoft.com/default.aspx?scid=kb;en-us;238972
Office Automation Using Visual C++
http://support.microsoft.com/default.aspx?scid=kb;en-us;196776
--
Rodrigo Corral Gonz�lez [MVP]
microsoft.public.es.vc FAQ
http://vcfaq.europe.webmatrixhosting.net
...
MFC Printing issue
Hi to all.
I'm trying to build an app using mfc/gdi+ (VC++ 6.0) that prints a
CScrollView with zooming capabilities. I've already managed to print
some sort of "scale to fit the page" (sort of complicated, but if
someone wants the code i'll post it), and now I'm messed up with
printing "WYSIWYG".
The problem I have here is that I can't seem to catch how to "scroll"
the printing DC. The DC is set with mapping mode MM_ISOTROPIC, and I've
tried using ScrollDC, SetViewportOrg, SetWindowOrg...and it doesn't do
what I want.
To put it in c...