|
not I m trying to open the file with different password if password is correct its open otherwise its generate the exception...
in my question "to identify the file is password protected or not" I m want to chk just before open the document.
|
|
|
|
|
In object-oriented languages, the term "interface" is often used to define an abstract type that contains no data, but exposes behaviors defined as methods. A class having all the methods corresponding to that interface is said to implement that interface. Source: WIKIPEDIA
I do not understand that how certain interfaces of Media Foundation APIs are getting created and working. Take IMFSourceReader for example. I understand that it gets created using MFCreateSourceReaderFromXXXX functions. But just a function call and nothing else?
- It should not be working in the first place.
- What class creates and implements it in the system?
Thanks for any info.
|
|
|
|
|
It's not an interface that gets created, though an interface will be made available for you to call, its an object that implements the interface that gets created, in this case an object implementing the IMFSourceReader interface. The object created just exposes the interface to the outside world as a known means of using it but when you call a method (or function) on the interface, the call is immediately passed on to the object to carry out the actual work.
|
|
|
|
|
Hi all .
step 1: create new project on visual studio (project1.exe)
step 2: create WinUtils.h and WinUtils.cpp on project1.exe and main1.cpp
step 3 : add new project (project2.exe) and create main2.cpp
Now I want to use WinUtils.h and WinUtils.cpp on project2.exe
example
//-----------------main2.cpp--------------------
#include "../utils/WinUtils.h"
int main()
{
bool value = WinUtils::isWin64bit();/ function static
return 0 ;
}
//--------------------------------------------
when i build code ,I saw error:
+ error LNK2001: unresolved external symbol "public: static int __cdecl WinUtils::Is64BitOS(void)" (?Is64BitOS@WinUtils@@SAHXZ)
+ fatal error LNK1120: 1 unresolved externals
I make sure that isWin64bit() function is "public static"
Please help me this problem .because my code has very much h and cpp files.
Thanks
Thong LT
modified 18-Dec-13 11:49am.
|
|
|
|
|
Did you add the file "WinUtils.cpp" (and optionally WinUtils.h) to the new projects?
Including the header file will make your project compile , but when linking will fail if the code is not there.
I'd rather be phishing!
|
|
|
|
|
Thank Maximilien,
I didn't add this file . I will add this file.
How to have any ways ? . if we don't add WinUtils.cpp and WinUtils.h inside new project.
I know will dll , lib files we only use configure but we don't need add h and cpp file inside new project.
Thanks
Thong LT
|
|
|
|
|
If the code WinUtils.cpp will be used as a library, then it would be a good thing to either build them as a DLL or a static library (.lib).
After that, you will only need to have the header file (WinUtils.h) and you will link with the library.
I'd rather be phishing!
|
|
|
|
|
If you don't put the cpp file, it won't get compiled, therefore the object doesn't exist. Header file is simply a reference, it doesn't produce an object.
|
|
|
|
|
Thanks all friends .
My code now run well .
I have some error and how to fix .
+ fatal error C1189: #error : Building MFC application with /MD[d] (CRT dll version) requires MFC shared dll version. Please #define _AFXDLL or do not use /MD[d]
Configuration Properties\Gerenal\Use of MFC and select "Use MFC in a Shared DLL"
+ error LNK2001: unresolved external
Configuration Properties\Linker\input\Additional dependencies\ Then go to the end and type ";ws2_32.lib".
or use code:
#include <shlwapi.h>
#pragma comment(lib,"shlwapi.lib")
#include <shlobj.h>
// Link with Iphlpapi.lib
#pragma comment(lib, "IPHLPAPI.lib")
Thong LT
|
|
|
|
|
Are you asking a question? ...I'm not sure what you're saying.
|
|
|
|
|
Hi friends,
Am developing MFC server client application. Initially it is working fine but after some time it throw some error below see that
_CRTIMP void _cdecl _CrtDbgBreak(
void
)
{
DebugBreak();
}
call stack not shows any previous function.
I couldn't find exact location. Please help me.
Thanks
|
|
|
|
|
Such an error is usually caused by a buffer overrun on some stack-based variable.
The reason it doesn't show a call stack is that the stack has been corrupted due to the program writing to locations it shouldn't be writing to.
The way I would track this down is to look at all the locations where you use stack-based memory buffers such as strings, and examine the code for what could cause an overrun.
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
Memory leaking problem is quite common....I suggest you to use some good C writer books to handle these problems.
|
|
|
|
|
Before you are starting the debug session from VS:
- Ctrl+Alt+E (Exceptions Dialog from the Debug Menu)
- Check the all boxes there in
- F5 (Start)
The Debugger will stop exactly at the "bugged" line
They sought it with thimbles, they sought it with care;
They pursued it with forks and hope;
They threatened its life with a railway-share;
They charmed it with smiles and soap.
|
|
|
|
|
Hi,
How can I caputure OnClick event for Progress Bar Control?
I have an dialog based application with some progress bars. I would like to do something when user clicks (or double-clicks) on progress bar, but there is no OnBnClicked event available when I select progress bar control.
I have only 4 events available for this control:
NM_CUSTOMDRAW
NM_OUTOFMEMORY
NM_RELEASEDCAPTURE
NM_THEMECHANGED
Is there a way to do it?
I'm using Visual Studio 2010 and MFC.
|
|
|
|
|
CProgressCtrl is derived from CWnd, so you can add mouse handler to it.
Just derive your own class from CProgressCtrl and handle WM_LBUTTONDOWN, WM_LBUTTONUP , ...
I'd rather be phishing!
|
|
|
|
|
|
i am developing a win32 database application( in c language compild with vc++ 9.0 compiler). The provider is oledb. To design
the GUI i used the controls from comctrl32.lib as usual. But now i want to make a custome skin to my application.I had searched a lot in internet about what i want. And what i got is some forum relating WINLIFT for power basic, and also some c codes which are not self explanatory and wll only work under msvcrt 10.00 runtime.Actually i dont have a good machine to program and also for beating compatiblity issues of ma developng software with older systems i stick on to develope that project in vs2008 IDE . Now the second major result i got after googling is abt customizing WM_PAINT message in the callback procedure..
My Questions are the followng?
1) Is anybody know atleast basic designing of winlift here or people work with associatd libraries here, if so please give a helping hand for me to design a pro GUI
2)if anybody has a working knowldge abt GUI design in making original window transparent and putting our own custom made photoshoped GUI skins it wil be fine..
3)if the reader doesnt know abt the above mentioned things, please try to help me in what ever idea u know to tweak the GUI with a basic working example, such that i can get a insight for where to change my code, i had completed almost 1700 lines of code in the database project, now its impossible to go for finding new things to make GUI better because am running out of time to submit the project.:
thanks and regards
|
|
|
|
|
|
thank u very much, i will try it after finishing the naked code of the database application, and it seems like an understantable code,anyway , if u get more tuts regarding the topic please be kind to spare it here..
|
|
|
|
|
Since your question is such a broad one, and only you really know what you are looking for, it would be a much better idea for you to do some research, via Google.
Veni, vidi, abiit domum
|
|
|
|
|
Hello there,
I am making a dialog app using CDHtmlDialog and all the controls are done using HTML.
Now i want to call/display this dialog inside a web browser like IE.
How can i do that?
If i could generelaize this question -
Is it possible to display a dialog app that is derived from CDialog inside IE?
If possible, how to do that?
Thanks in advance.
|
|
|
|
|
The rules for web browsers is that they are not allowed to run executables on the client's system, so I do not think this is possible.
Veni, vidi, abiit domum
|
|
|
|
|
can we work with c++ with out any header file. like iostream etc. If posible give example
|
|
|
|
|
You can but it makes no sense in most cases. An example:
int main(int argc, char *argv[])
{
int res = 0;
for (int i = 1; i < argc; i++)
{
int j = 0;
while (argv[i][j])
res += argv[i][j++];
}
return res;
}
|
|
|
|