|
#include <multimon.h>
In one (and only one) file that includes this file, include this line before the #include line:
#define COMPILE_MULTIMON_STUBS
This will enable the use of the multi-monitor functions on any platform (even though Win95 does not support multiple monitors) and degrade gracefully if they are not supported.
Ryan
Being little and getting pushed around by big guys all my life I guess I compensate by pushing electrons and holes around. What a bully I am, but I do enjoy making subatomic particles hop at my bidding - Roger Wright (2nd April 2003, The Lounge)
Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late - John Nichol "Point Of Impact"
|
|
|
|
|
thank you.. .. but
nothing changed ! , still "undeclared indentifier"
with ..
#include <windows.h>
#include <multimon.h>
#define COMPILE_MULTIMON_STUBS
void main()
{
DISPLAY_DEVICE dd;
EnumDisplayDevices(0, 0, &dd, 0);
}
and , "unresolved external symbol __imp__EnumDisplayDevicesA@16"
with ..
#define WINVER 0x0500
#include <windows.h>
#include <multimon.h>
#define COMPILE_MULTIMON_STUBS
void main()
{
DISPLAY_DEVICE dd;
EnumDisplayDevices(0, 0, &dd, 0);
}
and if I repaced the windows.h & multimon.h it make 29 error !!!
I eally disappointed !!
|
|
|
|
|
I said to place the #define COMPILE_MULTIMON_STUBS line BEFORE the #include <multimon.h> line, not after.
Ryan
Being little and getting pushed around by big guys all my life I guess I compensate by pushing electrons and holes around. What a bully I am, but I do enjoy making subatomic particles hop at my bidding - Roger Wright (2nd April 2003, The Lounge)
Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late - John Nichol "Point Of Impact"
|
|
|
|
|
I did , nothing happened !!
the same error ,
I want to tell u that I seached in User32.lib , I find all enum function , but EnumDisplayDevices does not exit at all !!! ,
I MSDN they say that this function exists in User32.LIB !! ,
I wonder if there is another function , instead of this unexist one !!
hatem
|
|
|
|
|
The code that you posted has the #define line after the #include line, so I assumed that this was the code you were testing.
The function works perfectly. I have used it plenty of times before. Try this:
#include <windows.h>
#define COMPILE_MULTIMON_STUBS
#include <multimon.h>
int WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR lpCmdLine, int nCmdShow)
{
DISPLAY_DEVICE dd;
dd.cb = sizeof(DISPLAY_DEVICE);
for(int i=0; EnumDisplayDevices(NULL, i, &dd, 0); i++)
{
}
return 0;
}
Ryan
Being little and getting pushed around by big guys all my life I guess I compensate by pushing electrons and holes around. What a bully I am, but I do enjoy making subatomic particles hop at my bidding - Roger Wright (2nd April 2003, The Lounge)
Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late - John Nichol "Point Of Impact"
|
|
|
|
|
sorry ,
but I tryed your code , and the same problem occures , !! , I think it may be the problem of Windows2000 , or some thing wrong with my VC++ !! ,
hatem
|
|
|
|
|
please could u send me a sample application , that this function is work in it ,
my mail is , hatem_poet@menanet.net
|
|
|
|
|
There's something wrong with what you're doing. I compiled exactly the code that I posted before, and it compiled with only one warning, which could be safely ignored.
Sorry, I can't help any more than this. I don't know what you're doing wrong. You'll have to sort it out there.
Ryan
Being little and getting pushed around by big guys all my life I guess I compensate by pushing electrons and holes around. What a bully I am, but I do enjoy making subatomic particles hop at my bidding - Roger Wright (2nd April 2003, The Lounge)
Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late - John Nichol "Point Of Impact"
|
|
|
|
|
i want to show a CFrameWnd window responding to a buttonclicked event in a dialog based application .the application has no doc template. and i have some problem to realize that.
the following are my codes:
CMainFrame myframe;
myframe.LoadFrame(.....);
myframe.CreateView(....);
myFrame.ShowWindow(...);
if you have any experience on that,pls tell whether i can do like that.
perhaps i have made some ridiculous mistake...
gucy
|
|
|
|
|
Hi,
Can I use LogonUser w/o knowing a particular users' password?
Regards
Srinivas
|
|
|
|
|
no and yes.
For 'normal' programming it is quite impossible.
Only way that is possible is to provide a subauthentication dll to the LSA, that will take any or none password as valid.
But you must install such a dll to the system locally under administration rights and it should also work only for local accounts.
|
|
|
|
|
No, unless you can hack it.
|
|
|
|
|
Hi,EveryOne
I want one formview(MDI) of data can transfer to other formview(which also A MDI). One formview I am using listbox and othe formview i am using editbox.
Thanxs
|
|
|
|
|
I have few edit boxes (for double prec. numbers)in a dialog (in a dialog based MFC program).
I want to go to the next edit box when I press ENTER. Normally the control goes to OnOk and the program exits.
Similarly I want to reset (to blank) all the data in the edit boxes when I press ESCAPE. But the program closes when I do so.
Will someone help?
|
|
|
|
|
override OnCancel() and OnOk() functions in your dialog message map
so you can write your own code for these keys
|
|
|
|
|
This question was asked a few days ago... Override PreTranslateMessage() like this:
BOOL CMyDialog::PreTranslateMessage(MSG *pMsg)
{
if((pMsg->message == WM_KEYDOWN) && (pMsg->wParam == VK_RETURN))
pMsg->wParam = VK_TAB;
return CDialog::PreTranslateMessage(pMsg);
} This should work as required.
Ryan
Being little and getting pushed around by big guys all my life I guess I compensate by pushing electrons and holes around. What a bully I am, but I do enjoy making subatomic particles hop at my bidding - Roger Wright (2nd April 2003, The Lounge)
Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late - John Nichol "Point Of Impact"
|
|
|
|
|
as title
|
|
|
|
|
string? -> std::string?
std::string str = "burp";
USES_CONVERSION;
LPCSTR lpcstr = T2A(str.c_str());
|
|
|
|
|
1. To convert a CString to a LPCSTR
#include <atlconv.h>
USES_CONVERSION;
CString str = _T("Whatever");
LPCSTR lpsz = T2CA(str); 2. To convert a std::string to a LPCSTR
std::string str("Whatever");
LPCSTR lpsz = str.c_str(); 3. To convert a std::wstring to a LPCSTR
#include <atlconv.h>
USES_CONVERSION;
std::wstring(L"Whatever");
LPCSTR lpsz = W2CA(str); Hope this helps
Have a look at the tutorial on string handling on CP. That will say more
Ryan
Being little and getting pushed around by big guys all my life I guess I compensate by pushing electrons and holes around. What a bully I am, but I do enjoy making subatomic particles hop at my bidding - Roger Wright (2nd April 2003, The Lounge)
Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late - John Nichol "Point Of Impact"
|
|
|
|
|
Hello every one, I was wondering if any body knows a way to trim mpeg 1 file with out corrapting it? or of an API/SDK that i could use to achive this.
Any help would be great !!
|
|
|
|
|
I am Using VS.NET 2003. I tried dragging Activex controls
from toolbar to the form.
It does the following things
1. Creating tlbimp wrapper file and it is sucess.
2. Creating Aximp wrapper file and it does something after
that it poppedup "File or assemblyname Axinterop.ID.dll or one of the depencies was not found". (Note:ID is activex name)
I tried even with command prompt
1. tlbimp abc.ocx /out:interop.abc.dll and it created sucessfully
2. aximp abc.ocx /out:axinterop.abc.dll /rcw:interop.abc.dll /rcw:interop.stdole.dll
AxImp Error: File or assembly name stdole, or one of its dependencies, was not found.
Can any body faced this type of problem?
(Note: Even Microsoft activex control also giving the same problem? )
Please tell me some method to use Activex control in .NET
Thanks,
Uma Mahes
|
|
|
|
|
hey.. really need a solution to my problem
when i set text to an edit box.. using funcion like SetDlgItemText or SetWindowText... is there any way i could know if the edit box is completly filled with the text or not.. edit box is multiline but with no scollbar option...
|
|
|
|
|
You have to do custom drawing, I guess, because you need to have DC.
Look at ::GetTextExtentExPoint or ::GetTextExtentExPoint
|
|
|
|
|
CDC* pDC = GetDC();
char szTmp[256];
edt.GetWindowText(szTmp);
int nSize = pDC->GetTextExtent(szTmp).cx;
//and now simply compare the edt width with nSize;
|
|
|
|
|
I have to develop an application that manages a double network interface.
This means that the target PC is equipped with 2 network cards with different
IP address.
My application must be able to manage both cards, to send data over both
networks and to distinguish data received from one or the other card.
How can I solve this problem ??
Thanks a lot!
|
|
|
|