|
I've already tried to put the include everywhere, above, under, in another file, ... It didn't work.
I've tried it once again, and guess what...
tnx m8.
using: [VISUAL STUDIO 6.0 sp5] [WIN98/2]
|
|
|
|
|
Zizilamoroso wrote:
#include "stdafx.h>
Is the mixing of '"' and '>' a typo?
There is nothing more in your files than what you wrote? Then you probably need to add
class_a.cpp:<br />
#include "class_a.h"
Does it help?
Who is 'General Failure'? And why is he reading my harddisk?!?
|
|
|
|
|
Hi All
How can I design the form in vc++ that should appear like a form which pops up when we click at office assistance help in MS Word.
Thanks
|
|
|
|
|
Just a dialog box but to have some background invisible.
There are some articles in codeproject which explain this.
Sonork 100.41263:Anthony_Yio
|
|
|
|
|
These assistant are called MSAgent
And there is complete SDK Available for programming these agents,
one can download this SDK from microsoft Site.
There are many third party characters available as well.
Microsoft also provide MsAgent editor , using which one can create its own characters.
Atif Mushtaq
No Worries
|
|
|
|
|
|
Thanks for helping me
If u donot mind go to the MSWord Help and select office assistant,u will find office assistance image character
appear and then click and u will see form appear on the screen(If do searching). I want like that form and button flushing.
Thanks
|
|
|
|
|
there is a CCheckListBox, there is a CDragListBox, but how to use functions
of both classes?
thanks
|
|
|
|
|
I would like to make my program to fit into paper
when printing out. I know we should deal with that
with this function but I am not sure about parameter
Does anyone know what to put?
BITMAPINFOHEADER *pBMI = (BITMAPINFOHEADER*)(LPVOID)lock;
int nColors = 0;
if( pBMI->biBitCount <= 8 )
nColors = ( 1<< pBMI->biBitCount );
if( b_PrintFit )
{
::StretchDIBits( pDC->GetSafeHdc( ),
pInfo->m_rectDraw.left,
pInfo->m_rectDraw.top,
pBMI->biWidth,
pBMI->biHeight,
0,
0,
pBMI->biWidth,
pBMI->biHeight,
(LPBYTE)pBMI + (pBMI->biSize + nColors * sizeof(RGBQUAD)),
(BITMAPINFO*)pBMI,
DIB_RGB_COLORS,
SRCCOPY);
Thanks
shin
|
|
|
|
|
10th parameter of StretchDIBits should be a pointer to a buffer containing RGB data of bitmap you want to print.
For eg.
CBitmap bmp;
bmp.LoadBitmap(IDB_SOMEBITMAP);
BITMAP bm;
bmp.GetBitmap(&bm);
bm.bmBits is the pointer you need.
Other parameters may be right or wrong cause I dont know what they mean in your program.
By the way, for printing a bitmap you should to create a printer DC and to calculate destination rectangle with paper resolution.
For more info see MSDN!
|
|
|
|
|
recently, i found there is a useful feature in HyperSnap-DX 5, that is capturing the whole scrolled window content into a big bitmap, and I think it is very interesting and try to impliment it in VC,but i failed.I have tried to use ScrollWindowEx, WM_VSCROLL and others, does anynone has any idea on the problem?
Best regard
|
|
|
|
|
|
Hi all,
I've created a MFC extention dll project. in the stdafx.h file i've wrote:
#undef _GUI_LIB_EXPORT_
#ifdef _EXPORT_GUI_LIB_
#define _GUI_LIB_EXPORT_ __declspec(dllexport)
#else
#define _GUI_LIB_EXPORT_ __declspec(dllimport)
#endif
i have 2 exported classes, 1 is a dialog, the other one is a button:
1) class _GUI_LIB_EXPORT_ CMyDlg : public CDialog
2) class _GUI_LIB_EXPORT_ CMyBtn : public CButton
i use an MFC exe project to test my dll.
in the stdafx.h i also write :
#undef _GUI_LIB_EXPORT_
#ifdef _EXPORT_GUI_LIB_
#define _GUI_LIB_EXPORT_ __declspec(dllexport)
#else
#define _GUI_LIB_EXPORT_ __declspec(dllimport)
#endif
when i compile the exe project (that uses the exported dialog and button classes), it seams to recognize the dialog exported class (CMyDlg) but for the CMyBtn class i get the warning C4273 - inconsistent dll linkage. dllexport assumed.
can any1 help???
i am desparate here..
thanks in advanced,
Yaron
Ask not what your application can do for you,
Ask what you can do for your application
|
|
|
|
|
|
warning C4273 - inconsistent dll linkage. dllexport assumed.
Isn't the class to be dllexport is what is you want? So, it is correct then. Unless you are importing functions from DLLs.
Why use the macro? Just put in like this
class __declspec(dllexport) CMyDlg : public CDialog<br />
{<br />
...
why making yourself confuse?
hope this helps
Sonork 100.41263:Anthony_Yio
|
|
|
|
|
Thanks man!
That did the trick........
Ask not what your application can do for you,
Ask what you can do for your application
|
|
|
|
|
glad it helps.
Sonork 100.41263:Anthony_Yio
|
|
|
|
|
remove the stuff you wrote in the stdafx.h. In your dll project place "_EXPORT_GUI_LIB_" in the preprocessor definitions (project settings). This way the classes will be exported when you have defined "_EXPORT_GUI_LIB_" and imported if not defined (as in your client project). Hope this explains it a bit.
Er zit een korstje op mijn aars.
|
|
|
|
|
Hi,
I have an MFC ActiveX application and on a certain scenario (timing dependent I think) it crashes
with either an "Access Violation" or "Invalid Instruction", and the call stack simply shows:
"GUI! _except_list". I don't get any source file where the crash occured, just some disassembly which doesn't look like valid code (About 100 lines of the same code line in assembly - mov
dword... repreated 100 times or more).
I used BoundsChecker with maxium error checking, but it didn't catch anything.
Any ideas how to catch this?
Thanks.
|
|
|
|
|
Check your *.pdb files. This is where your debugger gets the symbols.(source codes) when debugging.
Hope this helps
Sonork 100.41263:Anthony_Yio
|
|
|
|
|
Hi,
I found the "except_list" string in my PDB, but it doesn't really tell me anything.
Here's a part of the PDB with the except_list in it.
Every line has an address on the left side, but I didn't add those here.
AfxGetApp@@YGPAVCWinApp@@XZ \q??_7CGUIDlg@@6B@* _numega_finalcheck_Y_110455" 8a??0CStatic@@QAE@XZ* ü]??0CDialog@@QAE@IPAVCWnd@@@Z" g___CxxFrameHandler
__except_list g__EH_prolog& Ô?OnCancel@CGUIDlg@@EAEXXZ" W?OnOK@CGUIDlg@@EAEXXZ" ¾\??3CObject@@SGXPAX@Z" Y??1CGUIDlg@@UAE@XZ2 `#?ReleaseInstance@GUI_MsgMngr@@SAXXZF ‰49?UnregisterMsg@GUI_MsgMngr@@QAEXW4MsgID@@W4ObjectID@@HH@Z2 "#?GetInstance@GUI_MsgMngr@@SAPAV1@XZ" 0__imp__DeleteObject@4>
What can I do with this info?
Thanks.
|
|
|
|
|
You need to have your *.pdb files to be with your *.ocx.
And one more point in case you have forgotten. You need to have your project build in debug mode.
hope this helps
Sonork 100.41263:Anthony_Yio
|
|
|
|
|
I think I misunderstood your first post. I thought you meant I need to open my PDB file to check it's contents. I guess you meant to make sure I even have a PDB file.
I do have PDB files for each project, and everything is compiled in debug. On "normal" crashes I do get a normal call stack and can debug normally. On this specific crash the only thing in the stack is: "GUI! __except_list" with no source code.
This only happens on my computer. The same version runs fine on other computers in the company, so it's either something specific which is problematic in my computer, or a specific timing sequence that only happens on my computer and causes it to crash.
Thanks anyways.
|
|
|
|
|
Hi,
Some years ago I had to develop an Windows Service, and it didn't used MFC... now I wonder... it's possible to include MFC on a Windows service ?, How can I do that ?
Thanks in advance, Greetings
Braulio
|
|
|
|
|
Hi,
Create NT Service using ATL COM appwizard.
In StdAfx.h file, include <afx.h> as shown below
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include <afx.h>
//#define STRICT
#ifndef _WIN32_WINNT
#define _WIN32_WINNT 0x0400
#endif
Now u can use MFC in Service .
Cheers,
Anand
The chosen One
|
|
|
|