|
First off, wow! I'm forever impressed at how quickly you guys manage to give good answers to questions. So thanks.
OK, to answer your questions:
1) Value of WINVER and _WIN32_WINNT? I'm afraid I'm ignorant enough that I have no idea where to look or how to find that answer. Sorry.
2) Is it included before anything else? If you mean in the Dlg.h, then yes.
3) Search the SDK path before? It was NOT, but it is now. So that solved the compile problem. But that has revealed another problem that I will go ahead and ask you about (knowing full-well you may not be able to answer this one):
Now I get a linking error: unresolved external symbol _WinMain@16
Any thoughts on that one?
I was hoping to just download the demo from the article and see this thing in action. That's why I don't really know much about the "program."
Regardless of whether or not you can answer my latest question, thanks for your very quick reply -- since question #3 solved my original problem.
So many of you guys that prowl these boards are awesome, so thanks to you all.
|
|
|
|
|
It just occurred to me that I pasted in only part of the link error line. I figured I should problably include the whole line:
msvcrtd.lib(crtexew.obj) : error LNK2001: unresolved external symbol _WinMain@16
Thanks.
|
|
|
|
|
|
|
I want to send a list of specific files present on my server however those files need to be secure (not directly accessible by any way). Then on a request for a file from a client, I want to transfer a file from my ISAPI app. How do i get it on client side using WinInet API in a VC++ program.
Also, I want to make sure that the specific set of files should not be accessed from any clients directly. They should be able to access only those files which are marked as ready by my ISAPI dll.
B2C
|
|
|
|
|
I have a Visual Dev V6 C++ application using satellite DLLs for localization.
Everything works fine except for Tooltips for the Toolbar. They are translated in the resource DLL. Is there a special call needed?
Thanks,
-- Harald
|
|
|
|
|
Is there any easy way to capture the client area..and save in the hard disk as Bitmap.
thanx in advance.
|
|
|
|
|
|
Sure. If you have a window handle, do something like:
HDC hdc = ::GetDC(hWnd);
CDC dc, memDC;
dc.Attach(hdc);
memDC.CreateCompatibleDC(&dc);
CRect rc;
::GetClientRect(hWnd, &rc);
CSize sz(rc.Width(), rc.Height());
CBitmap bm;
bm.CreateCompatibleBitmap(&dc, sz.cx, sz.cy);
CBitmap *pOldbm = memDC.SelectObject(&bm);
memDC.BitBlt(0, 0, sz.cx, sz.cy, &dc, 0, 0, SRCCOPY);
memDC.SelectObject(pOldbm);
bm.Detach();
::ReleaseDC(dc.Detach());
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
anyone has an idea what alternatives to FileSystemWatcher class in .net are available in C++.
Thanks in advance
shakoosh
|
|
|
|
|
Although not C++, see ReadDirectoryChangesW() and FindFirstChangeNotification() .
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
Thank you much, that's exactly what i needed.
shakoosh
|
|
|
|
|
ReadDirectoryChangesW() and FindFirstChangeNotification() works under windows but when you use it under linux with samba it doesn't work.
Is someone can help me ? I want to have a filesystemwatcher with mfc (not in donet)
thanks
|
|
|
|
|
I am having a difficult time convincing DevStudio 97 to accept and display Chinese character fonts during program time. When I run the exe the Chinese characters display fine, but only at runtime. I have been through all of the necessary steps with WinXP and the problem lies solely within Studio97 and C++. Does anybody have any ideas or suggestions specific to C++ 5.0 or Studio 97 that I am missing?
I have:
1) Installed/enabled East Asian fonts (XP)
2) Enabled various keyboard layouts applicable to the desired font (XP)
3) Installed appwzchs.dll
4) Set C++ resource files to default to ChinesePRC
5) Defined _Unicode
6) Entered WinMainCRTStartup as entry point in project settings
I am using PinYin IME.
I may be forgetting something here, if so I apologize. Any help, suggestions, critiques, ideas, etc. will be GREATLY APPRECIATED!!
|
|
|
|
|
An obvious statement but shouldn't you be using a more modern compiler ?
There could simply be a compatibility with some Windows API that has changed since VC++5.0.
Yes it costs money but sometimes saving money can be expensive.
The tigress is here
|
|
|
|
|
I agree, but unfortunately, I just work here..... My instructions have been to solve the problem using VC++ 5.0. There are also compatibility issues with the specific application of the software that would arise from upgrading to a newer compiler.
Thanks for your reply. )
|
|
|
|
|
In [Control Panel / Regional Settings / Advanced] there's an option named "Language for non-Unicode programs". Have you changed that to Chinese? DevStudio is most likely an ANSI application, so changing that option would be needed.
Hope that helps,
--
jlr
http://jlamas.blogspot.com/[^]
|
|
|
|
|
This has definitely made a difference. Maybe now I am going in the right direction.
Thank you so much
|
|
|
|
|
Running the application where we feed the data from one window and display in another window having list view control - I notice that data is correctly passed on for display in view class. However, I tried to create a list view control pointer like this:
CListCTRL* pList = (CListCTRL *) GetDlgItem (IDC_List1);
which in turn gives me runtime error in winocc.cpp that debug assertion failed at line 94:
Line 94 in winocc.cpp is
ASSERT(::IsWindow(m_hWnd));
If anyone knows how to fix this problem or have any tips, I would surely appreciate.
Bruce
|
|
|
|
|
At the point in which you are calling GetDlgItem() , no such control having an id of IDC_List1 exists (yet).
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
David,
Thank for replying. Let me share some details...
i have created the listview control. I tried to create the listview in the function OnInitialUpdate and it worked successfully.
My need is to keep both windows open like receiver and sender mechanism i.e. Data is passed from one form having edit control and after sending data, display them in listview in separate form. But when i tried to do the same in my defined function (in addition to OnInitialUpdate) i.e. AddData(), I face this problem.
The sequence of code follows. Both Functions exist in the same cpp file.
void CTestView::OnInitialUpdate()
{
CFormView::OnInitialUpdate();
ResizeParentToFit();
m_pSelection = NULL; // initialize selection
CListCtrl* pList = (CListCtrl*) GetDlgItem(IDC_LIST1); // THIS ONE WORKS
pList->InsertColumn(0,"ym",LVCFMT_CENTER,140);
pList->InsertColumn(1,"Ws",LVCFMT_CENTER,70);
pList->InsertColumn(2,"State",LVCFMT_CENTER,50);
}
void CTestView::AddData(LPCTSTR tn,LPCTSTR cn,LPCTSTR ts,LPCTSTR cv)
{
int i=0,j=0;
int flag = 0;
j=rowcount-1;
//pointer to the listview control
CListCtrl* pList = (CListCtrl*) GetDlgItem(IDC_LIST1); // THIS ONE DOES NOT WORK
pList->InsertItem(0,ts);
}
Bruce
|
|
|
|
|
Bruce Pataki wrote:
I tried to create the listview in the function OnInitialUpdate...
Why are you creating a list view at runtime rather than deriving the view from CListView ? This would allow you access to the underlying list control using GetListCtrl() .
If, however, you are using a CFormView with a list control instead, create a CListCtrl member variable instead of using GetDlgItem() .
When does AddData() get called?
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
|
I am using a CProgressCtrl m_PPROG in my main dialog class;
how can i call m_PPROG.SetPos(value) from another function in another class without creating another object of the main class?
/\|-||\/|/\|)
|
|
|
|
|
Since the progress control is owned by your "main dialog class," good design dictates that only that dialog should interact with the progress control. If some other class needs to interact with the control, it should send/post a message to the owning dialog class, or the owning dialog class should have a public method, that others can call, for setting the control's position.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|