|
I think you should add this character before and after your string: '#'
|
|
|
|
|
Hi,
I want to develop a small vc++ SDI application to read .bsc File.
Any help in this direction is highly appreciated. Some where in MSDN there is one sample which does this. I am unable to find it as i donot have MSDN with me now. Any pointers?
Thanks
cutti
|
|
|
|
|
Hi all. I've got a sockets communication module with is used in our app.
Its works fine, but apparently it doesn't like proxy server.
Coule anyone point me to an example of what to modify in a normal sockets connection to make it use the proxy instead.
Thanks everyone.
Pete
Insert Sig. Here!
|
|
|
|
|
You can have a look at this[^]
and
this[^]
If it's not a SOCKS proxy, your end user will need a proxy client installed (provided by the one that made the proxy)
lazy isn't my middle name.. its my first.. people just keep calling me Mel cause that's what they put on my drivers license. - Mel Feik
|
|
|
|
|
Thanks for that Daniel.
I did do a search for sockets and proxy but didn't come across those.
Cheers
Pete
Insert Sig. Here!
|
|
|
|
|
Would anyone know how to print a Dialog box. I want to the whole thing printed. I have tried loading it into a dc but I might not be doing it properly to print it in the created printer dc. I need help fast...Thank you
|
|
|
|
|
Have you looked into the WM_PRINT[^] message?
Wenn ist das Nunstück git und Slotermeyer? Ja! Beierhund das oder die Flipperwaldt gersput!
|
|
|
|
|
see keyboard, if u press key "Print Screen SysRq", u can copy (print) the dialog image to somewhere u want.
if by programming, there is an example in MSDN (i can't remember its name, possible in sdk).
basically, use screen dc (no WM_PAINT at all).
includeh10
|
|
|
|
|
Maybe this will help you:
http://codeproject.com/printing/printing_wo_docview.asp[^]
Mazy
"And the carpet needs a haircut, and the spotlight looks like a prison break
And the telephone's out of cigarettes, and the balcony is on the make
And the piano has been drinking, the piano has been drinking...not me...not me-Tom Waits
|
|
|
|
|
Would anyone know how to print a Dialog box. I want to the whole thing printed. I have tried loading it into a dc but I might not be doing it properly to print it in the created printer dc. I need help fast...Thank you
|
|
|
|
|
see previous question, u r twins.
if need more, let me know.
includeh10
|
|
|
|
|
I'm in the middle of writing a control which will show some text.
Now, if I just output the text using DrawText, my text is displayed using the default font, which is Arial bold I think.
But I want to use the font that is used in a static control. This font is much smaller and not bold.
I am able to use this font using CreateFont.
But what if Ms decides to use a different font in a future version. This means I have to change my control to use a different font.
What would be nice is if I should have a function that can determine the default font used for a static control. I looked on msdn but can't find such a function.
So does anybody know if there is such a thing as GetSystemMetrics but then for fonts?
Thanks
Wim
|
|
|
|
|
WTL has a ATLGetDefaultGuiFont( ) which uses ::GetStockObject( DEFAULT_GUI_FONT ). I think this might be what you are looking for. Otherwise you could always require the users of your control to do a
<br />
m_wndMyControl.SetFont( GetFont( ) );<br />
after your control has been Create'd/Sublcass'ed, assuming m_wndMyControl is a member variable in a dialog - GetFont( ) returns the font of the dialog.
Wenn ist das Nunstück git und Slotermeyer? Ja! Beierhund das oder die Flipperwaldt gersput!
|
|
|
|
|
I have:
POSITION pos1 = pDoc->GetFirstViewPosition();
while (pos1!=NULL)
{
CView* pView = pDoc->GetNextView(pos1);
ASSERT_VALID(pView);
The app starts with View1 showing(there are two views only). View2 hasnt been spawned yet (view1 spawns it). In this case I expected pView to be NULL. But this code snippet I have will not like NULL. But it doesnt crash at this ASSERT ever.
2. The weird thing: I stepped in, and even though view2 wasnt created, pView came out to be non NULL (pos1 gets set to NULL though as expected) SO how come pView is nonNULL for a view that isnt even there? Or does the doc know that it has two views even if View2 hasnt been spawned yet?
Appreciate your help,
ns
|
|
|
|
|
According to your description it behaves correctly. On the first run, pView receives the pointer to the View1 which IS created, then pos1 is set to NULL, indicating that there is no more view to enumerate.
Where is the problem? Is it the GetNextView() call? If it starts at the begin, then the next is the first in the list.
I keep submitting “VB” as a Priority-1 bug, but apparently no one here knows how to fix it. Nick Hodapp, Semicolon
|
|
|
|
|
Oh I see now. I thought that the first view was dealt with already outside the while, and in actuality its just pointing to the start of all the views....thanks for clearing it up for me!
Appreciate your help,
ns
|
|
|
|
|
pView will be pointing to the first view for that document which is of type view1. To check this expand the pView pointer in the debug window and see what the RUNTIME_CLASS information is. What you describe happening is exactly what should happen in the case described.
pos1 is an iterator which gets set to start of list
pos1 get incremented to NULL (no more elements) when you get the view1 pointer, it would goto non NULL if another view (view2) was in the view list, but its not.
Roger Allen
Sonork 100.10016
I have a terminal disease. Its called life!
|
|
|
|
|
Thanks for the debug window RUNTIME_CLASS idea. I hadnt thought of that.
Appreciate your help,
ns
|
|
|
|
|
Hi guys
It is possible to print more than one page inside OnPrint?
I try pDC->StartPage() and pDC->EndPage() and always receive a -1 as return value.
I'm doing something wrong?
Cheers
Doctorpi
|
|
|
|
|
Well, you could do it like that, but you would have to do it:
pDC->EndPage();
pDC->StartPage();
OnPrepareDC(pDC);
.. rest of printing code.
What you really need to do is to set the CPrintInfo max_page value to the number of pages you want to print. In OnPreparePrinting() you need to call pInfo->SetMaxPage(x). Your OnPrint() procedure will then be called once for every page to be printed. You should check the value of pInfo->m_nCurPage to see which page of output you need to draw.
Roger Allen
Sonork 100.10016
I have a terminal disease. Its called life!
|
|
|
|
|
Yes, I concur. I have written a series of applications which produce bills (mainly for solicitors, or for the non-UK reader, lawyers). As you might imagine, these can often (all too often) be multiple pages. Some of them are for claiming from the Legal Aid Board, so have a rigid format, while others are more free-form in content.
The way I do this is to generate a list of printing objects, each of which knows the page it is to be printed on (my base CPrintObject has a PageNum() member). I go through on OnPreparePrinting and generate this list, then the last object in the list has my final page number.
This can be used in SetMaxPage(), and then in OnPrint, I just go through the list and for each object where PageNum() == pInfo->m_nCurPage, I invoke the object's Print method.
This works fine, and allows you to honour page number selection from the print dialog and so on.
The only issue I found was that the preview looked terrible, presumably because the preview view was getting confused about the font selection/deselection that was taking place, so I output to a memory DC then blit the result, which tidied it up at the expense of taking longer.
Steve S
[This signature space available for rent]
|
|
|
|
|
I call the FindText SDK function to open a modeless "Find / Replace" dialog.
I have defined some keys with accelerators (like 'S', ...) in my application.
So, the problem is that the modeless "Find / Replace" dialog do not get this keys - the main application get the keys!
How to fix???
Daniel
---------------------------
Never change a running system!
|
|
|
|
|
Override the dialog PreTranslateMessage( ). If the accelerator keys are defined in the main accelerator table you could use this code inside PreTranslateMessage:
<br />
<br />
if ( pMsg->message == WM_KEYFIRST && pMsg->message <= WM_KEYLAST )<br />
{<br />
CWnd* pMainWnd = AfxGetMainWnd( );<br />
if ( pMainWnd != NULL )<br />
{<br />
HACCEL hAccel = static_cast< CFrameWnd* >( pMainWnd )->GetDefaultAccelerator( );<br />
if ( hAccel != NULL && ::TranslateAccelerator( pMainWnd->GetSafeHwnd( ), hAccel, pMsg ) )<br />
{<br />
return TRUE;<br />
}<br />
}<br />
}<br />
<br />
return CDialog::PreTranslateMessage( pMsg );<br />
<br />
Wenn ist das Nunstück git und Slotermeyer? Ja! Beierhund das oder die Flipperwaldt gersput!
|
|
|
|
|
Thanks! I will try it!
Daniel
---------------------------
Never change a running system!
|
|
|
|
|
Hi,
I'm trying to add bitmaps to the menu in my vc++6 app.
The problem is that my bitmaps have a purple background and this is displayed in the menu. How do i load a bitmap and set a color to transparency?
cheers
Asim Hussain
e: asim@jawache.net
w: www.jawache.net
|
|
|
|