|
first of all thanx a lot for a nice cooperation secondly, let me tell u that i m very new in vc++ i m getting ur point but i dont know how to implement!
actually i have down loaded a resizing code for button, listbox and edit box from codeguru but the ques. is how to implement on dynamically created "kodak image edit" ??
regards.
Saadyah Nisar
|
|
|
|
|
well first off when dynamicly creating the kodak thing just do this
frame->GetWindowRect(&rect); kodak->MoveWindow(&rect); that way you ensure the kodak is the the same size as the frame on creation you may want to adjust the size slightly its up to you
you could either inherate the frame class and overload its OnLButtonClk message or just use your windows message and use GetCursorPos and just test if its within the frame window and around the permiter then on the OnMouseMove do some work while the user is trying to resize thier thing and then finaly do your resizing in OnLButtonUp
also you can do this without the frame and just use the kodak thing where you would use the frame although i think the frame gives your control something easier to stick to
also if you didnt know you can get your kodak control in functions were its not in scope by doing GetDlgItem(ID_KODAK) same with the frame control
|
|
|
|
|
hi im a little confused i have drag and drop code for a tree view in debug mode it works perfectly it drops the item where its supposed to be dropped however when the code is used in release mode the tree just drops it in the root node of the tree i know im being vague here but i really have no clue where the bug could be since you can't debug while in release mode :P does anyone have any clue how i could track down this iregularity ? any help or any suggestions would be very helpfull thanks
Marissa
|
|
|
|
|
Maybe you should check your project's release settings?
|
|
|
|
|
i have not altered the release or debug settings at all and anyways i dont understand how changing release settings would affect the execution of code the has proven it works in debug also there are no #ifdef _DEBUG or whatever in any of the drag/drop code for the tree view
|
|
|
|
|
perhaps you're release application is linking to different dll's than your debug application?
Er zit een korstje op mijn aars.
|
|
|
|
|
im not using any dlls other than the mfc dll that gets built into the app
|
|
|
|
|
There are a number of ways that debug and release code could be different. Debug usual does not have any optimization performed on it, where release code does to to specify an optimization by default.
Debug code also is more forgiving about un-initaliazed variables. This is the first thing I'd check for. Secondly I'd enable debugging on the release build so that you can step through the code and see if you can spot a problem.
Michael
'Curiosity's always been my downfall' - The Doctor: The Caves of Androzani
|
|
|
|
|
i tried to enable debuging for relase but im not sure i did it right i went in and clicked the enable debugging checkbox in the settings but when i went to debug it said disabling breakpoints program will break at the beggings of execution i guess i must have missed something when trying to turn on debugging
|
|
|
|
|
1. variable initial
2. windows own-message
|
|
|
|
|
hi,
how to remove help button in cpropertysheet.
thanks in advance.
|
|
|
|
|
sheet.m_psh.dwFlags &= ~PSH_HASHELP;
|
|
|
|
|
hi,
i have some data validation on onok the page. the validation is not satisfied means i don't want to close the sheet. once again place the focus on the control on the page.
thanks in advance
|
|
|
|
|
BOOL CMySheet::OnInitDialog() {
CPropertySheet::OnInitDialog();
// this hides the Help button
CWnd* pHelpButton = GetDlgItem (IDHELP);
ASSERT (pHelpButton);
pHelpButton->ShowWindow (SW_HIDE);
return TRUE;
}
|
|
|
|
|
thanks for your suggestions.
|
|
|
|
|
Write the following code in constructor of every property page which is added in to the property sheet
m_psp.dwFlags &= ~(PSP_HASHELP);
Thanx
TAKE CARE
|
|
|
|
|
hi thanks for suggest it's working.
|
|
|
|
|
Hi
I am doing following set of activities...
1) Compiled an IDL file to get TLB, registered it using regtlb32 and is available in OLE/COM viewer
2) Compiled the project (which is supposed to generated the DLL). In Project settiongs, I have got following lines as Custom Build Setup
<br />
regsvr32 /c "$(TargetPath)"<br />
echo regsvr32 exec. time > "$(OutDir)\regsvr32.trg"<br />
When I compile this project, IDE says "DllRegisterServer in f:\MyWork\ProjectX.dll succeeded."
But when I try to register manually (regsvr32 f:\MyWork\ProjectX.dll), it gives error...
LoadLibrary("f:\MyWork\ProjectX.dll") failed - The specified module could not be found.
Basically this project is written in VC 5/6 and I am compiling it in VC++ .NET. Any suggestions?
HELP!!!!!!!!!!
stuck lil' ol' mE
---------------------
A gasp of breath,
A sudden death:
The tale begun.
A rustled page
Passes an age:
The tale is done.
|
|
|
|
|
You have probably problem with some missing dependency dll - I assume your manual registration is on another computer.
Use the dependency viewer to see what DLL's are required to run the dll.
|
|
|
|
|
geo_m wrote:
assume your manual registration is on another computer.
Now this is the problem... I am doing this on same machine... Wish I could show you!!!
This is happening on same machine - I compile, says okay done, but when I minimize the IDE and then try to register on command prompt, it says can't... Helpppppp!!!!!!!! plzzzz......
---------------------
A gasp of breath,
A sudden death:
The tale begun.
A rustled page
Passes an age:
The tale is done.
|
|
|
|
|
void CDllRegisterServerDlg::RunDllFunc(CString strFuncName)
{
CString strMsg;
UpdateData(TRUE);
HINSTANCE h=::LoadLibrary(m_strDllName); //dll name
if(h == NULL)
{
strMsg.Format("Find not File: %s.", m_strDllName);
MessageBox(strMsg,"Find File",MB_OK);
return;
}
FARPROC pFunc= ::GetProcAddress((HMODULE)h,strFuncName);
if(pFunc ==NULL)
{
strMsg.Format("Find not %s Function");
MessageBox(strMsg,"Find Function",MB_OK);
return;
}
if(S_OK==(*pFunc)())//(*pFunc)())
{
strMsg.Format("Ok: %s to %s succeeded.",strFuncName,m_strDllName);
}
else
{
strMsg.Format("Eorr: %s to %s eorr.",strFuncName,m_strDllName);
}
MessageBox(strMsg);
}
Use these code on debug mode, you can find the dll file which you missed~
|
|
|
|
|
Thanks for your reply... I will check this out and will let you know here.
---------------------
A gasp of breath,
A sudden death:
The tale begun.
A rustled page
Passes an age:
The tale is done.
|
|
|
|
|
Directly comaring 2 vectors is pretty good.
However, if we try to compare 2 vectors in a class, problem ocurs.
Please see the following code.
#include<iostream>
#include<vector>
using namespace std;
class A
{
public:
typedef vector<int> vect;
private:
vect v;
public:
A(int dim, int* a)
{
v.reserve(dim);
copy(a,a+dim, v.begin());
}
// what's wrong here
bool operator==(const A& other) const
{
//cout<<v[0]<<','<<v[1]<<endl;
cout<<other.v[0]<<','<<other.v[1]<<endl;
="" return="" v="=" other.v;=""
="" }
};
void="" main()
{
="" initiate="" 2="" arrays
="" int="" a[2]="{1,2};
" b[2]="{2,2};
" cout<<"******="" vector="" compare="" ******\n";
="" vector<int=""> v1(a,a+2);
vector<int> v2(b,b+2);
if(v1==v2)cout<<" equal\n";
else cout<<"not equal\n";
cout<<"****** class A compare ******\n";
A object1(2,a);
A object2(2,b);
if(object1 == object2) cout<<" equal\n";
else cout<<"not equal\n";
}
run:
****** vector compare ******
not equal // OK, (1,2) not_equal_to (2,2)
****** class A compare ******
equal // oops (1,2) equal_to (2,2), Jesus knows???
zma64
|
|
|
|
|
A(int dim, int* a)
{
v.reserve(dim);
copy(a,a+dim, v.begin());
} Here lies the problem. vector::reserve does not change the size of the vector; it merely reserves some space so that future changes in size are more efficient (i.e. does not require relocations of the elements). So, v.size() will still be 0 after the operation, and the call to copy has undefined effects (you're copying the elements pointed to by a into nowhere.)
The simplest solution is to replace the call to reserve with
v.resize(dim); which does change the size of v . A more efficient approach is
#include <iterator>
...
A(int dim, int* a)
{
v.reserve(dim);
copy(a,a+dim, back_inserter(v));
} but depending on your STL skills this may look a little odd to you. Basically, this is more efficient because you are not default initializing the elements of v before doing the copy.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Joaquín M López Muñoz:
Thank you. Your reply help me a lot.
marshal
|
|
|
|