|
Mark!
Thanx for the help.
Are you familiar with the Theme or System metrics stuff?
As I said I have overrode the getSystemMetrics function. I was catching the functions for SM_CXVSCROLL, SM_CYHSCROLL, SM_CYVSCROLL,SM_CXHSCROLL. I could see it returning different values (the values as changed in the Display properties).
I have changed these also, but the widths of the scrollbars were as set in the Display settings.
I mean, why is that, if changing the Appearance at the "Display Properties", the appearance of the scrollbar changes, it increases its width and so on, but it is not possible to be done programaticaly.
Or if it is possible how to do it?
|
|
|
|
|
Does anybody know how to get windows vista to work with direct music to send MIDI messages...Direct music 2003 allows me to play samples but I want to modify the code...
Rance_Wilson
|
|
|
|
|
The project can recognise CString, but when I went to use CDatabase I got the error
CDataBase db;
do stuff with db....
'CDatabase' : undeclared identifier.
Do I need to include something? I thought since the project has MFC support it would automatically recognise CDataBase.
thanks,
sb
|
|
|
|
|
I'm not sure why you think the compiler would automatically recognize any
unknown types...
You probably need to include afxdb.h
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
how right you are! It worked.
thanks Mark.
sb
|
|
|
|
|
ns wrote: Do I need to include something?
Yes, read here (near the bottom) for what.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
|
but something is mentioned here : https://www.ittvis.com/services/techtip.asp?ttid=3346
Ajay
|
|
|
|
|
Did you understand the article? I'm not being nasty, that is a serious question. The short answer to your question is: Rebasing only affects memory allocation in that it can "sometimes" create a larger non-fragmented chunk of free memory by forcing DLLs to load into a different memory location. A larger chunk of contiguous free memory means a larger allocation request can be filled. That's the gist of what the Rebase section of the article says. If that still doesn't make sense, you need to do some learning on how processes and their support DLLs are loaded into memory, and how memory allocation is performed.
Judy
|
|
|
|
|
Hello Friends,
I am using win32 application. In that I hide the Application on Dialog Initialization and put the icon in the taskbar. I am using the Context menu in taskbar. Ans Want to show the window when someone choose the Exit option of the menu. But it show me the strange Error.
Error code = 0x000005B4 which means "This operation returned because the timeout period expired. "
I am using following code
LRESULT CALLBACK MyDialogProc(...)
{
ShowWindow(hWndDlg,SW_HIDE);
switch(message)
{
case WM_TASKMSG:
if(lParam == WM_RBUTTONDOWN)
{
POINT pt;
GetCursorPos(&pt);
TrackPopupMenuhmenuTrackPopup,NULL,pt.x ,pt.y,0,hWndDlg,NULL);
}
break;
case WM_COMMAND :
switch(LOWORD(wParam))
{
case ID_Exit:
if( ! ShowWindow(hWndDlg,SW_SHOWNORMAL) )
{
dError = GetLastError();
}
}
}
}
I search lot on google for this error but it show that this type of error comes with database(SQL Connection) only.And not getting any solution
Please Help me if u know the solution. Thnx in advance
|
|
|
|
|
GauranG33 wrote: I am using win32 application. In that I hide the Application on Dialog Initialization and put the icon in the taskbar. I am using the Context menu in taskbar. Ans Want to show the window when someone choose the Exit option of the menu. But it show me the strange Error.
Error code = 0x000005B4 which means "This operation returned because the timeout period expired. "
First, don't hide a window in the first line of a dialog proc. It will be called many times for many reasons. Also, I think calling ShowWindow could involve a recursive call to your dialog proc, which immediately hides the window again.
Nathan
|
|
|
|
|
Hi. Thnx for you reply.
Can you please tell, Then Where to put the ShowWindow() Funcion to hide the Window.
Because when I use it at the statring or ending of WM_INITDIALOG it shows me
different errors as follows
WM_INITDIALOG:
{
if( ! ShowWindow(hWndDlg,SW_HIDE) )
dError = GetLastError();
...
...
if( ! ShowWindow(hWndDlg,SW_HIDE) )
dError = GetLastError();
}
|
|
|
|
|
Do you know what ShowWindow() returns? Your code assumes that if it returns a zero value, there must've been an error. That's an incorrect assumption.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
GauranG33 wrote: Can you please tell, Then Where to put the ShowWindow() Funcion to hide the Window.
I haven't seen your code to create the dialog, but your problem could be that it's a modal dialog, which makes specific assumptions about when the dialog is shown and hidden. If you make a modeless dialog and its template doesn't specify that the window is visible, then the dialog will remain hidden till you want to show it.
|
|
|
|
|
I want to extract properties from .docx/.xlsx file using VC++. Anyone here who can help me out.
|
|
|
|
|
docx and xlsx are actually zip files. rename some into .zip and you'll find your happiness
|
|
|
|
|
To Whom It May Concern,
I have a C++ application which connects to an FTP site (using a third-party FTP software) , uploads a file (a request), waits for the request to be processed (signaled by creation of another file) and proceeds to download that file. So as you can see it's pretty straight forward.
However some of my clients are warning me against using FTP (security reasons) and they are asking if I can develop an application that would use HTTPS instead. I'm not sure how to go about doing this. For starters are there third-party applications that allow me to make an HTTPS connection (taken into account all the different firewalls, etc... settings that my current third-party FTP software handles) and secondly can my application still just upload a file using HTTPS, and download the answer as it currently does? Has anyone here ever rewritten a FTP application to work with HTTPS instead?
I realize that this may seem silly to some of you experts out there but ANY help or guidance you can give me in this matter is greatly appreciated.
Yours,
A.
|
|
|
|
|
al_in_the_city wrote: ANY help or guidance you can give me in this matter is greatly appreciated.
I suggest you read about both FTP and HTTP/HTTPS until you fully understand them. Giving you a short description in a forum response would not satisfy your need to fully understand the protocols. However considering your eagerness to relegate responsibility to third party components you might consider using Google to find some as there are many so that shouldn't be difficult.
|
|
|
|
|
Hi A,
U R concern is to upload a file to a server .
fist question is do u wish to use the mange code or don't want .NET classes in your code ?
If you say u use .NET ur all set very easy task :
Use the WebClient or HttpWebRequest .
If you say u dont want manage code :
The protocol u want to use is HTTPS , so you should use WinInet or WinHTTPS
I have struggled to upload the file with WinHTTPS .
If u get the upload right let me know we can share our experience
Vikas Amin
Fedex
|
|
|
|
|
Hey Try WinHTT API's
Those work great ..............
I just had a successful test
Bless You
Vikas
Vikas Amin
Fedex
modified on Friday, August 1, 2008 11:39 AM
|
|
|
|
|
I have a dumb question. I basically have two issues that are for the same question. I am using Microsoft Visual Studio 2005 C/C++ compiler.
The first issue is that I have a basic C application that will read in a text file, excel file, SQL 2005 database file and import them to Oracle. The code does not use any of the MFC foundation classes or even the C++ classes. It is basic C. The code does use Oracle' pro-C compiler to interact wit the Oracle database but that is not the question.
I compiled my code on Windows XP Professional using static linked libraries. I am not using any Window specific DLLs except what is available for the C compiler. I want to compile my code on Windows XP and run the application .EXE on Windows 2000, Windows 2000 Server, and Windows 2003. I found out that I could do this. I successfully ran my application built for Windows XP on Windows 2000, Windows 2000 Server and Windows 2003 without a problem.
I am basically linking with the PlatformSDK out of MS Visual 2005 Studio. I just want to verify that I will have no problem. I tested it and it appears to be no problem.
The second issue is that I also have a GUI application that uses the Windows SDK for GUIs (no C++ MFC foundations). This application creates a dialog box and adds buttons and menus that allow the user to create schedules for the oracle database via a GUI interface As I mentioned it is an older version of code that is just being maintained. It was also built on Windows XP and runs on Windows 2000 and Windows 2003.
The question:
1. Does anybody know if compiled code (statically linked) built on Windows XP will cause an issue on Windows 2000, Windows 2000 Server and Windows 2003?
2. Do I have to install VC8 Dlls? It appears that I do not since I am using the PlatformSDK and basic C.
Thanks
Dennis Russell
|
|
|
|
|
Statically linked is good but not the same thing as self contained. Every API call you make will still end up in a version dependent Windows Dlls, that shouldn't attempt to update, loaded at runtime from a runtime determined location with the potential for the function to be missing on older versions of Windows. Even the statically linked C Library makes runtime calls to Windows Dlls, some before your code even gets executed when your process starts.
Provided you code defensively to allow for this where you can then you shouldn't have any other problems on the versions you mentioned. Running code accross NT and non NT based (i.e 9x/ME) versions is another kettle of pirhanas.
Nothing is exactly what it seems but everything with seems can be unpicked.
|
|
|
|
|
Thanks Matthew,
I appreciate it.
|
|
|
|
|
I'm getting errors like this
error C2664: 'GetModuleFileNameW' : cannot convert parameter 2 from 'char *' to 'LPWCH'
char szFilespec [_MAX_PATH]; // filespec // Get name of .exe file //sans name
::GetModuleFileName (0, szFilespec, _MAX_PATH);
and
error C2664: 'atoi' : cannot convert parameter 1 from 'ATL::CStringT<basetype,stringtraits>' to 'const char *'
time_t CLogRead::GetTimeFromStrings(char *chDate,char *chTime){
struct tm t;
CString tmpStr;
CString strMonth;
tmpStr = chDate;
tmpStr +=" ";
tmpStr += chTime;
t.tm_year = atoi(tmpStr.Mid(7,4)) - 1900;
i seem to recall this is something about Unicode. How do I change my project tio get rid of these compile errors? I'm not familiar with the IDE so if you could direct me how to,I'd appreciate it.
thanks,
sb
|
|
|
|
|
Open the project properties, go to "C/C++" -> "Preprocessor" and click on the "Preprocessor Definitions" line. A button will appear on the right of this line, click on it this will display a dialog. On this dialog uncheck the "Inherit from parent or project defaults".
|
|
|
|