|
bujji_bec wrote: i put .ini file in Dubug Folder and its also Contains exe files.
current path i given ../ or ../Debug
its working in my system.
i will copie Debug Folder into some other System. its Cursing.
pls Help it me how to Specify how to give.
Use _tgetcwd , GetModuleFileName .
Nibu thomas
A Developer
Programming tips[^] My site[^]
|
|
|
|
|
How to modify CListBox's style?
alantop
|
|
|
|
|
alan top wrote: How to modify CListBox's style?
Refer ModifyStyle or ModifyStyleEx or SetWindowLong .
Nibu thomas
A Developer
Programming tips[^] My site[^]
|
|
|
|
|
CListBox m_List;
m_List.ModifyStyle(...);
whitesky
|
|
|
|
|
I use m_ListBox.ModifyStyle(0, LBS_MULTIPLESEL),
but don't modify its style to "multiple".
why?
thanks!
alantop
|
|
|
|
|
See Here[^] maybe it is some helpful to you
whitesky
|
|
|
|
|
Are you sure that style can be changed at run-time? Some can, other can't.
"The largest fire starts but with the smallest spark." - David Crow
|
|
|
|
|
Hi,
Can anyone help with adding file contents to Rich Edit Box??
I have a text file i want to add the contents to rich Edit box,how to do that?
|
|
|
|
|
Create control variable of type "CRichEditCtrl"
you can set text using SetWindowText API.
Make sure that AfxInitRichEdit(); called in your InitInstance function of the APP class.
SaRath
|
|
|
|
|
Hi Sarath,
Thanks for the reply.
I have created m_FCONT of CRichEditCtrl,
for reading the contents is this function enough ??
char ch;
FILE *fp;
fp=fopen(str,"r");
ch=getc(fp);
while(!feof(fp))
{
ch=getc(fp);
}
|
|
|
|
|
vinaycool wrote: ch=getc(fp);
Reading one character at a time is not very efficient. I suggest using CRichEditCtrl::StreamIn() .
"The largest fire starts but with the smallest spark." - David Crow
|
|
|
|
|
I create a dialog dynamic, and only can move it in the main dialog.I have not ever set its parent. How to do to move it out of main dialog?
My app is based on dialog.
Thank in advance
|
|
|
|
|
chybin wrote: I create a dialog dynamic, and only can move it in the main dialog.I have not ever set its parent. How to do to move it out of main dialog?
Make it a popup window by adding WS_POPUP style to it. Now I guess it's a child (WS_CHILD ). So remove WS_CHILD and add WS_POPUP .
Nibu thomas
A Developer
Programming tips[^] My site[^]
|
|
|
|
|
|
I need to use a function which draws to a window using it's HWND handle, now I need to draw to a bitmap object rather than the window (It's now server based and there are no windows).
Is this possible? How would I go about it?
Thanks in advance!
|
|
|
|
|
the first thing you should do is:
HDC hDc = GetDC(hWnd);
then you can create a compatible bitmap, select it into your DC, and start drawing on it.
Cleek | Image Toolkits | Thumbnail maker
|
|
|
|
|
I was hoping to do this without a window but if I have to create a window then that will be OK but I have been trying to make this work for 2 days now with no luck.
If I use the code:
<br />
page.DrawEx(0, 0, rect, 0, 0, (short)dZoomFactor);<br />
Then it renders the image perfectly in the top corner of the desktop window without any problems but when I create a window and pass the hwnd and DC (Tried GetDC and GetWindowDC), I get nothing.
My eventual aim is to render the page to a bitmap and save as a graphic file.
Any pointers in the right direction?
Thanks,
Dan
|
|
|
|
|
Hope I understood your question
<br />
HDC hdc=CreateCompatibleDC(::GetDC(this->m_hWnd));<br />
HBITMAP hbit=CreateCompatibleBitmap(GetDC()->m_hDC,800,600);<br />
hbit=(HBITMAP)SelectObject(hdc,hbit);<br />
hbit=(HBITMAP)LoadImage(AfxGetInstanceHandle(),"d:\\error.bmp",IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE|LR_CREATEDIBSECTION);<br />
<br />
SelectObject(hdc,hbit);<br />
BitBlt(GetDC()->m_hDC,0,0,800,600,hdc,0,0,SRCCOPY);<br />
<br />
whitesky
|
|
|
|
|
Good. I'm just in time. This is C file handling code, you should never use it. Instead use ifstream and ofstream.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Is it possible to automate Outlook Express such that I can create a message with
- a recipient
- a subject
- and an attachment
even if Outlook Express is not the default mail client? I am aware of MAPI but, would love to have something that can work with Outlook Express alone and Outlook alone.
Thanks
|
|
|
|
|
|
hi! thanks for the answer.
i already saw this article and while it does create messages, it doesnt seem to do what i want.
What I need is to create a message with an attachment, then display that message window. That article doesnt seem to handle this but just processes the messages in the OE Store itself. Or am I missing something?
|
|
|
|
|
Hi Does anyone know how i can remove individual items from a toolbar in a SDI app ?
not 'grey' the button but actually remove it
thanks
Si
|
|
|
|
|
si_69 wrote: Hi Does anyone know how i can remove individual items from a toolbar in a SDI app ?
not 'grey' the button but actually remove it
I think you are design the Toolbar and you don't want some button's
Simply drag the buttons from toolbar and drop any where...
hope i think right way...
Knock out 't' from can't,
You can if you think you can
|
|
|
|
|
A_LaxmanSimply drag the buttons from toolbar and drop any where...
hope i think right way...
no, i want to do this programmatically, not at design time
depending on how the user access my application, some toolbar items
will not be visible
thanks
|
|
|
|