|
I have property sheet.within that i have 3 pages.
based on slection (selection based on the node in a treewhich is aside in another view)i would like to chane the pages(property pages) of property sheet.
|
|
|
|
|
Sounds like a job for the sheet's SetActivePage() method.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
SetActive() is for select page among the set of pagess.but my requirement is delete the page and addpage into property sheet from another view dynamically.
|
|
|
|
|
rgchezhian wrote:
but my requirement is delete the page and addpage...
Then use RemovePage() and AddPage() respectively.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
Yes i used but i couldn't delete or add.since i couldn't get the handle of property sheet from my treeview.
|
|
|
|
|
I am trying to centre the dialog launched by the GetOpenFileName API function. My hook function tries to centre the window in response to the WM_INITDIALOG but has no effect - the dialog still appears in the top-left corner. The hook function is definitely being called.
I've tried responding to all the messages that the hook function is called with and still nothing happens.
If anyone has any ideas what else I could try I'd be very grateful,
Thanks,
Stuart
UINT CALLBACK OFNHookProc(HWND hdlg, UINT uiMsg, WPARAM wParam, LPARAM lParam)
{
UINT uiRetCode = 0;
switch(uiMsg)
{
case WM_INITDIALOG:
CWnd* pWnd = CWnd::FromHandle(hdlg);
if(pWnd != NULL)
{
pWnd->CenterWindow();
}
uiRetCode = 1;
};
return uiRetCode;
}
// Display file selection box
OPENFILENAME ofn;
memset(&ofn, 0, sizeof(ofn));
ofn.lStructSize = sizeof(ofn);
// Define filters. Get all link files (shortcuts)
ofn.lpstrFilter = _T("Shortcuts (*.lnk)\0*.lnk\0");
// Set the dialog title
ofn.lpstrTitle = _T("Resource Finder");
// Set the initial directory to be the All users Start Menu
ofn.lpstrInitialDir = tempString;
// Specify a buffer to hold the file selections
ofn.lpstrFile = path;
ofn.nMaxFile = MAX_BUFFER;
ofn.Flags = OFN_ALLOWMULTISELECT | OFN_EXPLORER | OFN_PATHMUSTEXIST
| OFN_FILEMUSTEXIST| OFN_HIDEREADONLY | OFN_ENABLEHOOK ;
ofn.lpfnHook = OFNHookProc; //Addr of callback
// Display the dialog
int nResult = ::GetOpenFileName(&ofn);
|
|
|
|
|
Change 4 this
CWnd* pWnd = CWnd::FromHandle(::GetParent(hdlg));
Best regards, Mauro.
|
|
|
|
|
Thanks very much Mauro, this works perfectly! Anyone wondering why the article on MSDN:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/userinput/commondialogboxlibrary/commondialogboxreference/commondialogboxfunctions/ofnhookproc.asp
explains it.
Stuart
|
|
|
|
|
Hi all,
Sorry if this has been asked before (I couldn't find anything) but does anyone know if its possiable to use the MSDN collections that come with VC.NET with VC6? All I can find is they are "not compatable", but I was wondering if anyone knew a workaround.
Cheers
|
|
|
|
|
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.
|
|
|
|