 |

|
Would you mind to say how old you are ? Just curiosity.
|
|
|
|

|
Old!
One of these days I'm going to think of a really clever signature.
|
|
|
|

|
Just wanted to know your age .
|
|
|
|

|
Why, is it relevant to anything?
One of these days I'm going to think of a really clever signature.
|
|
|
|

|
Richard MacCutchan wrote: Why, is it relevant to anything?
No just the reason is why people put their age in their profile. Just to let people know. I don't mean to relate it to anything.
|
|
|
|

|
Sorry I don't understand. I don't have my age in my profile and nor do most people, so where did this question come from?
One of these days I'm going to think of a really clever signature.
|
|
|
|

|
Richard MacCutchan wrote: I don't have my age in my profile and nor do most people, so where did this question come from? But some have their age in their profile. For example you have told in your profile "I hope someday I will become a real programmer" because you want others to know it. Otherwise you could just say what does it have to do with other people. I don't care. Probably you don't want others to know your age for personal reasons and I respect it.
|
|
|
|

|
What people put in their profile may not have anything to do with reality, don't take it too literally.
devboycpp wrote: I hope someday I will become a real programmer I still hope this.
One of these days I'm going to think of a really clever signature.
|
|
|
|

|
As already noted by Richard, this can't be simply done if there is no method provided like for the Explorer.
I will try to explain how context menus are handled:
When clicking the right mouse button, the window under the mouse cursor will get a WM_CONTEXTMENU message. When pressing the context menu button on the keyboard (commonly left of the right ctrl key), the window which has the focus will receive this message.
The WM_CONTEXTMENU handler will then create and show the menu. This is usually done by loading it from resources. But the complete menu or portions may be also created dynamically by code. It is also common practice to modify resource based menus dynamically according the current context (gray out, remove, add, or change items and sub menus).
To modify a menu, you must know the handle that is assigned upon menu creation (with resource based menus the handle of the sub-menu because that contains the items). If you want to insert new items, you must also know about the existing items (order, position, sub menus, separators).
If you really want to try it, you must hook the API functions CreateMenu(), CreatePopupMenu(), and TrackPopupMenu[Ex](). But I'm not sure if this will work.
|
|
|
|

|
hi, i need to run my app with administrator priviledges, however i have noticed that when run as admin ::SetCursorPos and mouse_event dont work. when run as a normal user they both work as expected. keybd_event works either in admin or normal user mode. anyone know why this is? thanks
|
|
|
|

|
There must be something else going on in your code. I have just tested this on a small program and it works exactly the same as normal or admin user. If this was a problem then much of Windows would not be working.
One of these days I'm going to think of a really clever signature.
|
|
|
|

|
ok thanks mate. you were of course correct. if anyone cares the problem was i was hooking cbtproc to record mouse events and llkeyboard for keyboard events.this works in user mode but in admin mode HCBTPROC wasnt getting recorded. i swithced it to llmousehook and now its all good. thanks for your help
|
|
|
|

|
Hallo,
I'm doing a program in WINAPI. In form with grid ( ListView ) after double click new form is opened.
I wont to open more then only one window, but when I'm clicking on another line there is no effect. I wont to have more new windows opened in the same time.
INT_PTR CALLBACK DlgK3 ( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam )
case WM_NOTIFY:
hdr = ( LPNMHDR )lParam;
if ( hdr -> idFrom == IDC_LIST2 )
{
if ( hdr->code == NM_DBLCLK )
{
DialogBox(g_hInstance,MAKEINTRESOURCE(IDD_STATISTIKA),
g_hWnd, (DLGPROC)DialogStatistika); }
}
break;
|
|
|
|

|
Dialogbox creates a model dialog, you have to create a model less dialog using CreateDialog() function.
http://www.winprog.org/tutorial/modeless_dialogs.html
|
|
|
|

|
Thank you
|
|
|
|

|
Hello all!
I am trying to determine if a HDC points to the desktop. To do that I use WindowFromDC() which works fine under XP but returns 0 under Vista/7.
Is there any way to determine it using some other method??
Thank you all very much!!
|
|
|
|

|
In windows 7, WindowFromDC() works fine.
Following code gives Desktop window handle.
HDC hDcDesktop = ::GetDC(0);
HWND hWindowDesktop1 = ::WindowFromDC(hDcDesktop);
How you are getting the DC to Desktop ?
|
|
|
|

|
To get the desktop window handle I use the GetDesktopWindow function.
HWND hwndDesktop = GetDesktopWindow()
|
|
|
|

|
Hi,
I want call a MFC regular DLL from a API program. The MFC DLL is supposed to be a dialog baesd application which can open the file and display the chart.
My questions are
1) Is it possible to do so ?
2) How it is called within API program ?
3) Can anyone supply some sample code ?
thanks in advance.
Daniel
|
|
|
|

|
1. See 2.
2. What is an "API program"
3. Google may be able to.
If you are asking how to use a MFC library from a non-MFC program, then I am not sure if that is possible. You would need to ensure that all function calls provide the parameters in the form required by the MFC classes.
One of these days I'm going to think of a really clever signature.
|
|
|
|

|
Hi,
How to set 1024x720 resolution in Windows 7?
My monitor does not display 1024x720 in list
============================================
The grass is always greener on the other side of the fence
|
|
|
|

|
Nitin Sawant wrote: My monitor does not display 1024x720 in list
The list contains the "supported" resolutions. If the mode isn't listed, the driver will not support it. Your best chance would be an update for the driver.
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
|
|
|
|

|
I want to provide link to access file in network, executed below line in command prompt
mklink \\MyMachineName\CommonStorage\test.txt c:\test.txt
I tried following command
fsutil behavior set SymlinkEvaluation L2L:1 R2R:1 L2R:1 R2L:1 on both machine bt still not working when I tried to open file from other machine it says can not open file \\\\MyMachineName\CommonStorage\test.txt"
I am doing it on Win7 64 bit m/c..
|
|
|
|

|
As an Admin? From Wikipedia[^];
The default security settings in Windows Vista/Windows 7 disallow non-elevated administrators and all non-administrators from creating symbolic links. This behavior can be changed in the Local Security Policy management console (under: Security Settings\Local Policies\User Rights Assignment\Create symbolic links). It can be worked around by starting cmd.exe with Run as administrator option or the runas command.
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
|
|
|
|

|
I am looking for suggestions on a programming language to use. I wish to write a couple programs for Windows 7/Vista/XP (maybe not XP if it is an issue) but I would like to do it with minimal extra learning involved.
I want a simple Windows client program to be able to accept data inputs from the user and store it on the hard drive. At some point, that data must be transmitted to a server across the internet. I do not expect the data size to be over one kilobyte. The server program must accept the data and store it in a database. The client may also download configuration settings from the server.
Some features I am looking for are:
- Free or low-cost programming environment is a must.
- An no-install executable for the compiled client program is preferred, but not completely necessary.
- The programming language should be easy to learn. Details below.
- Faster creation of the programs helps. I don't have a lot of free time between college and work.
- The server's database should be one that is commonly used in the industry.
I have a rough understanding of C++ from a couple college courses I took a few years ago. I also worked with Visual Basic back when Windows 98 was the latest OS. Creating Windows programs now seems a lot more complex than I remember from using Visual Basic. I have tried using Visual Studio Express C++ and it seems more complex than what I need.
Thanks in advance for the suggestions.
|
|
|
|

|
Visual Basic; download the Express[^]-version of the IDE, and you're good to go.
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
|
|
|
|
|

|
Yeah, from the stone age!
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|

|
I think that may have been the version I used.
Thanks for the suggestion. I have downloaded VB Express 2010 and started to tinker with it. Things have definitely changed a lot since I last used it 14 years or so ago. I am going to have to re-learn how to program, but VB looks like the fastest way to do so with enough flexibility to ensure I can create what I need to create.
|
|
|
|

|
Michael Haephrati wrote: VB6 has its magic...
Maybe 15 years ago.... You might want to change has to had
"Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus
|
|
|
|

|
After I have been accepted to the BizSpark program I have downloaded VB6 which still works and is excellent for small tasks...
|
|
|
|

|
Michael Haephrati wrote: I have downloaded VB6
It's not a free download, and no longer for sale. It's a proprietary app that has been discontinued.
Recommending it for current development is not even an option.
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
|
|
|
|

|
I am a member of BizSpark. Didn't know its not available.
|
|
|
|

|
...and will teach you all kinds of bad habits you will have to unlearn in order to step up to using a modern language!
|
|
|
|

|
My habits are c++ and I don't plan to change them
|
|
|
|

|
Yours may be, but every noob who touches VB6 are screwing themselves over. There just no reason at all to suggest VB6 for anything in this day and age.
|
|
|
|

|
I prefer VB6 over VB.NET...
|
|
|
|

|
Michael Haephrati מיכאל האפרתי wrote: I prefer VB6 over VB.NET...
That only tells me that you have more experience in VB6 than you have in VB.NET, nothing else. Objectively, VB.NET is technically superior. I too, prefer the things I know, above the unfamiliar things.
Problem with using it today is that there's no support; security-flaws aren't corrected, no new servicepacks will be coming. New software that's developed (Sql Server 2012) does not take the existence of VB6 in account, as far as Microsoft is concerned it's simply deprecated.
My apologies for pushing you into the defensive in the first place; you're right that it's a beauty, which is why it so actively refuses to die - despite our efforts.
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
|
|
|
|

|
You are probably right. I do have feelings to "nostalgic" things, and VB6 looks more "compact" and less heavy. Usually I work with VS2010 and stick to c++.
|
|
|
|

|
i want to create a virtual printer,then get data from virtual printer and process data
i use Passthrough XPS driver to get data in xps type
then i install redmon to redirect the virtual printer to my c# program
my c# program get data and save it in a file,but i can't open file with xps viewer
what is the problem?
this is my c# code
static void Main()
{
string fname = Environment.GetEnvironmentVariable("TEMP") + @"\";
fname += "1.xps";
FileStream fs = new FileStream(fname, FileMode.Create);
StreamWriter sw = new StreamWriter(fs);
StreamReader sr = new StreamReader(Console.OpenStandardInput());
sw.Write(sr.ReadToEnd());
sw.Flush();
sw.Close();
sr.Close();
}
thanks
edit: redmon simulate postscript,so it doesn't work with xps
modified 26-Aug-12 14:49pm.
|
|
|
|

|
Wouldn't this question be better posted on the frogmorecs site? They know the product.
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|

|
Hello Sir/Mam
I'm trying connect sql server 2000 in windows service with other system on same network.
there are 4 system connected without any problem. But on other 4 system, it is giving error
on connection open while starting windows service. The error is: "the service on local computer started and then stopped some services stop automatically" etc. Same Connection string working in web service
without any error. But giving problem in Window Service. Is there any Configuration setting of that server or sql server 2000. Any help will be highly appreciated.........
|
|
|
|

|
I encountered your question on three different forums. Don't cross-post.
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
|
|
|
|

|
It seems that the Windows 8 DLLs are not digitally signed. This makes it considerably easier for piracy protection to be circumvented since malware writers can now trivially replace the Windows DLLs.
Did I miss a memo?
Cheers,
Guy
|
|
|
|

|
I do not remember them being signed in Win7. Nor in Win3.1.
Which memo? And on which base where you expecting a signed assembly? Signing does not stop pirates, not a bit.
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
|
|
|
|

|
Signing slows down pirates. Our security relies on the Win7/Vista/XP DLLs being signed so we can check that they haven't been replaced.
G
|
|
|
|

|
Guy Davidson wrote: Signing slows down pirates.
It didn't, actually. Windows File Protection has been changed for that reason; there are tools available that make it quite easy, and there are tutorials on youtube.
Looks like it has replaced with Windows Resource Protection[^] since Vista.
..and no, no pirate would go through the trouble of copying an existing Windows-system. A pirate would simply download an existing copy that does not have the key-protection (ideal for larger companies, bulkinstall)
From what I understood, W8 would even stop my scripts if not signed. I haven't touched it yet, so I can't say much about the (security) features. FWIW, you can still verify your system files with the System File Checker[^]
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
|
|
|
|

|
I can assure you it did, we had a very enjoyable game of cat and mouse with them at our last release, a AAA game title, watching torrents of still-protected versions clogging the internet. The question is more why have Microsoft STOPPED signing their DLLs, particularly after they have gone to such great lengths historically to get developers to sign theirs? Is there a replacement security mechanism I should have been made aware of?
|
|
|
|

|
Guy Davidson wrote: The question is more why have Microsoft STOPPED signing their DLLs, particularly after they have gone to such great lengths historically to get developers to sign theirs?
Because it was broken, I guess.
Guy Davidson wrote: Is there a replacement security mechanism I should have been made aware of?
Seems to be replaced by Windows Resource Protection, as I already mentioned.
Guy Davidson wrote: we had a very enjoyable game of cat and mouse with them at our last release, a AAA game title, watching torrents of still-protected versions clogging the internet
Sounds like fun, but not like a very fruitful endeavour. I'm butting out, seems you have the wrong person to answer your query.
Good luck hunting
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
|
|
|
|

|
I think your answers are a little too high level: I suspect digital signing is the means by which WRP was achieved. WRP has been around since Vista, but it's not the means we adopt to achieve our goals.
The endeavour was quite fruitful in that it delayed the cracking of the game. That's worth sales, believe it or not!
Thanks for your help.
G
|
|
|
|
 |