|
Dominik and DavidCrow,
thanks. i downloaded a sample before which has the same name as your sample - an exe active control for VB - i don't know VB.
but this sample is totally wonderful, i think it is exactly what i need.
one Q:
when i run the program, it asks for configuration - host name/address, is it my PC's ip address?
thanks again.
includeh10
|
|
|
|
|
includeh10 wrote:
it asks for configuration - host name/address, is it my PC's ip address?
Only if your PC is also the host.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
one more Q:
i use the configuation:
host:tntwc09-3-94.finst.com.au
port:80
get error message:
can't connect to server: error 10061
what does it mean? how to fix it?
thx
includeh10
|
|
|
|
|
Is there any way I can use a custom draw type technique when drawing an owner drawn tab control???
I only want to change the color of the text and allow the system to draw the rest...
Is this possible any hack or something I can use?
Thanks
How do I print my voice mail?
|
|
|
|
|
I have done the same thing with a customised button.
Try the following:-
Make a new class which is derived from CTabCtrl let it be
CCustomTabCtrl
let your tab be of type CCustomTabCtrl
then override DrawItem in the CCustomTabCtrl
in this DrawItem() call the default
CTabCtrl::DrawItem(lpDrawItemStruct);
just before writing your own code to color the text
I hope it will work
Even the word impossible says I am possible.
|
|
|
|
|
followed all the instruction from DirectShow SDK document,but still can't find anything from GraphEdit's File|Connect to Remote Graph, Although the AddToRot function returned SUCCEED.
I'm using VC6.0, Win2k
thanks for any help
|
|
|
|
|
I use VC++ 6.0 to make a MFC dialog based project, simply add a Date Timer Picker, using classwizard add two member variables for this datetimerpicker control(CTime, CDateTimeCtrl), then compile and run this simple application, ok, then interface comes out, datetimepicker is initialized to be 1970-1-1, when I reset time to be any time before 1970-1-1 I get this error message:
Debug Assertion Failed
Program: C:\test\debug\test.exe
File: timecore.cpp
Line: 40
what's wrong here? can anybody help me out? thanks
|
|
|
|
|
|
line 40 of timecore.cpp is
ASSERT(m_time != -1); // indicates an illegal input time
inside this constructor
CTime::CTime(int nYear, int nMonth, int nDay, int nHour, int nMin, int nSec,
int nDST)
{
struct tm atm;
atm.tm_sec = nSec;
atm.tm_min = nMin;
atm.tm_hour = nHour;
ASSERT(nDay >= 1 && nDay <= 31);
atm.tm_mday = nDay;
ASSERT(nMonth >= 1 && nMonth <= 12);
atm.tm_mon = nMonth - 1; // tm_mon is 0 based
ASSERT(nYear >= 1900);
atm.tm_year = nYear - 1900; // tm_year is 1900 based
atm.tm_isdst = nDST;
m_time = mktime(&atm);
ASSERT(m_time != -1); // indicates an illegal input time
}
|
|
|
|
|
A CTime object wraps a standard C time_t . This type cannot represent a date before 1 January 1970, and the assertion is telling you this.
Stability. What an interesting concept. -- Chris Maunder
|
|
|
|
|
is there any method to resolve this problem? coz in my case I can't restrict input time to be after 1-1-1970
|
|
|
|
|
This works fine for me:
COleDateTime from(1968, 9, 6, 16, 10, 0),
to(2006, 4, 29, 16, 23, 15);
m_datetime.SetRange(&from, &to);
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
hi David, I tried your soluation, but the problem is still there, can you provide another simple sample? thanks
|
|
|
|
|
Perhaps I do not understand the problem. The code snippet I provided gives the control a minimum date of 6-Sep-1968, which is earlier than the 1-Jan-1970 date that was originally confining you. If you have a relevant code snippet that we could look at, we might be of more help.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
please give a example.
appreciate any help!!
|
|
|
|
|
All services need a local system account in order to run, or have I missed the point?
Ant.
|
|
|
|
|
CreateService(
scm,
szInternName, //internal name
szDisplayName, //display name
m_dwDesiredAccess, //desired access def: SERVICE_ALL_ACCESS
m_dwServiceType, //service type def: SERVICE_WIN32_OWN_PROCESS
m_dwStartType, //start type def: SERVICE_AUTOSTART
m_dwErrorControl, //error control def: SERVICE_ERROR_NORMAL
szFullPath, // exec name and full path
m_szLoadOrderGroup, //load order group def: none
m_lpdwTagID, //group tag ID def: none
m_szDependencies, //dependencies def: none
".\\Administrator", // user account name def:Local System
"password"); // user account password
hope everything else same ...
It's not a bug, it's an undocumented feature. suhredayan@omniquad.com
messenger :suhredayan@hotmail.com
|
|
|
|
|
I am having the same problem. If you have done it already, could you guide me ragarding this?
|
|
|
|
|
Hi,
In Visual Basic, when working with objects, we have the following syntax:
<br />
obj.property=value or variable=obj.property<br />
call obj.method([params])<br />
Remember that the property is not only member variable which is declared with public modifier but the property can (and in fact its always) be a function. So we do not need to know where to store value or where the data of variable come from inside the object. More over, function inside property allows us to do few calculations based on value set or got.
My question here is: In Visual C, Could I implement such programming style, by any way?
At present, I implement such style by declaration a member variable as public member, but it may not good when working with object. Implementation Set , Get functions do not allow VB programming style.
Thanks for reading.
|
|
|
|
|
Extracted from MSDN:
__declspec( property( get=get_func_name ) ) declarator<br />
__declspec( property( put=put_func_name ) ) declarator<br />
__declspec( property( get=get_func_name, put=put_func_name ) ) declarator
This attribute can be applied to non-static “virtual data members” in a class or structure definition. The compiler treats these “virtual data members” as data members by changing their references into function calls.
When the compiler sees a data member declared with this attribute on the right of a member-selection operator (“.” or “->“), it converts the operation to a get or put function, depending on whether such an expression is an l-value or an r-value. In more complicated contexts, such as “+=“, a rewrite is performed by doing both get and put.
This attribute can also be used in the declaration of an empty array in a class or structure definition. For example:
__declspec(property(get=GetX, put=PutX)) int x[];
The above statement indicates that x[] can be used with one or more array indices. In this case, i=p->x[a][b]
will be turned into i=p->GetX(a, b) , and p->x[a][b] = i will be turned into p->PutX(a, b, i);
Gurmeet S. Kochar If you believe in God, it's because of the Devil
My CodeProject Articles: HTML Reader C++ Class Library, Numeric Edit Control
|
|
|
|
|
Thank you very much.
Could you show me where to get that article in MSDN?
I am using MSDN October 2001. But I did not find your article in its. I think your idea is very interesting.
|
|
|
|
|
be careful, OOP is NOT available in C (so either in Visual C). object programming comes with C++.
And for your question, yes, you can.
Classes are made for such. You put your data members eito private or protected statements (in general) as properties, and the interface for your classe, defined with your function members ("methods" in VB) are in a public statement.
All of this is not definitive, but it is a cool way of programming properly.
TOXCCT >>> GEII power
|
|
|
|
|
I am trying to edit 2 C source files i downloaded... and re-convert the edited files into .exe's but i am having errors...
the error keeps stating:
"fatal error C1083: Cannot open include file: 'dir.h': No such file or directory"
i dont konw if dir.h is a header file that is missing and i need it before i can compile my source files.
is there any headers or other files that i must have in order to compile a source file into a .exe?
any help would be appreciated!
-Zac
"i bring a knife to a gun fight"
|
|
|
|
|
dir.h is not a VC++ header file. so for the building of your code i would suggest you to search the build environment for the code or if you want to build it on VC++ environment then remove the header and then compile the program. so you will see some compilation error like the particular function is not defined. try to get the subsitute of this function on VC++ library.
hope this will help you.
jitendra
|
|
|
|
|
I am using "straight C" (VC6.0) and want to change the background color of the edit-box part of a datetime control (this would be the part that is displayed in the dialog and contains the date that was selected via the drop-down calendar. I know you can change various parts of the calendar itself (by sending a MCM_SETCOLOR message with one of six parameters), but how can I change the color behind the date displayed in the 'edit' box part of the control? My dialog box background is a light yellow, and the (apparently default) background white color of the DTP control is distracting...
|
|
|
|