|
Thanks for the swift reply...
Writing an RC file would be acceptable...What exe is the resource compiler? and how to use it?
Can't you tell I've never been outside an IDE before!
Pete
|
|
|
|
|
Pete Bassett wrote:
What exe is the resource compiler? and how to use it?
RC.EXE. Run with /? to get basic usage info. I believe there should be more in MSDN.
Tomasz Sowinski -- http://www.shooltz.com
- It's for protection - Protection from what? Zee Germans?
|
|
|
|
|
|
You could also include the created RC file into your own projects RC file. Then you don't have to invoke RC.EXE to compile it.
--
Daniel Lohmann
http://www.losoft.de
(Hey, this page is worth looking! You can find some free and handy NT tools there )
|
|
|
|
|
Its going to be a .RES for for use in a VB app...Thats the problem, you cant use .RC files in VB. Damn!
Pete
|
|
|
|
|
When I call OpenPrinter, it fails and GetLastError() returns 87 -> ERROR_INVALID_PARAMETER
it's the last parameter ! i know this because this is the one i don't know how to init. it's a PRINTER_DEFAULTS struct.
if somebody knows how to init this struct, post me the tips !
See you later on the web !
March'
|
|
|
|
|
It can be NULL
|
|
|
|
|
I want to make my program expire after 30 days. What's the best way to implement this? I just need a simple solution, one that will prevent normal users from bypassing the expiration.
Thanks!
Johnny Wood
|
|
|
|
|
1. get the current time
2. read a registry key that your program owns HKCU/Software/MyCompany/Whatever...
3. if that key doesn't exist, create it and write the current time there. this wil happen the first time your app runs.
4. if the key does exists, read the time stamp that was stored there and compare it to the current time.
-c
To explain Donald Knuth's relevance to computing is like explaining Paul's relevance to the Catholic Church. He isn't God, he isn't the Son of God, but he was sent by God to explain God to the masses. /. #3848917
|
|
|
|
|
save lastest date in register or a file, make sure ur user can't find it
avoid to use 'current time', so if user changes time setting, the app still expired
includeh10
|
|
|
|
|
There is an article on this site regarding this: CExpire
Peter O.
|
|
|
|
|
in file manager, we can see many info:
1. disks, folders and files
2. network connections
3. ....
some time i want to access those info directly, but i have no idea.
i.e. 'find file' only can find folder, file and is very slow. if use resource in file manager, it should be faster. and how to get network info?
i guess microsoft keeps it as itsown secret, am i wrong?
includeh10
|
|
|
|
|
I have a code snippet that just doesn't seem to work on 2 NT4 machines here(Win2K/98 are fine).
Here's the code:
PRINTDLG pdlg;
ZeroMemory(&pdlg, sizeof(PRINTDLG));
pdlg.lStructSize=(DWORD)sizeof(PRINTDLG);
BOOL bVal = AfxGetApp()->GetPrinterDeviceDefaults(&pdlg);
Even though both NT machines have default printers setup, bVal returns FALSE every time.
Any ideas?
|
|
|
|
|
i connect internet vs telephone line, so i have an ip address (in format of 111.111.111.111). but if i disconnect internet, i have nothing (ipconfig says nothing).
i think the number is related to my internet vender, possible related to my PC (adapter etc) also, maybe more.
i think if i change a vender or change a modem (or PC), the number must be changed.
do you kown story of the number?
thx
includeh10
|
|
|
|
|
if you dial up you will almost certainly get a temporary IP from one of the numbers your ISP has reserved. it isn't related at all to your PC or modem, but it is related to your vendor (ISP).
-c
To explain Donald Knuth's relevance to computing is like explaining Paul's relevance to the Catholic Church. He isn't God, he isn't the Son of God, but he was sent by God to explain God to the masses. /. #3848917
|
|
|
|
|
so u mean tomorrow the number will be diff from what in today? (i can't wait for tomorrow)
and, what do the 4 group nember stand for?
thx.
includeh10
|
|
|
|
|
hmm, I think you need some introduction book to TCP/IP. Maybe "TCP/IP for dummies" will do good to you. At least, I learn a lot from it.
As Chris has said, the IP address is assigned to you by your ISP. usually, your IP is a dynamic one. You don't need to wait for tomorrow, just connect again, and you'll find it's different. Yes, it is different every time. That's how ISP manages the IP address resource.
|
|
|
|
|
i remember i studied a master subject called 'network ...', but i returned all to my teacher. i really need a dummy book now, good suggestion.
thx
includeh10
|
|
|
|
|
includeh10 wrote:
but i returned all to my teacher.
yes, it happens all the time. I return everything to my teacher once the exam is over. No worry, just grab a dummy book and get refreshed.
|
|
|
|
|
includeh10 wrote:
Who is God for IP addresses?
ICANN
includeh10 wrote:
i think the number is related to my internet vender
It is. People and companies are assigned blocks of public IP addresses. You can safely use the IPs within your block(s).
includeh10 wrote:
possible related to my PC (adapter etc) also, maybe more.
Not really. Your adapter (a.k.a.; NIC) has a MAC (Media Access Control) address, which is supposed to be unique. Your IP address is combined with that to identify you on a network.
includeh10 wrote:
do you kown story of the number?
Could you rephrase the question?
Jeremy Falcon
Imputek
<nobr>"Life is too precious - don't waste it." - Norm Almond
|
|
|
|
|
Hi,
how can I get the width of some string for an specific font (GDI).
Like:
long GetWidthInPixels(char *string,HFONT font) //or DC
cannot find out anywhere
|
|
|
|
|
GetTextExtentPoint
includeh10
|
|
|
|
|
i need to update an app with CSplitterWnd in MDI child frame, i meet a very trick thing and can't find solution, please help.
code is very simple:
add a member var in ZMDIChildWnd (sub-class of CMDIChildWnd)
CSplitterWnd m_wndSplitter;
override:
BOOL ZMDIChildWnd::OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext)
{
return m_wndSplitter.Create( this,2,2,CSize( 10, 10 ),pContext );
}
that is all. code is standard no problem because i got it from visual book.
but problem is about cursor shape:
in dll (use MFC as dll) version, cursor is same as what in visual c++ enviorment (apears when sizing view), but in static library version (use MFC in static lib), the cursor changed to 2 arrays (OCR_SIZENS).
to find problem, i use vc wizard to re-create a blank MDI interface, with choose 'advance button' then select 'use CSplitterWnd'. this time, the cursor is correct in both dll and static version.
because both apps are blank now, i checked every line but can not find any different.
the app to be updated is very large, i don't want to copy all code to a blank one, but i must find solution to use right cursor.
i guess it something wrong in 'setting' ?
thx
includeh10
|
|
|
|
|
Does anyone knows a Funktion to change an icon of an file?
thanks Cyclops
|
|
|
|
|
icon is an icon resource inside the file, use update resource method to change the icon, u will do it.
includeh10
|
|
|
|