|
|
hi
i want to access the registry hives in combo box in vc++ mfc dialog based application.
i have tried it but getting some errors.
could some body help me out.
thanks.
|
|
|
|
|
|
Hi There Every Body,
How can I hide a control's Scroll Bar?Something like ListView.
When the count of it's items exceeds a number relative to its size control shows a scoll bar.Should I Send a special Message to control?Could I do somthing with ShowWindow(BOOL)?Theoritically when a handle or poiter to a window is grabbed It can be shown or hide by ShowWindow.Any Ideas?
Kind Regards:
Ali
|
|
|
|
|
Have a look at window style WS_VSCROLL and List view style LVS_NOSCROLL .
|
|
|
|
|
thanks dear prasad,
Unfortunately it is a DOTNET project(which is written previously) and I must modify it to do such behavior.I didnt find something useful in .NET documentation and decided to use C++.Can we modify the control after it is created?whould u please post some refrence.
thanks again a lot.
Kind Regards, Ali.
|
|
|
|
|
Ali Beirami wrote: Can we modify the control after it is created?
What do you mean by control. Isn't it a MFC window.
You can modify window style after its ceation. Look for ModifyStyle,ModifyStyleEx documentation.
|
|
|
|
|
Thanks thanks,very useful.
Is there any SDK Function for changing style of a window(control )?I can NOT use MFC.
Thanks again buddy.thanks.
|
|
|
|
|
Ali Beirami wrote: Is there any SDK Function for changing style of a window
Yes, Look SetWindowLong . Your code would be on following line,
DWORD dwStyle = ::GetWindowLong(hwnd, GWL_STYLE);
if (dwStyle & WS_VSCROLL)
::SetWindowLong(hwnd, GWL_STYLE, dwStyle & ~WS_VSCROLL);
|
|
|
|
|
|
how to create modeless dialog box. and
Which method is used to create model dialog box in mfc.
-- modified at 7:10 Monday 5th March, 2007
|
|
|
|
|
|
A dialog is the object that comes from a class, so you have a variable that must be instantiated.
In a modeless dialog, you can use, for example, a pointer to that class, and then reserve memory for that variable using the new clause. Once this has been done you can use CreateDialog in order to create that dialog and once this is done, you can use showwindow ...
if it is modal, it's far easier, you have that variable (e.g: CDialog Dlg; ) and then you have only to call DoModal() ;
But I think that the best you can do is to document yourself a little bit more. It is very important to get the basics very clear before trying to go further.
Hope this helps.
|
|
|
|
|
Hi all
I need to plot values on a graph. Say for example I have an two integer vector
4,2,3,5,6,7
0.564,0.656,1.6456;
now i want to plot these values. What's the best way to do that?
I saw a Plot Graphic Library on this webpage "http://www.codeproject.com/miscctrl/pgllib.asp" but it not work with in VS2005, it will give some error.
error C2923: 'std::list' : 'std::vector<hull::tlineapproximator<t>::SPoint>::const_iterator' is not a valid template type argument for parameter '_Ty'
at
typedef std::vector<spoint> PointContainer;
//! Key containers
typedef std::list<pointcontainer::const_iterator> KeyContainer;
Can anyone help me what's wrong with "pgllib".
Thanks in advance
|
|
|
|
|
Why you are spamming[^] the forum ? Can't you be little patience?
|
|
|
|
|
Hai.
I am developing a VC++ app for a pendrive..
I want to know the available freespace in the drive..
Are there any APIs which i can use in my app to get the available free space in the drive..Iam not having any driver installed.
Waiting for suggestions..
Thanks in advance
Regards
vijay
|
|
|
|
|
Check out GetDiskFreeSpaceEx()
|
|
|
|
|
Thanks for your suggestion.
But in the parameters of the function, the directory name has to be given, but here iam having only handle of the device.Will it be ok with it or any other suggestions..
Here iam not having any driver installed..
Regards
vijay
|
|
|
|
|
If there is no driver for the drive, how do you plan on accessing the drive at all?
|
|
|
|
|
Still now i am able to get the device descriptions without the help of driver and i want to proceed further. I got the handle to the device.
Can we do anything with the handle to get the solution.
Anyway the driver is going to do evrything with the help of handle only na..
Regards
vijay
|
|
|
|
|
Hi
I want to make array of objects without default constructor
#include <iostream><br />
<br />
using namespace std;<br />
<br />
class one <br />
{<br />
int t;<br />
public: <br />
one(int x):t(x) { cout << "Ctor" << endl;};<br />
<br />
};<br />
<br />
int main(void) {<br />
one* o[8];<br />
for ( int i = 0; i < 8 ; i++)<br />
{<br />
o[i] = new one(3);<br />
}<br />
delete[] o;<br />
}
I tired this. But it gives me run-time error with Vs 2005.
What is the problem?
Thanks
|
|
|
|
|
Hi,
instead of deleting the array
delete[] o; which you can't or at least shouldn't because its not allocated (hence it isn't on the heap but on the stack).
You need to delete the allocated one objects one by one
for ( int i = 0; i < 8 ; i++)
{
delete o[i];
}
codito ergo sum
|
|
|
|
|
|
sawerr wrote: one* o[8];
As told already, this is array of pointer to one . And Created on stack, so you dont need to worry about its memory.
And you need to free pointer memory for each index , which is allocated on heap.
|
|
|
|
|
Hi there
Since a sereval time i have very often strange problems with local variables.
char xxx[10] will cause an DebugHeapError by destruction ( if the function terminates )
a char *xxx = (char*)malloc(sizeof(char)*10); with a free(xxx); resolves the problem
a special DBF-Type (Date4) causes the same error.
The parameter pb from the function-calling static int __cdecl checkBytes(unsigned char * pb, ...
is unreadable (which causes the error)
Why are this kind of errors produces ( and why not since the begeinning of the project )
Big thanks
-- modified at 6:08 Monday 5th March, 2007
i debug the function which causes the error, now i see that the Date4 Pointer ( i changed the locale Date4 into a Date4*) will be overwritten with data at the initialisation of a char sss[10];
Why does the memory will be overwritten?
|
|
|
|