|
The last MSDN that could be used with VS6 is October 2001.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
hiho@ll
i have a dialog which is resizable
the problem is, if i resize it using the borders of my dialog (not the minimize or maximize button) i get a blinking cursor in the lower right corner of my dialog
the cursor is drawn over the little triangle u have in resizable windows
i don't really know where it comes from?
i'm just using a tab control, a check box some static controls
anyone knows a workaround?
thx@ll
|
|
|
|
|
Hello,
I'm trying to change the size of a groupbox dynamically in an MFC application. I mapped a CStatic object to the groupbox, but could not find an appropriate function. It does not seem to be the riht way to me.
I will be glad if someone could give a hint.
Thanks in advance,
caykahve
|
|
|
|
|
|
This is how my mapped control is defined:
CStatic m_Groupbox1;<br />
<br />
DDX_Control(pDX, IDC_STATIC_G, m_Groupbox1) ;
I tried this line:
m_Groupbox1.SetWindowPos(&this->wndTopMost,NewStartPosX,NewStartPosY,NewWidth,NewHeight,SWP_SHOWWINDOW);
It did not help
|
|
|
|
|
and don't you have to redraw the dialog after resizing it (like Invalidate() ) ?
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
I can change the size of the dialog, that works already with SetWindowPos(). However I also want to change the size of the groupbox on the dialog. that is what i cannot do.. I first resize and reposition the dialog, then try to do for the groupbox.
|
|
|
|
|
i dunno.....tis just a guess.....try calling the Invalidate function for the window.....maybe there is a change,but maybe not updated!!!!!
cheerz.....
"faith, hope, love remain, these three.....; but the greatest of these is love" -1 Corinthians 13:13
|
|
|
|
|
|
Thank you ThatsAlok, it works with MoveWindow().
|
|
|
|
|
Hi, i'm going to work on a project to redesign and implement a new look for an old application.
The language is c++. The purpose is having the following prerequisites (for which i need some
wise advice):
1. MENU's: The menu will be created on the fly from a database table with user preferences. In my menu's
I need icons next to the function names like in ms office. The menu's should, just as the toolbars, be
repositioned by the user.
2. TOOLBARs: The toolbars must be created on the fly from a database table with user preferences. The
toolbars must be dockable and there must be some support for toolbars that are 'too long', chevrons for
example. We should also need to remember the user's 'dockstatus' (in the registry or so probably). We
need tooltips. The toolbars can, just as the menu's, be customized by the user.
3. STYLEs: It is necessary to easily use other styles in the program (e.g. changing between office
2003, vs 2005, xp and other styles), like i have seen in demo's of the guys of http://www.bcgsoft.com/
This will be quite some work. Can some readers point me to (preferably free) components to use? I can
find a lot of examples on codeproject and codeguru, a lot of them are good solutions, but some are
small scale. For example I found a great class CMenuXP for XP style menu's/toolbars, it works, i have
used it, but it's not easy to adapt it to my needs (e.g. change styles at runtime) and it's certainly not
easy to merge it with other examples i need (e.g. one i found about chevrons).
So can someone point me to some (preferably free) components that provide a big part of the solutions i
can use?
|
|
|
|
|
Recommend you use (purchase) one of the MFC extension libraries on the market and save your self a lot of pain. DUNDAS or PROFESSIONAL USER INTERFACE (Theres and article on this one at CP).
You can also go to sourceforge.net, to look for opensource projects.
INTP
"The more help VB provides VB programmers, the more miserable your life as a C++ programmer becomes."
Andrew W. Troelsen
|
|
|
|
|
Hi,
In my project,the server should listen to several clients(multycast connection),and be able to send messages to the clients(different client every time).
The problem is that i don't have access to the client(each client is some unit
that has RS232 output,and uses RS232 to Ethernet converter and all the units
should act as network with my PC).
I assume that each client uses P2P connection(otherwise - broadcast connection is good enough).
Another problem is:
In multycast - after one client send a message to the server,and the server recieves this message,the clinet needs to connect to the server again,in order to send another message(i.e the client needs to connect every time he want to send a message).
I was told to set the socket of each client to nonblocking mode,and i've set every socket(after socket() function) - but it didn't work(select() still blocking my apllication).
Where do i need to set the socket to non blocking mode????
Any example or good tutorial????
With best regards,
Eli
|
|
|
|
|
hiho@ll
i just need to remove the system menu icon of an dialog, but the dialog must be resizeable using the minimize and maximize button on the upper right of the frame
if i use the options in the resource tab of my dialog the maximize and minimize options get disabled
one solution is remove the system menu icon in the program and enable the option for the system menu in the resource tab or the other solution, add the maximize and minimize button in my code and disable the system menu option in the resource tab!?
but how to do both ways? didn't found anything helpful in the CWnd or CDialog docu
thx@ll
|
|
|
|
|
modify the CDialog::OnPaint() function to change the behavior of your icon painting...
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
I need to capture Image from devices like digital camera, Webcam, Scaner,etc.
I don't anything about this. Anyone please direct me.provide links, samples if you know.
|
|
|
|
|
Hello Friends,
Please observe the first c++ program
#include <iostream.h>
class ABC
{
public :
void show()
{
cout <<"inside the show function"<< endl;
}
void show2()
{
cout <<"inside the show2 function" << endl;
}
friend void showme(ABC obj );
};
void showme(ABC obj)
{
obj.show();
obj.show2();
}
int main(void)
{
ABC xyz;
showme(xyz);
return 0;
}
Here a single object xyz is as the argument and in the friend function the object call the two member functions which is defined in the class ABC.
Please observe the second c++ program
#include <iostream.h>
class ABC
{
public :
void show()
{
cout <<"inside the show function"<< endl;
}
void show2()
{
cout <<"inside the show2 function" << endl;
}
friend void showme(ABC obj , ABC obj1 );
};
void showme(ABC obj,ABC obj1)
{
obj.show();
obj1.show2();
}
int main(void)
{
ABC xyz,xyz1;
showme(xyz,xyz1);
return 0;
}
In this c++ program two objects are passed as the argument for the friend function.In the main function two objects ie xyz ,xyz1 are passed as the arguments.
Both the program shows the same output.
My question is out of two c++ program , the optimized code is which one. If not the case the two programs how can I write optimised code for the c++ program which is described above.
One more question ? object are allocated space in the memory.when define a class and it members and member functions.Does class have its own memory space as it is with object of class?
Hoping for a reply,
Yours,
Phijo
|
|
|
|
|
hi,
i'm not sure to understand your whole question, but here is what i can say :
first, i cannot see any relevant change btween your two programs, except the fact tha the former has another ABC object. in this case, xyz and xyz1 are two distinct objects, but constructed the same way (that's why the outputs are the same).
i've got a question about your code...
why putting showme() functions as friend
when you have no data members (moreover no protected members) ? this could have been done with external functions because show() and show2() are public .
phijophlip wrote:
My question is out of two c++ program , the optimized code is which one. If not the case the two programs how can I write optimised code for the c++ program which is described above.
i don't understand this question, please reformulate... (what optimization do you want ? mem, speed ?)
phijophlip wrote:
object are allocated space in the memory.when define a class and it members and member functions.Does class have its own memory space as it is with object of class?
that's not exactly like this. data members are allocated in the stack while dynamically allocated datas are in the heap. this way, each object has its own datas, even if they contain the same values as another object.
BUT ! every objects of the same type share the functions of the class. that means that the functions code is written once in the code segment. to determinate which object is calling a function, the functiopn receive an implicite parameter (this ) that points the object. the static member functions have no this pointer, so, they can manipulate only static data members (shared with every objects of a same type).
i know what i explain is a bit deep, but look for these infos if you like to code better...
cheers,
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
I have created a pointer of a class in the header file of another class & also, i have initialised a constructor of that class using that pointer, but, in a member function of the class whose header contains the declaration of the pointer.
now i wanna access other functions of the class (whose pointer variable has been defined already in the header file), but the exception is thrown. the message declares it as "Access Violation".
I m working in Visual C++ 6.0.
If any one knows the solution, kindly reply me soon.
Usman Arif
|
|
|
|
|
If you don't post any code, we won't be able to help you...
And what do you mean by:
Usman Arif wrote:
i have initialised a constructor of that class using that pointer, but, in a member function of the class whose header contains the declaration of the pointer
and by:
Usman Arif wrote:
whose pointer variable has been defined already in the header file
If you have an exception that is thrown, it means that your pointer is probably invalid (pointing to 0xcccccc or 0x00000 or something like that...). Have you tried to use the debugger ?
|
|
|
|
|
Dear All!
I am running fullscreen. I show a picture on a other windown. Now i uses windown media show it. i want rotate it, but i can't.
Can you help me.
Thank!
|
|
|
|
|
CExBitmap[^]
Has a rotation function. If you compile it with WINNT31_ROTATE defined it will use the world transforms on Win2000 and above; otherwise it uses DIB data to rotate it.
There are other articles that also have rotation function code:
http://www.codeproject.com/bitmap/[^]
INTP
"The more help VB provides VB programmers, the more miserable your life as a C++ programmer becomes."
Andrew W. Troelsen
|
|
|
|
|
Hello!
I have 2 programs, one that waits for messages that the other posts for him.
I need somehow to share my handle with the sending application so when I start the program, it will get the handle somehow and post a message to him and so on.
The registry is one way but I don't like,
a temp file is another but I don't like it either...
There's got to be something better and elegant, some function I'm missing
Any ideas?
Thanks.
|
|
|
|
|
I don't know if DDE is still used widely, but you can take a look in the MSDN.
As for the temporary file idea, you can use a CMemFile.
Quote from MSDN: A memory file is useful for fast temporary storage or for transferring raw bytes or serialized objects between independent processes.
INTP
"The more help VB provides VB programmers, the more miserable your life as a C++ programmer becomes."
Andrew W. Troelsen
|
|
|
|
|
i have made a programe to know the current hardware profile of the system using GetCurrentHwProfile api,At first it does not does not recognize the function in the window.h.And
when i write #define _WIN32_WINNT 0x4000; it gives error in the winbase.h. Please help me out.....
#define _WIN32_WINNT 0x4000;
#include <windows.h>
#include <stdio.h>
#include <tchar.h>
const int HW_PROFILE_GUIDLEN=100;
const int MAX_PROFILE_LEN=100;
typedef struct HW_PROFILE_INFO {
DWORD dwDockInfo;
TCHAR szHwProfileGuid[HW_PROFILE_GUIDLEN];
TCHAR szHwProfileName[MAX_PROFILE_LEN];
} HW_PROFILE_INFO, *LPHW_PROFILE_INFO;
int WINAPI WinMain(HINSTANCE h,HINSTANCE p,LPSTR l,int n)
{
TCHAR szBuffer1[1000];
TCHAR szBuffer2[1000];
TCHAR szBuffer3[1000];
HW_PROFILE_INFO HwProfInfo;
GetCurrentHwProfile(&HwProfInfo) ;
sprintf(szBuffer1, "DockInfo: %s", HwProfInfo.dwDockInfo);
MessageBox(0, szBuffer1, "Dock Info", 0);
sprintf(szBuffer2, "Profile Guid: %s", HwProfInfo.szHwProfileGuid);
MessageBox(0, szBuffer2, "Profile Guid", 0);
sprintf(szBuffer3, "Friendly Name: %s", HwProfInfo.szHwProfileName);
MessageBox(0, szBuffer3, "Friendly Name", 0);
return 0;
}
|
|
|
|
|