|
|
i cant seem to center text in a text box. there doesn't appear to be an option for this in the toolbar. Im usin borland c++.
I don't know what to write here!!!!
|
|
|
|
|
|
How do I go about doing this?
I don't know what to write here!!!!
|
|
|
|
|
I doubt Borland C++ has such a class.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
It's been almost 15 years since I've used a Borland compiler, but can you do something like:
SetWindowLong(hwndEdit, GWL_STYLE, GetWindowLong() | ES_CENTER);
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
I have two splitter in my window.one splitter contais treeview.another split contains property sheet with pages.based on the selection in tree i would like to change th epages in property sheets.if any body know this requirement please let me know.
|
|
|
|
|
rgchezhian wrote:
...i would like to change th epages in property sheets.
What do you mean by "change the pages?"
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
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
|
|
|
|