|
What is high level abstraction and low level abstraction?
How do you define them? I used to think abstraction is
abstraction. Never thought that they can be defined
High level and low level.
Thanks.
|
|
|
|
|
I've never heard such a distinction mentioned, but it could refer to an "abstraction" which simply wraps an object and one that offers additional functionality beyond that. Of course, by this definition, a low level "abstraction" isn't really an abstraction at all.
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|
the way i always thought of it is basically higher / lower levels of computing abstraction..
assembly language is a low-level abstraction.
opcodes , etc, are just an abstraction of the movement of electrons thru the hardware going on behind the scenes.
c is a higher level of abstraction than assembly.
html is a higher level of abstraction than c.
etc.
i dont know if this is in the context you are asking of, but is always the context ive heard programmers / cs people, refering to higher / lower levels of abstraction....
todo....
:: insert inspirational text here ::
|
|
|
|
|
Okay, I was not specific. But thank you for your reply.
I was talking about the level of abstraction in C++ of
OOP design. OOP is all about data abstraction, but what
kind of design data abstraction is low level, and high
level?
Thanks.
|
|
|
|
|
I am trying to wrtie a wrapper for the Win32 toolbar. I would like to have a function to dynamically toggle whether the toolbar button text labels are displayed. The only solution I can see is to delete the existing buttons, and add them again with either the iString member of the TBBUTTON struct set to -1, or a valid string index. Is this really the only way or is there some simpler way to do this that I am missing ? I have looked at some of the toolbar articels here and haven't found much yet.
Thanks
¡El diablo está en mis pantalones! ¡Mire, mire!
Real Mentats use only 100% pure, unfooled around with Sapho Juice(tm)!
SELECT * FROM User WHERE Clue > 0
0 rows returned
|
|
|
|
|
I think you can send a TB_SETBUTTONINFO message to change the style. In the TBBUTTONINFO struct, set the BTNS_SHOWTEXT bit of the fsStyle member.
I never tried it, but it seems like it should work.
Chris Richardson
|
|
|
|
|
Can someone give me a clue about Wasabi SDK
The first example ( "example1" ) compilate successfuly but the
plugin is not listed in the Thinger and missed in the context menu.
What I missed ?
|
|
|
|
|
No offense, but how about asking in the Nullsoft forums?
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
IMediaControl :: GetState() errors in DirectShow???
------------------------------------------------
Hi All,
I want to use GetState() method of IMediaControl. But could not able declare its 2nd argument correctly. Here is my code:
HRESULT hr;
hr = pMC->Run();
if (hr == S_FALSE)
{
FILTER_STATE filterState; // or _FilterState filterState; ????????
hr = pMC->GetState(1000, (FILTER_STATE)filterState);
if (hr == S_OK)
{
...
}
}
It gives following error:
error C2664: 'GetState' : cannot convert parameter 2 from 'enum _FilterState' to 'long *'
Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast.
If I declare a pointer "FILTER_STATE *filterState;", it gives this error:
error C2440: 'type cast' : cannot convert from 'enum _FilterState *' to 'enum _FilterState'.
There is no context in which this conversion is possible.
----------------- More queries --------------------------
1. Run() is returning "S_FALSE". What can be reasons of it? (RenderFile() is returning "VFW_S_AUDIO_NOT_RENDERED").
2. Value of HRESULT is long (262744 in returned by RenderFile()). How can I display its error string (i.e. VFW_S_AUDIO........)?
Thanx in advance.
Regards,
Saurabh
|
|
|
|
|
HRESULT GetState(
LONG msTimeout,
OAFilterState *pfs
);
Parameters
msTimeout
[in] Duration of the time-out, in milliseconds, or INFINITE to specify an infinite time-out.
pfs
[out] Pointer to a variable that receives a member of the FILTER_STATE enumeration.
you have to pass a POINTER as the second parameter...
please read the documentation more carefully before you are posting here!
|
|
|
|
|
This is my code:
<br />
void CUltraShareDlg::pasa_el_foco(CWnd* pWnd)<br />
{<br />
CPoint cursor;<br />
CPoint punto;<br />
CRect rectangulo;<br />
CPoint punto1;<br />
CPoint punto2;<br />
<br />
<br />
for (int i = 0; i < crear_ventana_servidores.m_servidores.GetItemCount(); i++)<br />
{<br />
GetCursorPos(&cursor);<br />
<br />
crear_ventana_servidores.m_servidores.GetSubItemRect( i, 2, LVIR_LABEL, rectangulo);<br />
<br />
if (PtInRect(rectangulo, cursor)!=0)<br />
{<br />
<br />
MessageBox("I did it !!");<br />
}<br />
<br />
}<br />
<br />
pWnd->SetFocus();<br />
<br />
}<br />
The PtInRect() function is never !=0, I don't know how to know if the point is into the rectangle, I'm having lots of problems because of this... please help me...
Thanks in advance.
MaestroProgramador.Com
I didn't fail hundred times, I found hundred ways that didn't work.
No fallé cien veces, encontré cien maneras de que no funcionara.
|
|
|
|
|
GetCursorPos() is screen coordination.
includeh10
|
|
|
|
|
Should I call ScreenToClient before calling PtInRect ?? Thanks in advance.
MaestroProgramador.Com
I didn't fail hundred times, I found hundred ways that didn't work.
No fallé cien veces, encontré cien maneras de que no funcionara.
|
|
|
|
|
Rafael Fernández López wrote:
//ScreenToClient(&cursor);
for (int i = 0; i < crear_ventana_servidores.m_servidores.GetItemCount(); i++)
{
GetCursorPos(&cursor);
Do this:
GetCursorPos(&cursor);
crear_ventana_servidores.m_servidores.ScreenToClient(&cursor);
for (int i = 0; i < crear_ventana_servidores.m_servidores.GetItemCount(); i++)
{
..
}
Neville Franks, Author of ED for Windows. Free Trial at www.getsoft.com
|
|
|
|
|
Thank you very much, it worked.
Rafael Fernández López.
I didn't fail hundred times, I found hundred ways that didn't work.
No fallé cien veces, encontré cien maneras de que no funcionara.
|
|
|
|
|
I've created my main window as a modeless dialog box and I'm not sure if I've used the messages for exiting the dialog box correct, this is my dialog box procedure:
BOOL CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
PAINTSTRUCT ps;
HDC hdc;
switch(message)
{
case WM_INITDIALOG:
ShowWindow(hWnd, SW_SHOW);
return TRUE;
case WM_PAINT:
hdc = BeginPaint(hWnd, &ps);
EndPaint(hWnd, &ps);
break;
case WM_CLOSE:
DestroyWindow(hWnd);
return FALSE;
case WM_DESTROY:
PostQuitMessage(0);
return TRUE;
}
return FALSE;
}
Why I'm curious is because I'veseen some examples in MSDN that call DestroyWindow() in the WM_DESTROY message handler itselft. But that is when they've created a modeless child dialog box, I'm creating a modeless main dialog box.
Rickard Andersson
Here is my card, contact me later!
UIN: 50302279
Sonork: 37318
|
|
|
|
|
PostQuitMessage(0) means to exit the app at the point.
if need "exit", it is correct, otherwise not.
includeh10
|
|
|
|
|
Hi,
I thourougly tested my class in debug mode and it worked great. I went on and made a release build and it failed. Well, I went further and started debugging the release mode through a program database. There are tons and tons of errors, but I'm starting at the start
I want to approach this from the beginning, perhaps that will improve my understanding of the change to release build as well (yes I've read the interesting artical "Surviving the release build").
Alright, here we go:
string strTest1;<br />
string strTest2;<br />
<br />
if (strTest1.BufferSize() != 64)<br />
MessageBox(NULL, _T("Error 1"), NULL, 0);<br />
if (strTest2.BufferSize() != 64)<br />
MessageBox(NULL, _T("Error 2"), NULL, 0);
The above code goes wrong already. What happens is that the first buffersize is wrong. If I just use one string and check the buffersize it is correct. Somehow the variable containing the buffersize is being changed, well lets take a look at the code behind it:
CString::CString(int nAlloc) : m_szBuffer(NULL), m_nBytes(0), m_nLen(0) { Alloc(nAlloc); }<br />
<br />
int CString::BufferSize() const throw() { return m_nBytes; }<br />
<br />
void CString::Alloc(int nSize) throw()<br />
{<br />
int nAlloc;<br />
<br />
if (nLen <= 64)<br />
nAlloc = 64;<br />
else if (nLen <= 128)<br />
nAlloc = 128;<br />
else if (nLen <= 256)<br />
nAlloc = 256;<br />
else if (nLen <= 512)<br />
nAlloc = 512;<br />
else<br />
nAlloc = ((nSize / 64) + 1) * 64;<br />
<br />
m_szBuffer = (LPTSTR)(operator new(m_nBytes = nAlloc));<br />
<br />
m_szBuffer[0] = '\0';<br />
}
Oh in case someone would like to know what its declared like:
namespace Weltevreden<br />
{<br />
class CString<br />
{<br />
public:<br />
CString(int nAlloc = 0) throw();<br />
<br />
private:<br />
int m_nBytes;<br />
<br />
void Alloc(int nSize) throw();<br />
};<br />
}
As you can see that is all that gets called. I have stepped through the entire alloc process and saw for myself that the m_nBytes variable got assigned to 64. Still somehow when I call BufferSize() the variable is different. How is this possible?
For your information, I've turned of all optimization settings I could find. I tried to have the settings as close to the debug settings as possible.
Thanks for your help, I hope answering this question will help me fight the rest of the bugs myself
Luuk
|
|
|
|
|
I was able to track the bug to the test project. When I created a branch new test project in which I run the same tests as in the other I get no errors at all. Yet my question remains how is it possible that a member variable gets corrupted this way?
|
|
|
|
|
hi,
how to check printer is switched on or not. any printer.
any one help to me.
thanks in advance.
Murali.M
There is always one more bug...........
|
|
|
|
|
Hi,
In MFC,I have created a dialog with ID,IDD_ADVANCED.
When i created class for this dialog and included the statement : enum { IDD = IDD_ADVANCED }.
When i compile i get errors as "
'IDD_ADVANCED': undeclared identifier
expected constant expression
Pls help what the problem is.
Thnks in advance
ram
|
|
|
|
|
check resource.h in included in ur class header file.
Murali.M
There is always one more bugs.......
|
|
|
|
|
My W-98 laptop crashed and required a full restore. After the restore I downloaded (from M/S) and installed MDAC 2.8, but when I attempt to establish an ODBC connection with the M/S Access driver, I get an error that a dll (odbctl.dll) won't load.
Any help greatly appreciated!
Dick
|
|
|
|
|
is this really a question for the Visual C++ forum?
Don't try it, just do it!
|
|
|
|
|
Hi all,
I get cursor position through this:
<br />
CRect my_rectangle;<br />
POINT my_point;<br />
<br />
mylistobject.GetSubItemRect( 1, 2, LVIR_LABEL, my_rectangle );<br />
GetCursorPos(&my_point);<br />
if ( my_rectangle.PtInRect(my_point)==TRUE )<br />
}<br />
MessageBox("I got it !!!");<br />
}<br />
I'm not able to get to the MessageBox function because something went wrong... I don't know how to know if a point from GetCursorPos is into a Rectangle.
Thanks in advance.
MaestroProgramador.Com
Researching today for the future.
Investigando hoy, para el futuro.
|
|
|
|