|
|
So see here[^] and here[^] you can find more examples on the codeproject.
|
|
|
|
|
i need some simple example..So plz help me
singh
|
|
|
|
|
|
I have ceated a dialog box whose bporder width seems to be thick around 2 pixel. How can I increase/decrease the boreder width of dialog box
Any kind of help is appreciated.
Cheers
"A winner is not one who never fails...but the one who never quits"
|
|
|
|
|
You need to increase non client area size for this purpose handle WM_NCCALCSIZE, add a message map entry for ON_WM_NCCALCSIZE()...
A sample implementation looks likewise...
void CDialogTestDlg::OnNcCalcSize(BOOL bCalcValidRects, NCCALCSIZE_PARAMS* lpncsp)
{
UNREFERENCED_PARAMETER( bCalcValidRects );
lpncsp->rgrc->top += 4;
lpncsp->rgrc->left += 4;
lpncsp->rgrc->bottom -= 4;
lpncsp->rgrc->right -= 4;
CWnd::OnNcCalcSize( bCalcValidRects, lpncsp );
}
Also note that you may need to handle WM_NCPAINT to fill out increased region.
Nibu babu thomas
Microsoft MVP for VC++
Code must be written to be read, not by the compiler, but by another human being.
Programming Blog: http://nibuthomas.wordpress.com
|
|
|
|
|
Hai !
GoodMorning !
I am able to read the contents of a whole xyz.txt file into an character array, using
CFile cfile_object;
cfile_object.Open( strFilePath, CFile::modeRead);
// strFilePath contains the path of the required file
int len = cfile_object.GetLength();
char chFile[len];
UINT lBytesRead = cfile_object.Read (chFile, len);
chFile contains whole content of xyz.txt file, but i want each line of xyz.txt file to be stored in a separate string?
if possible plz supply some sample/reference code.
thanks!
|
|
|
|
|
|
CStdioFile::ReadString - Reads a single line of text.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
|
Hai...
I need to display a color text on GroupBox Caption and change a default border to colorful border. Thanks for help.
Regards,
Selvan.S.
|
|
|
|
|
hi selvan
you already ask this question .......
|
|
|
|
|
|
Did you see WM_CTLCOLOR it shows you perfect answer.
|
|
|
|
|
WM_CTLCOLOR(its second time that you asked this question ).
|
|
|
|
|
Did you go through the specified link? It the same question asked before and the replies describes about how to change caption color and border color with code snippet.
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|
|
Hi,
I have a function which is accepting two parameters LPARAM and WPARAM. The value being passed to this function by the URL is very big which cannot be stored in LAPARAM. Which data other than LPARAM should i take so that there is no loss of information.
Thanks.
Dhiraj Kumar Saini
|
|
|
|
|
One option is to allocate a block of memory and have the receiving function delete. I've also used a common circular buffer.
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|
Hi,
It not only recieves the data but also has other functions. Is there sny other way. Please tell me how you have used circular buffer.
Thanks
Dhiraj Kumar Saini
|
|
|
|
|
Dhiraj kumar Saini wrote: Please tell me how you have used circular buffer.
Rather than do that, try the simplest way first. The sending function allocated memory with new , the receiving function deallocates it with delete .
The other methods are a bit too verbose to explain here. Choosing which one will depend on how the message is sent, synchronously, asynchronously, from one source, from multiple sources and so on.
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|
I want to call OnCancel of Dialog from a thread in the dialog
How can I do that, pls adv
|
|
|
|
|
Send WM_COMMAND to dialog with WPARAM as IDCANCEL .
::SendMessage( hWnd, WM_COMMAND, IDCANCEL, 0 );
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|
|
I've a dropdown combo box in a dialog.
I want to right-click on a combox box's list box item and have
the cursor placed at the start of the clicked item string for editing.
How can I achieve this ?
Any samples or relevant links would be appreciated.
Thanks in advance.
|
|
|
|
|
|
Please run the code below.
int main(int argc, char* argv[])
{
int ii = 20;
char tmp[32] = "loveing";
printf("[%d]hello[%s]\n", tmp);
char szData[52] = {0};
sprintf(szData, "[%d]saying [%s]\n",ii);
printf("%s", szData);
return 0;
}
The compiler don't complain in the compile phase, but when you press F5 to debug, 'unhandle exception' prompt. while not debug, run it at once, you just get wield strings or output.
We all use some sort of printf or CString::Format in the code, we are not careful sometimes. So how to handle this problem or check out the bugs in the exist project?
|
|
|
|