|
Eastdragon wrote:
But does it mean that I have to ship out all my code to the template class user?
Yes, you do if they are to use any of your templates. You can have templates in your cpp file no one uses the template outside of the .cpp file.
John
|
|
|
|
|
hi guys
anyone knows how to add new text(string) on a jpeg file without using any image program?
|
|
|
|
|
nobody konws such thing??
i want to add some text in a jpg file in command prompt.
just like this
addtext2jpg jpgfilename textstring positionx positiony
any suggestion?
thanks
|
|
|
|
|
Hi!
I have a lot of files to manange.
I once use a toolbar provided in codeproject to switch cpp and h in vc6.
Is there any method to do it in vc7?
|
|
|
|
|
hi. can anyone tell me how I can get the IP Address and Subnet Mask from within a program?
Basically, I want to get the same info that is returned when I do an "ipconfig" at the DOS prompt.
Much thanks!
Johnny
|
|
|
|
|
GetAdaptersInfo , from the IP Helper API.
If you want IPv6 information (XP and above), look at GetAdaptersAddresses .
|
|
|
|
|
Is there any API function in Unix plateform's C/C++ which can give IP Address of the machine?
|
|
|
|
|
Quite possibly, but I don't know what. Sorry.
|
|
|
|
|
I keep getting a crash when I try to call the CTabCtrlSSL..
int CTabCtrlSSL::AddSSLPage (LPCTSTR pszTitle, int nPageID, LPCTSTR pszTemplateName) {<br />
#ifdef _DEBUG<br />
if (pszTemplateName != NULL) {<br />
BOOL bResult = CheckDialogTemplate (pszTemplateName);<br />
<br />
<br />
}<br />
#endif // _DEBUG
As a result of this code..
<br />
BOOL RDialogForEditingCanalObjects::OnInitDialog() <br />
{<br />
CDialog::OnInitDialog();<br />
<br />
int nPageID = 0;<br />
<br />
this->m_ctrlEditingTabs.AddSSLPage (_T("Database"), nPageID++,IDC_OBJECT_EDITING_TAB_CTRL);<br />
this->m_ctrlEditingTabs.AddSSLPage (_T("Runtime"), nPageID++, IDC_OBJECT_EDITING_TAB_CTRL);<br />
this->m_ctrlEditingTabs.AddSSLPage (_T("Communcation"), nPageID++, IDC_OBJECT_EDITING_TAB_CTRL);<br />
<br />
return TRUE;
}
void CSacmanEditorView::OnEditPipedGate() <br />
{<br />
RDialogForEditingCanalObjects dlg;<br />
dlg.DoModal();<br />
}
Whazzzzaaaa???
|
|
|
|
|
Wrap your dialog IDs with MAKEINTRESOURCE().
e.g.
m_ctrlEditingTabs.AddSSLPage (_T("Database"), nPageID++,MAKEINTRESOURCE(IDC_OBJECT_EDITING_TAB_CTRL));
Dave
http://www.cloudsofheaven.org
|
|
|
|
|
That didn't work. I'm still getting the same error!
|
|
|
|
|
Well what is IDC_OBJECT_EDITING_TAB_CTRL? It looks like the method you are calling requires it to be a dialog resource, but generally IDC_ is the prefix for a control within a dialog - you should probably check this.
Dave
http://www.cloudsofheaven.org
|
|
|
|
|
Ok, yeah, I didn't make extra dialogs to add to the initial dialog. But...now I can see my tab but there's no caption!! NO TAB!
I keep throwing an error here...
int CTabCtrlSSL::AddPage (LPCTSTR pszTitle, int nPageID, TabDelete tabDelete) {<br />
if (OnInitPage (nIndex, nPageID)) {<br />
THROW ERROR_>
HWND hwndFocus = tabDelete.pTabPage->GetTopWindow ()->m_hWnd;<br />
nArrayIndex = m_hFocusWnd.Add (hwndFocus);<br />
ASSERT (nIndex == nArrayIndex);<br />
}<br />
else {<br />
m_hFocusWnd.Add (::GetFocus ());<br />
}<br />
<br />
}<br />
return nIndex;<br />
}
Calling code...
BOOL RDialogForEditingCanalObjects::OnInitDialog() <br />
{<br />
CDialog::OnInitDialog();<br />
int nPageID = 0;<br />
<br />
this->m_ctrlEditObjectTabs.AddSSLPage (_T("Database"),nPageID++,IDD_DATABASE_TAB); <br />
<br />
return TRUE;
}
<-Clueless
|
|
|
|
|
I run this code...and it works every time.
BOOL RDialogForEditingCanalObjects::OnInitDialog() <br />
{<br />
CDialog::OnInitDialog();<br />
<br />
int nPageID = 0;<br />
<br />
this->m_ctrlEditObjectTabs.AddSSLPage (_T("Runtime"),nPageID++,IDD_RUNTIME_TAB); <br />
<br />
return TRUE;
}
So I add another page... and it works.
BOOL RDialogForEditingCanalObjects::OnInitDialog() <br />
{<br />
CDialog::OnInitDialog();<br />
<br />
int nPageID = 0;<br />
<br />
this->m_ctrlEditObjectTabs.AddSSLPage (_T("Runtime"),nPageID++,IDD_RUNTIME_TAB); <br />
<br />
this->m_ctrlEditObjectTabs.AddSSLPage (_T("Database"),nPageID++,IDD_EDIT_DATABASE_TAB); <br />
<br />
return TRUE;
}
I try to add antother page and it crashes. So I comment out the new page and the whole program crashes. Then I comment out that page and the first page loads every time but I can't put the second page back in, you know the one that just worked?
BOOL RDialogForEditingCanalObjects::OnInitDialog() <br />
{<br />
CDialog::OnInitDialog();<br />
<br />
int nPageID = 0;<br />
<br />
this->m_ctrlEditObjectTabs.AddSSLPage (_T("Runtime"),nPageID++,IDD_RUNTIME_TAB); <br />
<br />
this->m_ctrlEditObjectTabs.AddSSLPage (_T("Database"),nPageID++,IDD_EDIT_DATABASE_TAB); <br />
<br />
<br />
<br />
return TRUE;
}
This control is FIRED!
|
|
|
|
|
Hi,
I'm using CExpire[^]) by Nish, but I cannot make it to work from different user accounts, other than the administrator one.
Any idea?
Thanks,
Carlos
|
|
|
|
|
Even inexperienced crackers can unlock this.
Also, it is not a good method, adding junk to the registry. Forget it. Find a new method.
Hari Krishnan
|
|
|
|
|
pranavamhari wrote:
Also, it is not a good method, adding junk to the registry
Adding junk to the registry!?
What is considered not to be junk?
pranavamhari wrote:
Find a new method.
I agree with you (not entirely) but there are no bullet proof methods. Anything can be unlocked. The whole purpose of CExpire is to give you an idea on how to protect a program, and not to provide an extremly strong protection scheme. I would suggest a combination of different protection schemes.
// Afterall, I realized that even my comment lines have bugs
When one cannot invent, one must at least improve (in bed).-My latest fortune cookie
|
|
|
|
|
pranavamhari wrote:
Find a new method.
Could you please suggest me another one?
Cheers,
Carlos
|
|
|
|
|
hi,
there are no free tools for this as far i know.
But try Armadillo or Asprotect .
Hari Krishnan
|
|
|
|
|
Hi,
I got a DC and need to take a rectangular part of it and pass it to a function that fills it with what it deserves. But I need clipping. I would imagine creating a sub-DC of the DC or locking all but the concerned part of the DC and then pass it over. Could you tell me how (if it's possible at all). GDI. Pure WinAPI prefered but will do with MFC sample as well if you post it. Even some hint would be fine. Thanks
|
|
|
|
|
Perhaps CDC::SetBoundsRect() may help?
/ravi
Let's put "civil" back in "civilization"
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
I am trying to pass an empty variant array from VB, fill it (as a SAFEARRAY) in my c++ dll and then pass it back to VB. My overall goal is to populate the passed in array with a list of PID's of processes that are currently running in a job (JobName), and send it back. I am able to send and receive it, but when I receive it, I only have 1 PID in the returned array (even if I know I have two or three processes running in a job)
here is my code:
c++ DLL:
STDMETHODIMP CJob::ProcessesInJob(BSTR JobName, VARIANT* arrPID)
{
USES_CONVERSION;
SAFEARRAYBOUND abound[1];
SAFEARRAY *psa = NULL;
DWORD i;
HRESULT result;
HANDLE hOpenJob = OpenJobObject(JOB_OBJECT_ALL_ACCESS, FALSE, OLE2CT(JobName));
if (NULL == hOpenJob)
return 3;
//fill a structure with PID information for processes associated with the specified job;
JOBOBJECT_BASIC_PROCESS_ID_LIST jobinfoID = {0};
QueryInformationJobObject(hOpenJob, JobObjectBasicProcessIdList, &jobinfoID, sizeof(jobinfoID), NULL);
long *AEL;
abound[0].lLbound = 0;
abound[0].cElements = jobinfoID.NumberOfProcessIdsInList;
arrPID->vt = VT_ARRAY | VT_I4;
psa = V_ARRAY(arrPID);
//lock the data to access it
SafeArrayAccessData(psa, (void**)&AEL);
for(i=0; i
|
|
|
|
|
Hello,
This should be an easy one, but I can't seem to figure it out.
In my CDocument class, I want to get a pointer to my CChildFrame.
Is this possible?
Thanks in advance
|
|
|
|
|
This should help:
CEDTextView*
CEDDoc::GetFirstView() const
{
POSITION pos;
return ( pos = GetFirstViewPosition() ) ne NULL ? dynamic_cast<CEDTextView*>( GetNextView( pos ) ) : NULL;
}
Then use: GetParentFrame() on the returned view, if !NULL.
Neville Franks, Author of ED for Windows. Free Trial at www.getsoft.com
|
|
|
|
|
That did the trick!
Thanks for your help
Wim
|
|
|
|