|
Thanks Rajkumar,
Sorry for my English reading.
You mean change the static property of the method has some practical usage and is not bad code?
Rajkumar R wrote: IMHO why not. template specialization is the additional flexibility. Normally if you are not using it, you will find it sometimes useful.
regards,
George
|
|
|
|
|
yes, IMHO. i am not getting a good usage now to give.
George_George wrote: Sorry for my English reading
No. may be i am poor in english
|
|
|
|
|
Thanks Rajkumar,
My question is answered.
regards,
George
|
|
|
|
|
After I add the manifest file, it works.
But still has a problem, when I select an item, the image become invisible, it's fine when I use LVS_EX_BORDERSELECT .
---------------------
#define WINVER 0x0501
#define _WIN32_WINNT 0x0501
m_lstPic.ModifyStyleEx(0,LVS_EX_HIDELABELS);
I think this should be ok, why there is still labels?
----------------------
I used LVS_ICON style.
The problem is that I can't control the size of the label well.
Is there any way?
Thanks
modified on Saturday, February 23, 2008 7:15 AM
|
|
|
|
|
How can I browse filesystem in windows mobile device with SHBrowseForFolder
Hello, everyone.
I plan to develop one application that have to copy file to windows mobile device. Users will specify the directory of windows mobile device. So I have to pop up one dialog to let user to select.I try to use SHBrowseForFolder to select directory in windows mobile device. But it does not work.
There is no 'Mobile device' direcoty under desktop.I can browser this device by window's exporer. I even can access Nokia device with SHBrowseForFolder.The device is Jingpeng S6186. It used windows mobile 5.1.478. ActiveSync's version is 4.5.0.
|
|
|
|
|
Hello everyone,
Some study these days about address of exported function in DLL. It is appreciated if you could review and comment.
(for C++ DLL/EXE only)
1.Inside DLL
For the DLL itself, in its build process, it has to decide the address of each function in the result binary file (.dll), right? I think each exported function in the dll biinary file has a definite absolute address, which is based on the default load base address of the DLL, right?
2. Inside EXE
For the EXE, which utilizes the DLL, since there may be DLL rebase, which changes the base load address of the DLL into EXE process space, the address of the exported function of the DLL is not known until EXE load time and the final rebased address of the exported function of the DLL is put into the IAT of EXE.
In other words, the same function of the DLL, may have different address in different EXEs, which loads the DLL into related process space of EXE.
So, all the places where invokes the dllexported function, will use a function pointer to point to the IAT entry of the related dllexported function to form a indirection level function call. No address of DLL exported function is known and written to the EXE binary until load time address fix-up.
My understanding of (1) and (2) correct? Any comments?
thanks in advance,
George
|
|
|
|
|
George_George wrote: 1.Inside DLL
For the DLL itself, in its build process, it has to decide the address of each function in the result binary file (.dll), right? I think each exported function in the dll biinary file has a definite absolute address, which is based on the default load base address of the DLL, right?
This is correct. The DLL also contains relocation information which contains all the data needed by the loader relocate the DLL if needed.
George_George wrote: 2. Inside EXE
For the EXE, which utilizes the DLL, since there may be DLL rebase, which changes the base load address of the DLL into EXE process space, the address of the exported function of the DLL is not known until EXE load time and the final rebased address of the exported function of the DLL is put into the IAT of EXE.
In other words, the same function of the DLL, may have different address in different EXEs, which loads the DLL into related process space of EXE.
So, all the places where invokes the dllexported function, will use a function pointer to point to the IAT entry of the related dllexported function to form a indirection level function call. No address of DLL exported function is known and written to the EXE binary until load time address fix-up.
This is mostly correct. A minor point:
When you say "DLL rebase" it looks like you mean "relocate". "Relocation" is the when the loader changes the address of a DLL because the address is already taken. "Rebase"ing is similar but is not performed by the loader at runtime but by a tool which alters the actual executable.
Steve
|
|
|
|
|
Thanks for your correction, Steve!
My question is answered.
regards,
George
|
|
|
|
|
I am using gdi plus to draw the string i.e. DrawString() every thing is fine but I could not find any method to change the following.
1.text outline border width and color.
2.text background color.
can any one help me
Trioum
|
|
|
|
|
I think Graphics::DrawString() renders only text,
trioum wrote: 1.text outline border width and color.
use Graphics::DrawRectangle()
trioum wrote: 2.text background color.
use Graphics::FillRectangle()
and order can be background fill, Text, border.
|
|
|
|
|
how can I change the text outline border width and color
Trioum
|
|
|
|
|
trioum wrote: how can I change the text outline border width and color
Did you already done and just want to change
if not, may be the following is useful. i just learnt how to.
Graphics graphics(hdc);
WCHAR szText[] = L"Sample Text";
Font arialFont(L"Arial", 16);
RectF layoutRect(25.0f, 25.0f, 150.0f, 25.0f);
StringFormat format;
format.SetAlignment(StringAlignmentCenter);
graphics.FillRectangle(&SolidBrush(Color(255, 100, 100, 100)), layoutRect);
graphics.DrawString(szText,11, &arialFont, layoutRect, &format, &SolidBrush(Color(255, 0, 0, 0)));
graphics.DrawRectangle(&Pen(Color::Black, 1), layoutRect);
|
|
|
|
|
Hello All,
I'm getting
libc.lib(crt0.obj) : error LNK2019: unresolved external symbol _main referenced in function _mainCRTStartup error in a Win32 based application. IDE I'm using is VC++ 7 (Visual Studio .Net 2003). How it can be solved?
Any help is highly appreciated.
Come online at:-
jubinc@skype
|
|
|
|
|
int main(int argc, char * argv[])
{
return 0;
}
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
what is ur project type, DLL, win32 console, windows .... ?
May be the project ur working is different from the project settings.
May be u r creating the project with setting for WIN32 console for the existing source files written for DLL.
|
|
|
|
|
Open MSVisualC++.
Select Tools ->Customize from the MSVC menu.
Click on the Add-ins and Macro Files tab.
like this way i fallow ...but MATLAB for Visual Studio on the Add-ins and Macro Files list is not showing...PLZ help me...How to Configure the Matlab Add-in for Visual Studio vc++ 6.0..PLZ
#sanroop#
|
|
|
|
|
|
Dear All,
I want to use a new gina instead of msgina, I wanna use a fingerprint device for logon, I have to call a method of a dll using the finger print device. I have made all my changes and there is no error. while I call this method, even if I don't use the output of the function the windows logon, the desktop is shown and a moment later this message is shown on a blue screen and the system is shut down.
"STOP: c000021a {Fatal System Error}
The windows logon process system process terminated unexpectedly with a status of 0x0000005 (0x00000000 0x00000000).
The system has been shut down."
Do anyone have an idea?
Thnx in advance.
|
|
|
|
|
I have two lan cards in my Server in such a way that Lan Card a1 is connected to internet and holds Public IP infomration and Lan card a2 is meant for private internal network and holds internal IP information and connects to client machines in my internal network.
In my coding, I want to develop a module that can show me realtime IP addresses and/or computer name of the Client machines that are using internet via server in my internal network
plz reply me on mirtunjay.prodata@gmail.com and mirtunjayteri@gmail.com
|
|
|
|
|
How can this be done ?
Engineering is the effort !
|
|
|
|
|
|
The previous Post and ExtractIconEx is always at your service...
A Second Solution: (b******ized version)
There's always LoadResource(),FindResource()
modified 20-Oct-19 21:02pm.
|
|
|
|
|
Hello,
The question I have doesn't have a single correct answer. But I'm curious about what is a good solution, so I want to know the option of other people. Let's say you store some information about your users. Like name, address, a description of themselves, etc in a struct.
Now you have (at least) 2 options to save this data:
1) Fixed sized array: struct { char name[26]; char description[256]; };
2) Pointer: struct { char *name; char *description; };
Now I'm wondering what the best solution is. A fixed sized array is of course a bit easier, no need to malloc/free. But there will be wasted memory, or even worse, not enough memory to save the data.
Now what I'm really wondering about is the best method to create a struct that uses these pointers. My current idea is: I read a line from the input, save it in a temp char buffer, calculate the length of the string, malloc the space needed and finally copy the string to the malloc'ed memory. Is this a good algorithm? Or are there better/more efficient ways to do this?
NOTE: This is more oriented to standard C, not really C++.
|
|
|
|
|
With C, you don't have the advantages of the more modern string classes, so just
malloc'ing what you need for each string is probably the most memory efficient.
Note this is assuming in-memory storage....if you're referring to persistent storage, like a disk
file, then storing allocated pointers doesn't apply.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
I have a main program that creates some threads, then goes into an event loop. The structure is:
main()
{
CreateThread....
CreateThread.....
while(1)
{
WaitForSingleObject(Main_Event)
.... do some processing....
}
}
I would like to increase the priority of "main" so that when "Main_Event" is sent, the threads suspend while main loop is processing.
Any idea how I can do this?
|
|
|
|
|