|
For some reason, my C:\Program Files\Microsoft Visual Studio\VC98\MFC\LIB directory disappeared yesterday.
This is somewhat of a problem as I can't compile my programs anymore
Now, my biggest problem is that my Visual C++ cd is in Europe and I'm in the Carribean at this moment.
You might say: hey, what's the problem, go and enjoy the beach and the sun and forget about programming but I should really appreciate it if someone can send me a zip file with the contents of C:\Program Files\Microsoft Visual Studio\VC98\MFC\LIB (with mfc42d.lib, ...) to wjans@aqualectra.an?
I'm using Visual C++ 6.0 by the way.
Thanks in advance.
Wim
|
|
|
|
|
Are you sure you can handle such e-mails?
I've checked, but the LIB-directory is 43MB in size (at my PC), and ZIPing won't make it much smaller.
Cheers,
EiSl
|
|
|
|
|
Hi,
Hmm, I didn't realise it was this huge.
Is it possible for you to put it on a website or something like that so I can ftp it?
The zip file is just for easyness, so I have all the files in one cabinet
Thanks!
Wim
|
|
|
|
|
|
Hi Philip,
Thanks for the zip file.
I've downloaded it and everything seems to work again!
I really appreciate it that you've helped me out!
Thanks
Wim
|
|
|
|
|
Still need it? I can upload to my site. I got 14M zipped (49 unzipped)
Philip Patrick
Web-site: www.stpworks.com
"Two beer or not two beer?" Shakesbeer
|
|
|
|
|
hi
i have a "char* printername" variable is there. in this variable i want to store the selected printername. i assign this value to "dmDeviceName" structure member of DEVMODE structure. it's giving data type conversion error.
dmDeviceName datatype is TCHAR or BCHAR.
how can i assign my value to that. please help it's very urgent.
thank you
|
|
|
|
|
Instead of using char* I would recommend using CString if you are using MFC or WTL. If not then use std::string to store the name of the printer.
Third option would be to use a TCHAR printername[ 256 ]; to store the name of the printer. Then when you want to store it use _tcsncpy( ) to copy the name of the printer from dmDeviceName to this buffer.
But I would recommend using a string class - either CString or std::string.
Wenn ist das Nunstück git und Slotermeyer? Ja! Beierhund das oder die Flipperwaldt gersput!
|
|
|
|
|
in <wingdi.h> :
#ifdef UNICODE
typedef WCHAR BCHAR;
#else
typedef BYTE BCHAR;
#endif
How low can you go ? (MS rant)
|
|
|
|
|
<br />
CMyView::OnChar(...)<br />
{<br />
PostThreadMessage(id,msg,0,0);<br />
}<br />
when i type with less than 130ms time intervals between keystrokes a deadlock results in the app's main thread.Any help would be greatly appreciated.
|
|
|
|
|
Any more info about the processing thread?
What does it do with the messages and how does it do it?
What kind of "deadlock" are you having?
I keep submitting “VB” as a Priority-1 bug, but apparently no one here knows how to fix it. Nick Hodapp, Semicolon
|
|
|
|
|
Sir, I want to flush out the socket buffer. But I can't get the way to do that. Help me....
C.R.Naik
|
|
|
|
|
you can't AFAIK.
Btw, the proper sequence for closing a TCP connection is:
Finish sending data.
Call shutdown() with the how parameter set to 1.
Loop on recv() until it returns 0.
Call closesocket().
http://tangentsoft.net/wskfaq/newbie.html#normalclose
M
|
|
|
|
|
How can I move a CTreeCtrl item to a other position?
Item 1
SubItem 11
SubItem 12
SubItem 13
Item 2
SubItem 21
SubItem 22
SubItem 23
So I want to move Item 2 with all subitems (up or down):
Item 2
SubItem 21
SubItem 22
SubItem 23
Item 1
SubItem 11
SubItem 12
SubItem 13
How can I make this? (I want to move the current selected item with all subitems up or down)
Daniel
---------------------------
Never change a running system!
|
|
|
|
|
There's no built in method that does this. The only way I'm aware of is to manually walk the tree, create new items with the same attributes as the old ones and finally delete the old ones. It would probably be a good idea to disable redrawing in the control while doing this ( m_wndTreeCtrl.SetRedraw( FALSE ); at the beginning and m_wndTreeCtrl.SetRedraw( TRUE ); when everything is finished.
Wenn ist das Nunstück git und Slotermeyer? Ja! Beierhund das oder die Flipperwaldt gersput!
|
|
|
|
|
I have a MFC MDI program, where I want to have in their own
MDIchildframe windows both CScrollView based view and CListView
based view. (Data neatly in CListView window, graphics in CScrollView window)
How can I accomplish that?
TIA
-Marko
|
|
|
|
|
Do I need to use CMultiDocTemplate in CApp::InitInstance? Is that what I should read about or do I risk learning something for nothing?
|
|
|
|
|
Yes, you need to use an addtional CMultiDocTemplate object:
pDocTemplate = new CMultiDocTemplate(
IDR_PGPCONTYPE,
RUNTIME_CLASS(CSGAControlDoc),
RUNTIME_CLASS(CChildFrame),
RUNTIME_CLASS(CYourScrollView));
AddDocTemplate(pDocTemplate);
pDocTemplate = new CMultiDocTemplate(
IDR_PGPCONTYPE,
RUNTIME_CLASS(CSGAControlDoc),
RUNTIME_CLASS(CChildFrame),
RUNTIME_CLASS(CYourListView));
AddDocTemplate(pDocTemplate);
By default this will register 2 view types wit hteh same document. When you create the document you will be asked which type of view you want. To add the other view type, you will have to write a function thats adds the new view to the existing document. I did this a while back, but the code has since gone obselete in my app and has been deleted, so I don;t have any example code ready to hand.
Roger Allen
Sonork 100.10016
I have a terminal disease. Its called life!
|
|
|
|
|
I can easily see all the printers connnected / installed by using EnumPrinters, but when I view them from Control Panel - Printers, they all say Status - "Ready", and I know for a fact that one of them is turned off!! Anyone know how I can tell there true status of a printer please?
Thanks
I feel like I'm diagonally parked in a parallel universe
Jeremy Davis
http://www.astad.org http://www.jvf.co.uk
|
|
|
|
|
Hi,
I am using static controls to display bitmaps in my dialog-based app. I am not using MFC. The bitmaps in the main dialog window display correctly, but the bitmaps in child dialogs (such as my 'About' dialog) do not appear at all.
I am doing exactly the same thing for the child dialogs as for the main dialog (using static control, selecting bitmap and the bitmap resource ID)
so what's going on?
Thanks, any suggestions welcome
|
|
|
|
|
Is the About dialog's static set to type BITMAP?
|
|
|
|
|
The settings are:
ID: IDC_STATIC
Type: Bitmap
Image: IDB_BITMAP2
There is a valid bitmap resource called IDB_BITMAP2. The thing I can't understand is why it works in the main dialog, but no bitmaps appear in the About dialog??
|
|
|
|
|
Hi,
I'm working on an application with many forms, i designed a layout for all the forms, but i wanted to build a class that had OnDraw(CDC* pDC) so i didn't have to override it from all my CFormView derived classes.
I created a CLayout Class with OnDraw(CDC* pDC) function and now i would like to call it from other classes so i could draw and paint the forms.
But, how can i get the pDC of this form?
And i also need the hWnd pointer in my CLayout::OnDraw Function
In my derived call i wrote:
HWND* hWnd=NULL;
hWnd=(HWND*)this->operator HWND();
CDC pDC=::GetDC(*hWnd);
CLayout ly(hWnd);
ly.OnDraw(&pDC);
...but GetDC function returns a HDC no CDC...
This is my OnDraw Function...
void CLayout::OnDraw(CDC* pDC)
{
//cria os objectos
CBrush brush(RGB_FUNDO);
CBrush* pTempBrush = NULL;
CBrush OrigBrush;
CString sFormName="New Machines";
CFont hFont;
CRect rc;
try
{
//cria a fonte para as letras de identificação do form
VERIFY(hFont.CreateFont(40, 15, 0, 0, FW_NORMAL,FALSE, FALSE, 0, ANSI_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH | FF_SWISS, "Arial Bold"));
//define a area total do ecran
GetClientRect(*hWnd,&rc);
ScreenToClient(*hWnd,&rc);
//seleciona o brush (cor) a usar
pTempBrush = (CBrush*)pDC->SelectObject(brush);
//guarda o brush original
OrigBrush.FromHandle((HBRUSH)pTempBrush);
//desenha o rectangulo a pintar com aquele brush
pDC->Rectangle(0, 0, rc.Width() , rc.Height());
//defino a cor do texto
pDC->SetTextColor(RGB_WHITE);
//elimino o bkgrn do texto
pDC->SetBkMode(TRANSPARENT);
//associa-lhe a fonte criada
pDC->SelectObject(hFont);
pDC->DrawText(sFormName, -1, CRect(15, 0, rc.Width(),80), DT_LEFT|DT_SINGLELINE|DT_VCENTER);
}
catch(CResourceException* e)
{
e->ReportError();
e->Delete();
}
pDC->SelectObject(&OrigBrush);
}
What am i doing wrong
Thank you for your time
rui
|
|
|
|
|
You could try
<br />
CClientDC dc( this );<br />
CLayout ly( *this );<br />
ly.OnDraw( &dc );<br />
but if this code gets called in OnPaint then you should use CPaintDC instead.
You also might get away with supplying the hWnd of the form because CDC has a member function GetWindow( ) which returns the window associated with the device context (if there is a window BTW - returns NULL during printing for instance).
Wenn ist das Nunstück git und Slotermeyer? Ja! Beierhund das oder die Flipperwaldt gersput!
|
|
|
|
|
Thank you dabs,
I changed my code, now in my CFormView derived class OnInitialUpdate() i did like:
ClientDC dc( this );
CWnd* cWnd=dc.GetWindow();
CLayout ly(cWnd );
ly.OnDraw( &dc );
then, i CLayout
CRect rc;
cWnd->GetClientRect(&rc);
GetClientRect((HWND)cWnd, &rc);
cWnd->ScreenToClient(&rc);
but rc is like : tagRECT: {top=32730 bottom=32730 left=32768 right=32768}
well, i forced other values, and it didn't draw the same, but in debug mode, i follow the pointer and it seems ok.
What can i be doing wrong?
Thanks once more for your time
|
|
|
|