|
A little more difficult thhan expected, (due to _AfxAppendFilterSuffix) but I finally reached my target.
Thanks a lot
Doc
|
|
|
|
|
Hi! I need help with a little problem. I'm using the cListCtrl and i was wondering if there's a way to resize the width of the listbox dynamically? I tried searching but only found topics on resizing column widths. Please help...Thanks a lotü
|
|
|
|
|
Since a CListCtrl is derived from CWnd , it can be resized using MoveWindow() .
CRect rectListCtrl;
m_myListCtrl.GetWindowRect (&rectListCtrl);
ScreenToClient (&rectListCtrl);
rectCtrl.right += 20;
m_myListCtrl.MoveWindow (&rectCtrl);
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
Ok thanks! But how do i get myListCtrl to behave like the main window? e.g. id i resize the window, my list should resize as well, and if i maximize my window the list should do the same. Given that the list occupies the whole window.....thanks againü
|
|
|
|
|
I've receive this error code when im trying to build the dll file. Does any know what is this error and how can i solve it? Thank you
best regards
Snowy
|
|
|
|
|
It's hard to say without looking at your source code, but the compiler is informing you that it encountered a semicolon (; ) when it was expecting something else. The error may be fixed by inserting the expected entity before the semicolon.
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
It looks like a misplaced comma. The compiler should have indicated what line is in error.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
Snippet with offending line and couple of lines before could help. Otherwise it is impossible to tell what it causing it.
It maybe a missing bracket or even macro. It can be undefined and defined differently elsewhere, causing compilation problems.
JohnCz
|
|
|
|
|
I have a problem. For 2 years i've been developing an application which someone else did before me (job thing), and someone else did before him...
Well. Everything is OK, but when I want to Browse Info (to see base classes etc) i get an error without any explanation. It only says:
Creating browse info file...
Error executing bscmake.exe.
***.exe - 1 error(s)
ANy ideas?
Love is the law, love under will.
|
|
|
|
|
please?
Love is the law, love under will.
|
|
|
|
|
Hello, everyone. I met a problem days ago. I used the webbrowser to play the powerpoint file. but when I set focus to the Webbrowser window which is playing powerpoint, I cannot get any key strokes even if in the thread message queue.
where's wrong? can anybody help me? Thanks very much!
|
|
|
|
|
Consider the following code snippet..f1,f2 and f3 are functions.
int f1(int,int);int f2();int f3();
here f3 is a library function,so i don't have access to it's internal code.
int a = f1(f2(),f3());
now,i want to stop execution of f2(and f1) if f3 returns a non zero value..how can i do this on the run i.e thru code ?
thanks in advance
|
|
|
|
|
Can't you simply do this:
int Return = f3();<br />
<br />
int a = 0;<br />
if (Return == 0)<br />
a = f1(f2(), Return);
|
|
|
|
|
yea it's possible but i was asked to do it without inserting any other statement than f1(f2(),f3())..i.e check should be after call to f1 is made but not in code of f3 since it is a library function.
|
|
|
|
|
int a = f1(f2(), f3() != 0 ? throw 0);
Does that work?
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
have f3 throw an exception if it's about to return anything other than a zero.
|
|
|
|
|
hi every body
i have problem with this code :
////////////////////////////////
///code in delphi
function doGetStat(aCallBackStatsParser:dfCallBackStatsParser; var strError:string):boolean;
var startTime : DWORD;
begin
result := true;
if SysHandle=0 then exit;
startTime := GetTickCount;
repeat
if abs(GetTickCount - startTime) > 1000 then break;
// Have driver fill Stats buffer with information
if not DeviceIoControl(SysHandle, IOCTL_FILEMON_GETSTATS,
nil, 0, @Stats, sizeof(Stats),
StatsLen, nil) then begin
strError := 'Couldn''t access device driver. errorCode ='
+IntToStr(GetLastError);
result := false;
exit;
end;
if StatsLen=0 then break;
if assigned(aCallBackStatsParser) then aCallBackStatsParser;
until false;
end;
//////////////////////////////////////
// Code in VC
BOOL CDriverApp::doGetStatvoid(*aCallBackStatsParser)(void) , CString *strError)
{
DWORD startTime ;
result = TRUE;
if (SysHandle==0 ) return FALSE ;
startTime= GetTickCount() ;
while(TRUE)
{
if( abs(GetTickCount() - startTime) > 1000 ) break ;
// Have driver fill Stats buffer with information
if (! DeviceIoControl(SysHandle, IOCTL_FILEMON_GETSTATS,
NULL, 0, &Stats, sizeof(Stats),
&StatsLen, NULL) )
{
strError->Format("Couldnt access device driver.\n errorCode = %d" ,GetLastError()) ;
result = FALSE ;
return FALSE ;
}
if(GetLastError()== ERROR_INSUFFICIENT_BUFFER)
strError->Format("small buffer") ;
if ( StatsLen == 0 ) { return result ;}
if (aCallBackStatsParser!= NULL) (*aCallBackStatsParser)() ;
}
return TRUE ;
}
///////////////////////////////////////////
it is working in delphi but not in VC
why ??
|
|
|
|
|
Hello all.
Now I am doing UML application.
But I cannot decide that HOW "add text to a rectangle"
HELP ME
|
|
|
|
|
hiho
i'm using a visual c++ .net setup project to install my software
the problem is that the installation can only be done my an administrator because it writes in the c:\program files\... directory
so i want that if the user installs my prog, the radio button for 'install for actual user' is set to 'install for all users'
because if the user installs my app with admin rights, it only installs for current user (if the user doesn't check the radio button to all users)
and the current user is the admin
is there a setting in the setup project, where i can change the pre-definition for the radio button?
i've not found one
and is there a way to automatically deinstall the software if it is already installed, before newly installation
because my setup aborts if the software is already installed
thx
|
|
|
|
|
Hello,
After reading "Modern C++ design" by "Andrei Alexandrescu", I wanted to use the Loiki library. I can't get the library to compile under VC++ 6.0, but it works like a charm on Visual Studio 2005.. I was wondering, does VS6.0 support the template stuff used in the loki library?
Thanks.
I also got the blogging virus..[^]
|
|
|
|
|
how can i connect in to a database without specifying the DSN name in the connection string ?, i heard some string with the combination of SERVER ; DATABASE and DRIVER can do that ! i tried but i couldnt.. any idea?
thanks in advance
Situation : my program uses SQL server as database( local / remote ). user can add multiple companies( each company creates as seperate database), and i connects them via DSN , the problem is the DSN is creating in local machine. but the company details keeps in remote machine, any user connects to the remote machine can view the companies but he couldnot connect to that bcz the DSN resides in local machine from where the company was creted.
if there is any machanism to represent the DSN detailes in remote machine ( Table entries), i can connect into companies by using those info without depending the local DSN
Ninety-eight percent of the thrill comes from knowing that the thing you designed works, and works almost the way you expected it would. If that happens, part of you is in that machine.
|
|
|
|
|
Try this search.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
Hello Friends,
Please obeserve the cpp program given below
#include <iostream.h>
int main(void)
{
register int i = 10;
cout <<"the address of i" << &i << endl;
cout <<"the value of i is " << i << endl;
return 0;
}
The output of the program is given below
the address of is 0x0012FF7C
the value of i is 10
The same program is written in C and the program is given below
#include <stdio.h>
int main(void)
{
register int i = 3 ;
printf ("the address of i %u", &i);
printf ("the value of i %d" , i);
return 0;
}
The program show an error which is given below
compiling...
register_c.c
D:\c++\registe_test\register_c.c(7) : error C2103: '&' on register variable
Error executing cl.exe.
register_c.obj - 1 error(s), 0 warning(s)
My question is what is the difference in the use of register variable is c and cpp program.I am able to get the address of register variable in cpp using the "&i". The same technique is not allowed in c program .
Can anyone tell what is the reason this is happening.
Hoping for a reply.
Best Regards,
Phijo Philip.
|
|
|
|
|
From MSDN entry on "register Keyword"
[quote]
ANSI C does not allow for taking the address of a register object; this restriction does not apply to C++. However, if the address-of operator (&) is used on an object, the compiler must put the object in a location for which an address can be represented. In practice, this means in memory instead of in a register.
[/quote]
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" mYkel - 21 Jun '04
Within you lies the power for good - Use it! Honoured as one of The Most Helpful Members of 2004
|
|
|
|
|
Another point you should remember is that the compiler may choose to ignore your "register" keyword, i.e. it treats
register int i = 3 ;
as a request to make i a register variable. The compiler may decide to make it a memory variable instead. And it will not tell you if it decides to ignore your "register" request.
|
|
|
|