|
|
In a dialog based program, I insert a MS FlexGrid control, and I stretch the grid to fill the rect as I want. But use SetColWidth not set the column as wide as I want.
my code below:
m_grid.SetRows(3);
m_grid.SetCols(2);
m_grid.SetRow(0);
m_grid.SetCol(0);
m_grid.SetText(_T("name"));
m_grid.SetRow(0);
m_grid.SetCol(1);
m_grid.SetText(_T("age"));
CRect rcGrid;
m_grid.GetClientRect(&rcGrid);
int iColWidth = 0;
iColWidth = rcGrid.Width()/2;
m_grid.SetColWidth(0, iColWidth);
m_grid.SetColWidth(1, iColWidth);
BTW, is there any links I can get help of MS FlexGrid or code samples? So I don't have to ask every functions here!
modified on Monday, August 25, 2008 4:21 AM
|
|
|
|
|
|
Please help us to include transparent dialogs in our project.
|
|
|
|
|
You've to go for layered windows. Refer this excellent Article by Paul DiLascia.[^]. It describes everything in detail with code snippets.
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|
|
See here[^]
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Hi,
I want to need of copy file/Folder information(File Name,File Path,File Data ...) which is currently copy.
secondly I want to need same for Paste file/Folder information.
Thanks
Anubhava Dimri
|
|
|
|
|
Do you want to track copying of folders/files?
If positive, See Here[^] & here[^]
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Hai..
This link gives about Edit, combobox,static text, list controls,etc., but no group box control. Please tell me any other source. Thanks to all.
Regards,
Selvan.S.
|
|
|
|
|
can you please carry on with the same thread. you have a link to reply in the posts that you can use to post response to the same thread. This is not a chat forum and so no need to open new threads.
Selvan.S wrote: This link gives about Edit, combobox,static text, list controls,etc., but no group box control
If you know how to do a thing for either of the control you can most of the times use it for other controls too...
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Hai Hamid,
Thanks for reply, I tried like as below.
CPaintDC dc(this); // device context for painting
CRect rc;
CWnd * pW = this->;GetDlgItem(IDC_GROUPBOX);
pW->;GetClientRect(&rc);
pW->;ClientToScreen(&rc);
this->;ScreenToClient(&rc);
dc.FillSolidRect(&rc,RGB(255,0,0));
Regards,
Selvan.S.
|
|
|
|
|
Hai..
I tried with some codes from your suggested link, but no color display on Groupbox border line and Groupbox caption text. Could you please tell me the way. Thanks for help.
Regards,
Selvan.S.
|
|
|
|
|
For change color for groupbox you can use of WM_CTLCOLORSTATIC or WM_CTLCOLOR.Can you show your code how did you try?
|
|
|
|
|
|
Please Guide I command "Update" Sql2000 in VC++6.0.
thanks very much
|
|
|
|
|
Hi,
I am trying to increment a pointer seems pretty simple ????
Not quite I went to disaseembly mode and it seems to wrong value
was generated
my_ptr1 = psa + 0x00000224;
005C7F67 mov edx,dword ptr [psa]
005C7F6A add edx,4D1000h <---- shouldn't this 0X00000224
005C7F70 mov dword ptr [my_ptr1],edx
|
|
|
|
|
When you incremented the pointer psa using the above code, it actually increaments
sizeof( *psa ) * 0x00000224 which will be equal to 0x4D1000.
So you should actually chnage the code as follows.
my_ptr1 = (class_name*) ( (int)psa + 0x00000224 );
Where class_name is the type of pointer my_ptr1.
|
|
|
|
|
guess I'll cast the return to void *
|
|
|
|
|
Sorry I didnt get what you mean...
|
|
|
|
|
if I do the following cast the "rvalue" to (void *)
my_ptr1 = (void *) ( (int)psa + 0x00000224 );
|
|
|
|
|
But is my_ptr1 a void* type ?
|
|
|
|
|
didn't try it just guessed at the soultion maybe move the value
of psa to a unsigned 32 bit number where that math will come out
the way I want it to .....
|
|
|
|
|
It will show compilation error unless my_ptr1 is void*. Suppose my_ptr1 is defined as
int* my_ptr1;
Then you should write is as
my_ptr1 = (int*)((int)psa + 0x00000224 );
|
|
|
|
|
|
I prefer to cast the pointer to a pointer pointing to
a byte-sized type - that way the code is portable to 64-bit
(Naveen's code will fail in 64-bit builds)...
my_ptr1 = (int*)((char*)psa + 0x00000224 );
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|