|
Thanks that fixed the problem.
|
|
|
|
|
That is truly the stupidest thing I ever heard. If an OS is only for programmers, what programs will you write under it, and who will use them ? There's nothing so wrong with Windows ( or Linux for that matter ) that you and your team are likely to fix it. Your best bet would probably be to hack a linux distro to do what you and the 3 other people who will use it want from it.
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
I want to write a skinnable scrollbar, I need hook system scrollbar group API, how can I do that?
I can hook these API called from my process, bu if I process call comctl32.dll and comctl32.dll call these API, I can hook it? How can I hook these API called in comctl32.dll? any demo code will helpful.
|
|
|
|
|
http://www.codeproject.com/dll/apihijack.asp
I don't know if this works on 9x-based OS, though
modified 12-Sep-18 21:01pm.
|
|
|
|
|
I want to hook COMCTL32.DLL's import function table or I want to replace the GetScrollBarInfo API 's enter address in user32.dll , because win98 share system DLL in the same address space and protect it, how can I do this??
==============================================
SkinMagic SDK Library for C/C++
The better solution for write skinnable application
http://www.appspeed.com
==============================================
|
|
|
|
|
there is very good example in system section for system wide Hooks including 9x.i think this may help
-----------------------------
"I Think It Will Help"
-----------------------------
Alok Gupta
visit me at http://www.thisisalok.tk
|
|
|
|
|
I want to hook COMCTL32.DLL's import function table or I want to replace the GetScrollBarInfo API 's enter address in user32.dll , because win98 share system DLL in the same address space and protect it, how can I do this??
==============================================
SkinMagic SDK Library for C/C++
The better solution for write skinnable application
http://www.appspeed.com
==============================================
|
|
|
|
|
i m developing a small telephony app usig TAPI. to intitialoze tapi i have to get ITTAPI ptr.
ITTAPI *gpTapi;
HRESULT res = CoInitialize(NULL);
CoCreateInstance(CLSID_TAPI,NULL,CLSCTX_INPROC_SERVER,IID_ITTAPI,(LPVOID *)&gpTapi);
gpTapi->Initialize();
i have added tapi3.h and also give link to Uuid.lib. At compile time it gives no error but at link time it gives error "unresolved symbol _CLSID_TAPI" and same error for "IID_ITTAPI". any one hav idea wats hapening. how can i find CLSID for TAPI and IID for ITTAPI. plz help
|
|
|
|
|
|
how to enable a system menu again from another class
this part works fine ...
void Cfirstw32mfcDlg::OnSysCommand(UINT nID, LPARAM lParam)
{
if ((nID & 0xFFF0) == IDM_ABOUTBOX)
{
CAboutDlg dlgAbout;
dlgAbout.DoModal();
}
else
{
CDHtmlDialog::OnSysCommand(nID, lParam);
}
if ((nID & 102) == IDS_ZONENAME)
{
CAddzonename* pDialog;
pDialog = NULL;
pDialog = new CAddzonename(this);
if(pDialog != NULL)
{
BOOL ret = pDialog->Create();
if (ret)
{
EDIT2 =("done");
UpdateData(FALSE);
CMenu* pSysMenu = GetSystemMenu(FALSE);
pSysMenu->EnableMenuItem(IDS_ZONENAME,MF_BYCOMMAND | MF_DISABLED | MF_GRAYED);
}
if(!ret) //Create failed.
AfxMessageBox("Error creating Dialog");
pDialog->ShowWindow(SW_SHOW);
}
else
AfxMessageBox("Error Creating Dialog Object");
//CAddzonename dlgAbout;
//dlgAbout.DoModal();
}
else
{
CDHtmlDialog::OnSysCommand(nID, lParam);
}
}
..........................................................
doesn't work, but doesn't return errors either
void CAddzonename::OnBnClickedOk()
{
/*Cfirstw32mfcDlg**/ CMenu* pSysMenu = GetSystemMenu(FALSE);
pSysMenu->EnableMenuItem(IDS_ZONENAME,MF_ENABLED);
DestroyWindow();
}
how do i enable the the menu item again, witch got disabled by pressing on it
kind regards,
marco
|
|
|
|
|
HRESULT Cfirstw32mfcDlg::OnButtonOK(IHTMLElement* /*pElement*/)
{
UpdateData(TRUE);
if(( EDIT1 == "" )&&( EDIT2 == "" ))
{
AfxMessageBox("You must provide a username and a password or click Cancel",MB_ICONSTOP);
return NULL;
}
AfxGetApp()->WriteProfileString("Settings", "email", EDIT1);
AfxGetApp()->WriteProfileString("Settings", "password", EDIT2);
//CAddzonename* m_Zonename;
//LPCTSTR m_Zonename = m_Zonename;
/*
if(m_Zonename)
{
AfxGetApp()->WriteProfileString("Settings", "Zonename", m_Zonename);
}
*/
return 0;
}
.......................................................
// CAddzonename dialog header file
class CAddzonename : public CDialog
{
DECLARE_DYNAMIC(CAddzonename)
public:
// global variable
CString m_Zonename;
.......................................................
i have tried this this ...
CAddzonename* m_Zonename;
CString m_Zonename2 = m_Zonename;
if(m_Zonename2)
{
AfxGetApp()->WriteProfileString("Settings", "Zonename", m_Zonename2);
}
and return this ...
j:\Visual Studio Projects\win32\firstw32mfc2\firstw32mfcDlg.cpp(222) : error C2440: 'initializing' : cannot convert from 'CAddzonename *' to 'ATL::CStringT<basetype,stringtraits>'
with
[
BaseType=char,
StringTraits=StrTraitMFC<char>
]
No constructor could take the source type, or constructor overload resolution was ambiguous
what am i doing wrong?
kind regards,
marco
|
|
|
|
|
Natural_Demon wrote:
AfxGetApp()->WriteProfileString("Settings", "Zonename", m_Zonename2);
I'm assuming that your application overrides WriteProfileString to take a CAddzonename pointer. AfxGetApp will return an instance of the base class, you need to cast it to the specialised class that contains this method. as it stands, it's trying to call the base class method, as that's all it can see.
I think. It's kind of hard to wade through all of that badly formated code.
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
//CAddzonename* m_Zonename; <-- seems to be good, but how to use it??
if(m_Zonename)
{
AfxGetApp()->WriteProfileString("Settings", "Zonename", m_Zonename);
}
returns ...
j:\Visual Studio Projects\win32\firstw32mfc2\firstw32mfcDlg.cpp(224) : error C2065: 'm_Zonename' : undeclared identifier
BTW, i tried that before
Bad = knowing 2 much
|
|
|
|
|
That's a whole different problem. m_Zonename does not exist in the class where you're trying to use it, obviously.
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
how smart u are, i found that also out, but what do i need or can i do about it??
Bad = knowing 2 much
|
|
|
|
|
Natural_Demon wrote:
how smart u are, i found that also out, but what do i need or can i do about it??
If you're going to be sarcastic, you can get stuffed.
If you don't know how to declare or scope a variable, I suggest buying and reading C++ for dummies before asking questions here.
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
i'm not getting sarcastic, but dont tell me it's obivious.
i'm trying to find out how, i'm already reading stuf the whoile weekend andf i have read about creating a global variable, but when i copy(adapting the code afcourse) the code, visual doesn't accept it.
somehow.
Bad = knowing 2 much
|
|
|
|
|
Global variables are bad design anyhow. However, in C++, to declare something as global ( that is, not within the scope of any class ), it will still only be visible in files where the file that declares it is included. I found the best way to do this is to declare stuff in stdafx.h. But a better option would be to declare it within the class that you're trying to get at with AfxGetApp(), although you still need to cast that, as I said before.
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
i tried to cast like this...
CAddzonename* m_Zonename;
//CString m_Zonename2 = m_Zonename;
and it returns this ...
j:\Visual Studio Projects\win32\firstw32mfc2\firstw32mfcDlg.cpp(222) : error C2440: 'initializing' : cannot convert from 'CAddzonename *' to 'ATL::CStringT<basetype,stringtraits>'
with
[
BaseType=char,
StringTraits=StrTraitMFC<char>
]
if i do this ...
CString m_Zonename2;
CAddzonename* m_Zonename;
m_Zonename2 = m_Zonename;
j:\Visual Studio Projects\win32\firstw32mfc2\firstw32mfcDlg.cpp(222) : error C2679: binary '=' : no operator found which takes a right-hand operand of type 'CAddzonename *' (or there is no acceptable conversion)
...................................................................
CAddzonename* m_Zonename;
//m_Zonename2 = m_Zonename;
//if(m_Zonename)
//{
AfxGetApp()->WriteProfileString("Settings", "Zonename", m_Zonename);
}
this will return ...
j:\Visual Studio Projects\win32\firstw32mfc2\firstw32mfcDlg.cpp(226) : error C2664: 'CWinApp::WriteProfileStringA' : cannot convert parameter 3 from 'CAddzonename *' to 'LPCTSTR'
Bad = knowing 2 much
|
|
|
|
|
Natural_Demon wrote:
CString m_Zonename2;
CAddzonename* m_Zonename;
m_Zonename2 = m_Zonename;
Duh. Why do you expect to convert a string from an instance of your class ?
Natural_Demon wrote:
this will return ...
j:\Visual Studio Projects\win32\firstw32mfc2\firstw32mfcDlg.cpp(226) : error C2664: 'CWinApp::WriteProfileStringA' : cannot convert parameter 3 from 'CAddzonename *' to 'LPCTSTR'
Bloody hell. Follow my advice, or stop asking me.
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
hello, i have made a dialog with HTML and my question how to prevent if u press enter that the app closes itself.
HRESULT Cmfc2htmlDlg::OnButtonOK(IHTMLElement* /*pElement*/)
{
OnOK();
return S_OK;
}
HRESULT Cmfc2htmlDlg::OnButtonCancel(IHTMLElement* /*pElement*/)
{
OnCancel();
return S_OK;
}
what do i need to do, so it doesn't close if u press the enter bottun on your keyboard.
kind regards,
marco
|
|
|
|
|
|
thnx, normaly i find anything on google, but i was lazy and i tried somany things
thank u
kind regards,
marco
Bad = knowing 2 much
|
|
|
|
|
you can do this with many ways as follows:-
1- Yourclass::OnOk()
{
// make it empty
}
2- use SetwindowHookEx function to capture Keyboard keys
and u can compare the wpararm parameter in your callback function if it =13 then Enter key has been pressed and you
can do any thing you need.
after this if broblem is found contact me on faroq_tam2004@yahoo
to send to you some source code
faroq from yemen thammar
working in thammar universty and my intersted about network and security
im programmer from 6 years ago and ihave my B.C from this universty
|
|
|
|
|
faroqtam wrote:
use SetwindowHookEx function to capture Keyboard keys
You must be kidding.
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|