|
I took a quick look at the source. It doesn't do any alignment; just the straight-forward
*(target++) = *(src++);
kind of thing. I suppose they're relying on the compiler to recognize the pattern, and substitute the appropriate idiom for memory copy on the selected platform. I guess if the compiler is smart enough, that's a good; well, a *portable* way to do it...
|
|
|
|
|
Ahh...I didn't really look at the source other than to verify that it was actually a memcpy implementation. Oh well...
|
|
|
|
|
Hello!
I am trying to change the width of the scrollbars of certain controls in a project I am developing.
It is funny enough, that if I am changing the Appearance settings in XP, the size of the scrollbars are changing.
I was trying to use the GetSystemMetrics Function. If I override it be the use of the Detours lib, and with passing the intended width, the sizes of the scrollbars remain as specified in the "Appearance settings".
How can I programatically change the Appearance settings for only one program? As it seams not working with the GetSystemMetrics
Thanx
Zoltan
-- modified at 14:05 Wednesday 10th October, 2007
The MoveWindow and SetWindowPos unfortunately does not solv the problem as that will make the arrows of the scrollbar to look squashed.
|
|
|
|
|
Standard scrollbars use the system metrics settings.
Scrollbar controls, however, are windows, so you can use
MoveWindow()/SetWindowPos() to resize them.
If you want control over the size, use scrollbar controls.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Thanx Mark!
That is true definitely! However - it seams I did not describe fully my problem.
If I do MoveWindow or SetWindowPos, the width may change but the arrow will become flat - I may change the width of the scrollbar from 16 to 32, but the height of the arrow will stay 16 and it makes it look "squashed", and that what I'd want to avoid.
Mark Salsbery wrote: Standard scrollbars use the system metrics settings.
which scrollbars are you referring to? The ones subclassed with CScrollbar? /not part of any control/
Zoltan
|
|
|
|
|
tortexy wrote: If I do MoveWindow or SetWindowPos, the width may change but the arrow will become flat
That's what you'll get if you want Windows to draw the control for you.
You may want to implement your own control
tortexy wrote: which scrollbars are you referring to? The ones subclassed with CScrollbar? /not part of any control/
Standard scroll bars are the ones you get when you specify the WS_HSCROLL/WS_VSCROLL
style(s) when creating a window. Without access to an HWND for those, you can't change
their size.
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
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
|
|
|
|