|
no your missing a } to close the class. maybe that will answer the rest of your questions but I didn't read them because your error was so trivial that it pissed me off that you didn't catch it.
|
|
|
|
|
How can I make a dialog both Borderless and still have the ability to resize it.
Worst Case i am going to fill in the NC area with a graphic rim of the image in the dialog box but I was wondering if there was another way. Either that or I am going to make the dialog borderless and write my own resizing class. If there is an easy way to do this I would be oblidged.
Thanks
Ryan
|
|
|
|
|
n/m tossing graphics in the nc area is working so i guess im just going to do that.
|
|
|
|
|
Handle the WM_NCHITTEST message. If the mouse is within X pixels of the dialog's edge, you can return HTBOTTOM, HTBOTTOMLEFT, etc., to tell Windows to act like there's a sizing border.
--Mike--
http://home.inreach.com/mdunn/
#include "buffy_sig"
|
|
|
|
|
I have seen this but need a hint on where to look. I would like to change the open/save dialog but not just on my application but change it system wide so the OS and all applications, even the one I didn't write, use the customized dialog. How would I go about this?
Thanks
Ralph Krausse
www.consiliumsoft.com
Home of FastRun. If you run lot of application, development projects, word docs, etc, check it out!
|
|
|
|
|
I have experience in with MFC and recently done ATL too. But new to
OLEDB/ADO.
I need to use OLEDB in a db-project, which need to access server-database
for database-metadata, table-metadata and table-data.
Right now I have used OLEDB-interfaces with SQL Server , starting from
IDBInitialize and so on, I got valid reference to IRowset-interface.
Can sbd. tell me how to retreive from the IRowset-interface ???
It's urgent. Any help will be helpful.
Thanx in advance.
Rohit Arora
DSR Solutions, Hyderabad
Rohit Arora
DSR Solutions
Hyderabad
|
|
|
|
|
Are you using 'raw' OLEDB or ATL Consumer Templates?
Tomasz Sowinski -- http://www.shooltz.com.pl
|
|
|
|
|
Hi,
How can load *.gif or *.jpeg files on a dialog or a button, if i can please tell how it is .
Thank U very much.
|
|
|
|
|
you cannot use GIF without a license (in the US, Germany, UK, Japan, etc.).
if you want to load JPG, there are articles on this site (see the Bitmap and Palettes section). or you could try a 3-rd party toolkit, like ImgSource.
-c
------------------------------
Smaller Animals Software, Inc.
http://www.smalleranimals.com
|
|
|
|
|
Try use function OleLoadPicturePath
According to documentation:
The stream must be in BMP (bitmap), JPEG, WMF (metafile), ICO (icon) or GIF format
|
|
|
|
|
Here you go.
You have to declare some CBitmapButton objects for each button in your main class header file that you are using this buttons.
Then add the usually message handlers.
Load your bitmap picture in your resource bitmap and use a string name "Name" to label your bitmap that you want over your button.
Then that should be the same name as the caption on your button. Make sure you have owner draw button checked.
Add a OnInitDlg member function and call your CBitmapButton objects with autoload.
Compile and run and you should have your bitmap buttons.
|
|
|
|
|
Hello,
when i import msado15.dll i do not get _RecordsetPtr. I can use _Recordset but i do not know how to get item data. i found in the samples the code but it always uses _RecordsetPtr.
how can i get _RecordsetPtr ? or what is eqivalent usage of _Recordset to the _RecordsetPtr's call:
_RecordsetPtr Rs1;
variant = Rs1->Fields->GetItem
(_variant_t ("name"))->Value;
thank you
|
|
|
|
|
Hi All,
Is there any parser which will convert rtf text to html text.
with regards
A.Santosh
|
|
|
|
|
I'm using Chris Maunder's grid control in an MDI app (*non* Doc/View). I added a grid pointer in my ChildFrm.h and create / initialise it in CChildView::Create(). No problems here.
Assuming I have a file that can be read into the grid, how do I access the grid from within the open call in CMainApp::OnFileOpen() or CMainFrame::OnFileOpen() to put that data into it?
I have no problems with the new call because I don't need to modify the grid before I show it to the user. With open I do need to modify it first (load it with data). How do I do this?
|
|
|
|
|
With an MDI app you need to make OnFileOpen in the App class query for a filename and then call the doc class, similar to this:
if (dlg.DoModal() == IDOK)
{
AfxGetApp()->OpenDocumentFile(dlg.GetPathName());
}
Then in the Doc class you can override OnFileOpen to call this function ( as once you have opened one file, the Doc version gets called instead ) like this:
CMyApp * pApp = (CMyApp*)AfxGetApp();
pApp->OnFileOpen();
Finally, override OnOpenDocument to open the file, read the data and set some sort of flag to be used in your views OnInitialUpdate function to display the data.
Christian
#include "std_disclaimer.h"
People who love sausage and respect the law should never watch either one being made.
|
|
|
|
|
But I'm *not* using doc / view. This is just plain App Wizard generated with the doc / view support unchecked. Given that the grid control stores all data internally I see no reason to include that support when the CDocument is never going to be used.
I was thinking more along the lines of the code below. The only problem I see with this is that is doesn't work It compiles fine, but the view returned is NULL. Where am I going wrong here???
void CMainApp::OnFileOpen()
{
CMainFrame* pFrame = STATIC_DOWNCAST(CMainFrame, m_pMainWnd);
CMDIChildWnd* wnd = pFrame->CreateNewChild(
RUNTIME_CLASS(CChildFrame), IDR_MAINTYPE, m_hMDIMenu, m_hMDIAccel);
CChildView* view = (CChildView*)wnd->GetActiveView();
view->c_pGrid->DoSomethingCool(); // Compiles but view is 0x0
}
|
|
|
|
|
Hi All,
I have aon interesting Query .I have an ATL Service and I want to display a Message say "Hi" in the Build window when I run the service.
Which Macro I have to use?
Thanx in advance for the help.
Regards,
Y.Yamini Devi.
|
|
|
|
|
do any have built the line custom control in MFC,
pls help by guiding me in building the custom line control, and also pls
suggest how to building round, hexagon control.
|
|
|
|
|
Please specify more detaily, what do You mean by line control?
To use non-rectangular control shapes, You have to read about regions. See CRgn class.
|
|
|
|
|
Hello,
I am trying to make my first dll. But I cant get it to work. The linker keeps saying it cant find what it needs.
MyTestApp.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall CMyTestClass::~CMyTestClass(void)" (__imp_??1CMyTestClass@@UAE@XZ)
MyTestAppDlg.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall CMyTestClass::~CMyTestClass(void)" (__imp_??1CMyTestClass@@UAE@XZ)
MyTestAppDlg.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall CMyTestClass::CMyTestClass(void)" (__imp_??0CMyTestClass@@QAE@XZ)
Debug/MyTestApp.exe : fatal error LNK1120: 2 unresolved externals
The DLL i created with the AppWizard (MFC DLL) as an extension dll.
The only change I made to the whole thing was I add a class (using the class wizard) as CMyTestClass. It Has one Memebr variable and the empty constructor and deconstructors the class wizard creates.
I create an .h file to include for my app.
The app is just a generic Dlg app made with AppWizard. It include the .h file for the lib.
The .h file conatins the class declaration as such:
class AFX_CLASS_IMPORT CMyTestClass
{
public:
CMyTestClass();
virtual ~CMyTestClass();
int m_Sh*t;
};
I moved the dll and .lib files to the Applications project directory so it could find them.
What am I doing wrong??
PLease help.
|
|
|
|
|
Hi
Use Win32 Dynamic-Link Library wizard with option "a dll that exports some symbols"
it makes some defines for you like these:
#ifdef MY_EXPORTS
#define MY_API __declspec(dllexport)
#else
#define MY_API __declspec(dllimport)
#endif
modify them a little:
#ifdef MY_EXPORTS
#define MY_API __declspec(dllexport)
#elif defined(_STATIC_MY_LIB_)
#define MY_API
#else
#define MY_API __declspec(dllimport)
#endif
and use MY_API before your classes:
class MY_API CMyTestClass {};
now your should define in dll-project (wizard made it for you) MY_EXPORTS
don't define any (MY_EXPORTS|_STATIC_MY_LIB_) in projects that use your dll
you can make lib-project using same source files just define _STATIC_MY_LIB_ in project settings.
ZMike.
|
|
|
|
|
Hi All,
I want to convert 16 grayscale BMP image to DOS 4-plane format image, in order to display
the BMP image on DOS screen.
Please give me some help. Thanks
|
|
|
|
|
In my work environment I deal with a lot of Access and therefore VB. But just creating standalone database interface applications, how much faster is VC++ accessing/querying a database as opposed to VB. What difference between DAO,ADO,ODBC,etc.
Cheers
Robbie G
|
|
|
|
|
VC++ won't be much faster accessing Access databases than VB. The database work is performed by Jet engine anyway. I believe that you could improve performance with large datasets by using OLEDB via ATL COnsumer Templates.
Keep in mind that OLEDB requires skilled C++ programmer. I wouldn't recommending this path if you just switched from VB to VC.
Tomasz Sowinski -- http://www.shooltz.com.pl
|
|
|
|
|
I need to be able to (de)compress any file that comes in to my program. I use C/C++/Win32API/MFC 4.2. I would like the highest compression rate possible. I don't care to use libraies other than the standard libraies to use C/C++/Win32API/MFC 4.2.
How do I enable (de)compression in my program?
Any sites?
|
|
|
|