|
Error is
CAbcDlg' : undeclared identifier
missing ';' before identifier domodal
domodal' : undeclared identifier
left of '.OnBnClickedButton5' must have class/struct/union
|
|
|
|
|
are you creating CAbcDlg in CAbcDlg class?
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You/xml>
|
|
|
|
|
Are you sure you want to do such a thing ? Are you aware that the dialog box is not displayed and if you try to access something from the dialog box inside the ButtonClick function, you will get a crash ?
What are you trying to do in fact ?
|
|
|
|
|
You message's title does NOT look promising.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
have you tried:
#include "abc.h"
and:
Cabc.DoModal();
Bram van Kampen
|
|
|
|
|
I have an App, with several identical USB Printers of the same type of the same manufacturer. Each of them has a Specific Task, which cannot be interchanged. Windows (for some reason does not seem to have envisaged this, and I) cannot keep track of Who'Who. I get Three Identical Printers to select from on the Printer Dialog. No way of saying Which is Which! I think my best bet would be to track the serial numbers. Does anyone know how.
Regards,
Bram van Kampen
|
|
|
|
|
sorry, just saw this (you cross posting ? tut tut) - I asked on the other reply how they were connected .. hmmmm, USB .. well, you still have to talk to a printer driver at some stage or through Windows to them ....
|
|
|
|
|
Have you tried WMI? The WMI Win32_Printer class has a DeviceID member
which is supposed to be unique.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
hmm - I tried WMI. DeviceID is same as Name.
The name, however, can be changed in the Control Panel/Printers
settings.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
#include <windows.h>
#include <stdio.h>
#include <detours.h>
#include
#include
#include <math.h>
#include <process.h>
#include <mmsystem.h>
#include <tlhelp32.h>
#include <vector>
//icludes are they
windows.h ;stdio.h;detours.h;math.h;process.h;vector;mmsystem.h;tlhelp32.h
#pragma comment(lib, "glu32.lib")
#pragma comment(lib, "opengl32.lib")
#pragma comment(lib, "winmm.lib")
#define Client_GLDRAWELEMENTS 0x4E5DA2
#define CAST( Type, Address ) ( ( Type )( Address ) )
typedef void ( WINAPI *GLDRAWELEMENTS_TYPE )( GLenum iMode, GLsizei iCount, GLenum iType, const GLvoid *pvIndices );
GLDRAWELEMENTS_TYPE g_dwGlDrawElements = NULL;
void WINAPI glDrawElementsHook( GLenum iMode, GLsizei iCount, GLenum iType, const GLvoid *pvIndices )
{
( g_dwGlDrawElements )( iMode, iCount, iType, pvIndices );
}
DWORD OpenGLHooks( PVOID pvArgs )
{
do
{
g_dwGlDrawElements = *( DWORD * )Client_GLDRAWELEMENTS;
Sleep( 100 );
} while( g_dwGlDrawElements == NULL );
*( DWORD * )Client_GLDRAWELEMENTS = PtrToUlong( glDrawElementsHook );
return NULL;
}
bool WINAPI DllMain(HINSTANCE hDll, DWORD dwReason, PVOID pvReserved)
{
if(dwReason == DLL_PROCESS_ATTACH)
{
CreateThread( NULL, 0, ( LPTHREAD_START_ROUTINE )OpenGLHooks, NULL, 0, NULL );
return true;
}
else if(dwReason == DLL_PROCESS_DETACH)
{
}
return false;
}
|
|
|
|
|
Please, post the exact error message and tell us which line of code is the problem.
|
|
|
|
|
ok when i get at home then il post the excat error and tell you what line it has
|
|
|
|
|
Im still not home but this is the line what creates the error and the code is compile ready i mean its the full source code u can just start compiling it and i belive u get the excat error:
g_dwGlDrawElements = *( DWORD * )Client_GLDRAWELEMENTS;
|
|
|
|
|
What is at address 0x4E5DA2 ?
The while() loop does not appear to do anything since g_dwGlDrawElements is never NULL . Is that intentional?
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
well the excat error is this :
error C2440: '=' : cannot convert from 'unsigned long' to 'void (__stdcall *)(unsigned int,int,unsigned int,const void *)'
Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
Error executing cl.exe.
|
|
|
|
|
Yes, a GLDRAWELEMENTS_TYPE cast will pacify the compiler. But that may not ultimately solve your problem.
What are you trying to do?
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
Well i want to hook opengl gldrawelements and using pointer for it so i have to wait valid opengl pointers also and the GLDRAWELEMENTS_TYPE didnt fix the error or i used it wrongly can u post me the whole line how it should look like ?
|
|
|
|
|
Hi all,
I want to use this function
BOOL EnumDisplayMonitors(
HDC hdc, // handle to display DC
LPCRECT lprcClip, // clipping rectangle
MONITORENUMPROC lpfnEnum, // callback function
LPARAM dwData // data for callback function
);
there is MONITORENUMPROC lpfnEnum this must be a pointer to my function.
here is MONITORENUMPROC declaration:
typedef BOOL (CALLBACK* MONITORENUMPROC)(HMONITOR, HDC, LPRECT, LPARAM);
How should I call EnumDisplayMonitors with my fuction/pointer.
I am really stuck.
Thank you very much.
|
|
|
|
|
I googled "EnumDisplayMonitors" and it returned a code snippet with an example on how to use it.
|
|
|
|
|
Thanks for your reply,
I can't find snippet, but I found this and it looks like it's working. Thanks
BOOL CALLBACK _MyPaintEnumProc(HMONITOR hMonitor,HDC hdc,LPRECT lprcMonitor, LPARAM data){
int a = 10;
return TRUE;
}
int main(int argc, char* argv[])
{
MONITORENUMPROC lpfnEnum = _MyPaintEnumProc;
EnumDisplayMonitors(NULL,NULL, lpfnEnum, 0);
}
|
|
|
|
|
I have found out it works only when I don't use it in a Class.
Could someone help me to implement into my class?
Thanks.
|
|
|
|
|
Declare the function as a static member function.
If you provide the 'this'-pointer as the dwData parameter in the call to EnumDisplayMonitors , you can type cast it into a pointer of your class to get the correct instance of your class when the static function is called.
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
|
|
Hi. I tried a search for subjects in the Articles, but found nothing...
My question is this: I have a collection of data, like a database, with numerious subitems and some have sub-subitems, etc...
I have a dialog that shows one "record" at a time with a CTreeCtrl showing the subitems that make up the one record. I can drill down the subitems to view the actual data.
When I step through the "records", the CTreeCtrl reflects the current record's data.
HOWEVER, if I am at a specific depth level and want to see the next record's data AT THAT SAME DEPTH LEVEL, my tree only gets rebuilt and initialized at root - I then have to drill back down again to see the next record's data at the depth level I'm interested.
Is there a way (algorithmic or class member) to remember the current node/depth level in a tree and to open a tree at that specific node/level?
Thanks,
J-J
|
|
|
|