You can try with SetForegroundWindow[^]
Doc
You can try with SetForegroundWindow[^]
Doc
Message boxes are xp/vista style by default. If you're seeing flat buttons maybe that's because of the parent window. Don't use HWND_DESKTOP (or 0) and make sure you have created and initialized the parent window to use. Hope it helps :)
You posted "twyce" :laugh:
Did you close all the connections before trying to delete the database file?
yourLabel.Text = DateTime.Now.ToString();
VS uses a property grid to show the properties of a control. You have to define the editors to use in your property, so when the grid access your class (by reflection), it knows what editor to use. The editors must be of the type UITypeEditor. You can sub-class it to create your own editors. The file browser is the System.Windows.Forms.Design.FileNameEditor
class. You define the editor in this way:
[Editor(typeof(System.Windows.Forms.Design.FileNameEditor),typeof(System.Drawing.Design.UITypeEditor))]
public string YourProperty
{
...
You can find more information on this MSDN article. BTW, you need to link the System.Design library to use the filename editor.
I'm not sure if this is what you're looking for, but you can find a windows app called rasphone.exe in C:\Windows\System32. So, something like this might help:
ShellExecute(0, 0, _T("rasphone.exe"), 0, 0, SW_SHOW);
When you execute that, it will let you connect, disconnect, and edit properties of you network connections. Hope it helps. :)
You should think of an algorithm with the division ( / ) and mod ( % ) operators to split a number. For example: 513 % 10 = 3 -> Last digit 513 / 10 = 51 51 % 10 = 1 -> Second digit 51 / 10 = 5 5 % 10 = 5 -> First digit 5 / 10 = 0 -> END Think a bit.
format c:\ :-D Seriously, it will solve all your problems.
rotter
So, somewhere in your code you have something like this:
YourControl control = Activator.CreateInstance(...);
this.Controls.Add(control);
You have to associate the events after creating the object, before the control variable goes out of scope:
YourControl control = Activator.CreateInstance(...);
this.Controls.Add(control);
control.MouseDown += ... ;
control.MouseUp += ... ;
After writing += press tab and visual studio completes it for you. However if the you are trying to do something internal to the YourControl class, you should encapsulate the behavior in the class, associating the events in the constructor. Cheers,
rotter
You can add them to resources. All you have there is embedded in your app executable. However you can't easily extract them to a folder. You can use an installer to do that. To add anything to resources just go to the properties folder under your project (in the solution explorer) and edit the Resources.resx file. You can add existent or new files. After you add them you can access them through Properties.File1 for example. Cheers,
rotter
When I first read "Indexer" I didn't know what you mean, but after seeing the example I realized you were talking about the [] operator. I think that almost every C++ developer might know that, as you can overload a lot of operators in C++ and it's something very useful. BTW, the GetXXX method, is a method that connects to the internet and downloads adult contents from a porn site. :laugh:
rotter
This should work: string[] finalResult = new string[apiresult.Length]; for (int i = 0; i < apiresult.Length; i++) { finalResult[i] = apiresult[i].Substring(apiresult[i].IndexOf('=')+1); } Don't be afraid of loops. :) Cheers
rotter
modified on Saturday, August 16, 2008 11:41 PM
Maybe inheriting CCmdTarget works. It's CWnd's base class. From MSDN: "The base class for the Microsoft Foundation Class Library message-map architecture."
rotter
I didn't find the article, but if you need to play sound using the winmm.lib library, the function you need is: sndPlaySound(filename, SND_MEMORY|SND_ASYNC|SND_NODEFAULT);
rotter
You shouldn't have any problems in doing what you're trying. The only detail I see is the way you are declaring the run method in the derived class. Why did you include "ReactorServer::" ?
rotter The metaller programmer
The problem is that you're sending the messages to the main window. Maybe the edit control that processes the chars is a child window of the main. You can find it with spy++. Hope it helps
rotter The metaller programmer
Nevermind. I found the problem. I used the problematic function before and it seems it remained somewhere in the compiled code. A rebuild solved it. :) Thanks anyway
rotter The metaller programmer
Hi everyone, I'm trying to use some registry functions from the Windows API in a native C++ project. The thing is that I'm getting an error that says RegGetValueA cannot be found in ADVAPI32.dll, but I'm not using that function. Instead I'm using RegQueryValueEx. Anybody knows why this happens? Thanks
rotter The metaller programmer
I really don't understand why people still use IE with all the nicer and faster browsers out there. Be careful with the cookie monster :laugh:
rotter The metaller programmer