|
hi apeman,
thanks 4 u r comment.why don't u wish me,
hero of future computing.
by
baijumax;)
|
|
|
|
|
You can use FindFirstFile and FindNextFile functions in API.
Arsalan Malik
|
|
|
|
|
Check _access and _waccess
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
You can use this function : PathFileExists(“C:\\myFile.txt”)
hanhquang
|
|
|
|
|
Hi All,
I'm trying to make a debug function, which will be fairly multiple use in my app, dependant on Command line arguments.
The functon will always TRACE(), and if optionally specified, will write debug info to STDERR, or to a log file. All in one.
I'd like to be able to implement a variable argument list function to do this.
However, I can't find a way to pass the argument list to another variable argument list function.
I'd like to have something like this:-
void MyDebug(char * psFormat, ...)
{
va_list al;
va_start(al, psFormat);
and then format a string based on the variable arg list, something like this (which does not work).
char szDbgMessage[4096];
sscanf(szDbgMessage,pszFormat, al);
because, after that, I could do whatever I wanted with the string... TRACE0() it, cout it, chuck it out to a file, or even make a cup of tea with it?
I managed to do more or less exactly this with gcc with the Gameboy as a target, but no compiler implementor does this the same. Has anyone ever managed this in VC++.
Thanks
JOn
TRACE0(szDbgMessage);
va_end(ptr);
using System.Beer;
|
|
|
|
|
Hello,
this code does works :
void _cdecl OutputDebug(LPCSTR Fmt, ...)
{
char buff[MY_SIZE_BUFF] ;
va_list args ; va_start(args,Fmt) ;
wvsprintf(buff,Fmt,args) ;
va_end(args) ;
OutputDebugString(buff) ; // Or anything you want ...
}
there are some string function accepting va_list as argument. They have 'v' in there name : vprintf(), vsprintf(), CString::FormatV()
don't forget the _cdecl on functions with variable arguments list (, ...)
|
|
|
|
|
Just what I was looking for! Thankyou!
using System.Beer;
|
|
|
|
|
Hi everyone!
Got a quick, yet stupid question!
Why cant you init anything inside a class unless its static const int ?
Actualy the question is how can you initialize an array inside class private:
to be const .
I know that it is possible to declare an array and then use a constructor to init it. But how do I make it const if I was to do it thru the constructor.
Thanks.
|
|
|
|
|
You can declare an array inside private block, e.g.
class A {
private:
static const int array[10];
};
and initialize outside class as:
const A::array[10] = {0};
As far as I know, you cannot initialize an const array using constructor list.
Arsalan Malik
|
|
|
|
|
Although the former is valid C++ syntax, I think the VC6 compiler will have issues with it.
|
|
|
|
|
I have successfully compiled this syntax with VC6, and found no issues.
Arsalan Malik
|
|
|
|
|
Thanks a lot!!!
|
|
|
|
|
I am having trouble using the ReBarCtrl SizeToRect method which is supposed to resize the rebar control and "best fit" all of the rebar bands in it.
<br />
CRect pRect;<br />
pRect.bottom = 50;<br />
int rResult = m_Rebar->GetReBarCtrl().SizeToRect(pRect);<br />
rResult always returns 1 (which supposedly means it is working) but irrespective of what values are contaed in pRect, the rebar ends up being only one row high.
Can anyone shed some light on this please?
|
|
|
|
|
Hello,
You should set all the members for the rect structure.
rect.left (x1)
rect.right (x2)
rect.top (y1)
rect.bottom (y2)
This way it should resize to de dimensions you desire
|
|
|
|
|
I tried that as well Bob but still got the same results
|
|
|
|
|
HI
Wt is the difercne between
Differnce between ATL DLL, ATL Service and ATL EXE
and where thay r used
i want to use them in ASP.NET page .
that every client can use it .
I want to do in it is , to connect to a sepecific client IP and Socket and to get and send data.
or may i use a WebService is ASP.NET
which one is better
thanx
Regards.
Regards.
|
|
|
|
|
Friends,
There is a windows Service API function CreateService() . I am using it to create my own windows service. I want to set the dependency of my
service. i.e i want my service to start after another service "MSSQLSERVER".
We can set the dependency via the eleventh parameter of CreateService() . The MSDN description is confusing for me:
lpDependencies
[in] Pointer to a double null-terminated array of null-separated names of services or load ordering groups that the system must start
before this service. Specify NULL or an empty string if the service has no dependencies. Dependency on a group means that this service can
run if at least one member of the group is running after an attempt to start all members of the group.
You must prefix group names with SC_GROUP_IDENTIFIER so that they can be distinguished from a service name, because services and
service groups share the same name space.
I dont know what is meant by "Pointer to a double null-terminated array of null-separated names". Can anyone tell me how to create this variable
and pass in CreateService()
Imtiaz
|
|
|
|
|
It means a sequence of C-style strings (each terminated by a zero character), with the last string having two zeroes on the end to mark the end of the list. Here's one way to create such a list:
TCHAR names[] = _T("MSSQLSERVER\0OTHERSTUFF\0"); Note that you don't write \0\0 at the end because a string literal already implies one \0 at the end.
--Mike--
Personal stuff:: Ericahist | Homepage
Shareware stuff:: 1ClickPicGrabber | RightClick-Encrypt
CP stuff:: CP SearchBar v2.0.2 | C++ Forum FAQ
----
#include "witty-quote.h"
|
|
|
|
|
<sigh> you just KNOW he's going to see \0O as zero-zero not zero-oh and ask what THERSTUFF is.
...cmk
Save the whales - collect the whole set
|
|
|
|
|
Hi,
In my module, i've a menu. by choosing menu option, dialog box should be appeared.How to make a link?
Pls help...
mithila
|
|
|
|
|
Add command handler of menu using class wizard (CTRL-W) or manually using message map. In handler, create dialog box, and call DoModal or ShowWindow.
Arsalan Malik
|
|
|
|
|
while executing ,i need to display the menu .for that is there any coding or any procedures to be followed.kindly help its urgent.Can u send ur personal id for my further clarifications to mithila_03@yahoo.co.in?
Thk u.
mithila
|
|
|
|
|
You can create menu using CMenu class. Create a CMenu object, and call its LoadMenu method to load from resource. Then in your main window or dialog, call SetMenu to set the menu for that window. Are you using dialog based application or SDI or what??
Arsalan Malik
|
|
|
|
|
Using Dialog based only. In main window under which function, i've to include the set menu? initdialog()?
mithila
|
|
|
|
|
using Dialog based only.In which function i've to include set menu? in initdialog()?
mithila
|
|
|
|