1,671 Topics

Member Avatar for
Member Avatar for cambalinho

i build a class for create a static control(label). and i't cool. but why the SetTextColor() and SetBkColor() are ignored? case WM_PAINT: { PAINTSTRUCT ps; HDC hdc = BeginPaint(inst->hwnd, &ps); // TODO: Add any drawing code here... SetBkColor(hdc, RGB(0,255,0)); SetBkMode(hdc,TRANSPARENT); SetWindowText(inst->hwnd,"hello"); EndPaint(inst->hwnd, &ps); } the inst is the class(label) pointer …

Member Avatar for pmmarc
0
3K
Member Avatar for vegaseat

Things don't have to be black and white all the time. Use a Windows API call to add some color to your text output.

Member Avatar for Dani
2
77K
Member Avatar for Reverend Jim

This is yet another thing that everyone just accepts, but nobody can tell me why this decision was made. Everyone is familiar with the Windows screen coordinate system where x and y values increase to the right, for x, and down, for y. What is not noticible until you start …

Member Avatar for Reverend Jim
1
470
Member Avatar for Xozz

What I would like to do is to register a couple of shortcuts to move the mouse cursor. The cursor should jump from the one square area of the screen to the other. The question that comes to mind first is: which keys are not used (or at least not …

Member Avatar for Viki_1
0
224
Member Avatar for Member #1042208

Hello fellas, recently i hit upon an to develop a small program to lock screen. As a part of it, I need to lock taskbar from functioning, i.e should not show up when pressed Start Button, or Ctrl + esc or not even Ctrl + alt + Del. I dont …

Member Avatar for Rythorian
0
943
Member Avatar for vegaseat

What "Hello World" is to the console, the "Bouncing Ball" is to the Graphical User Interface. Nothing fancy, the ball is created via a call to the API function ellipse() and then bounced within the confines of the windows form. For the DEV C++ crowd: Let me know if you …

Member Avatar for laheg
2
25K
Member Avatar for woodslab90

These is a project that a guy shared on GitHub that has all the information(code) for creating a windows application. That app will receive data from an arduino uno and change it into g-code for a post processor Mach3. I can use his app(exe.) with no problems, but I would …

Member Avatar for RobDownUnder
0
192
Member Avatar for Debasis_1

I am an intermediate in VC++ and trying to accomplish the following:- 1. Dock a timer created using Windows forms to the extreme right of the taskbar (and to the left of the notification area or system tray). 2. Make it responsive (match its height with that of the taskbar, …

Member Avatar for rproffitt
0
61
Member Avatar for Alv45525

Hi, I would like to know if there is a CMD command line in order to get a computer name on which an AD user is logged on. For example, inputting the username and as result getting the computer name

Member Avatar for rproffitt
0
33
Member Avatar for takesure
Member Avatar for JamesCherrill

At the risk of making a total fool of myself... I got very excited when I discovered that Java's "only opaque rectangular windows" limitation has been removed. Full release is intended for Java 7, but working methods can be accessed thru com.sun.awt.AWTUtilities in recent releases of Java 6 (I'm using …

Member Avatar for Reverend Jim
2
1K
Member Avatar for amvx86

Hey everyone, I'm looking to add a block / function within a C++ application that will search for open windows. For instance, wordpad and notepad. If either are open perform an action. I'm doing this within win32 API but my question is this. If I create something as such, this …

Member Avatar for rproffitt
0
622
Member Avatar for cppgangster

Hi I am developing using C/C++ window application using winapi. I will be using some standard STL containers and some win api functions provided by windows.h. I would like use the app on different windows versions such as windows 7 and 10. The apps will be builded for x86 architecture. …

Member Avatar for zigale
0
585
Member Avatar for Quaternions

Hello, I'm trying to create an environment variable by parsing a very ugly XML file returned by a curl command. Contained in the XML is a MAC address that I'm trying to use FINDSTR to find and then SET it as an environment variable for the local user. Here is …

Member Avatar for Reverend Jim
0
1K
Member Avatar for ajSauro

Suppose that I construct my own programming language and my own compiler (for windows), I am free to use WINAPI like "CreateWindowEx"?

Member Avatar for rproffitt
0
156
Member Avatar for cambalinho

i'm trying using the GNU compiler with command lines( using the ShellExecuteEx()). when i do: string FileName1="C:\\Program Files\\mingw-w64\\x86_64-7.2.0-win32-seh-rt_v5-rev1\\mingw64\\bin\\x86_64-w64-mingw32-g++.exe"; run(FileName1,"-c \"C:\\Users\\Cambalinho\\Documents\\CB\\testfolder\\bin\\Debug\\test2.cpp\""); the object file is created. these line creates the exe: run(FileName1,"-o C:\\Users\\Cambalinho\\Documents\\CB\\testfolder\\bin\\Debug\\test2.exe C:\\Users\\Cambalinho\\Documents\\CB\\testfolder\\bin\\Debug\\test2.o"); (tested) but the exe have some dependencies... so seen the Code Blocks: x86_64-w64-mingw32-g++.exe -Wall -g -std=c++14 -c …

Member Avatar for cambalinho
0
2K
Member Avatar for cppgangster

Hi I am trying to get windows positioned in specific order as show below ![desired.PNG](/attachments/large/3/6447240b1491d04046fa904f31659f9b.PNG) but I am unable to get and get always this ![wrong.PNG](/attachments/large/3/71f4b92c4f40a6afeeab7e3c2f136526.PNG) the code below is shown HDWP cmdWnds; cmdWnds = BeginDeferWindowPos(col.size()); for (int i = 0; i < col.size(); i++) { if (i == 0) …

0
347
Member Avatar for catastrophe2

I wrote a script that manages services on the server and starts/stops etc...depending on the Task in the csv file, as well as changes the startuptype, again depending on the start up type in the csv file. CSV file: > Server,Service,Startup Type,Task > server1,SQL Server Analysis Services (MSSQLSERVER),automatic,start > server2,"SQL …

Member Avatar for rproffitt
0
1K
Member Avatar for overwraith

I would like to be able to open a port on windows programatically. I don't care whether is power shell, or something else, but I would like it to be a script that I can simply run as I install a software program. I have no experience in this area, …

Member Avatar for rproffitt
0
965
Member Avatar for cambalinho

how avoid memory leaks? from here: http://www.winprog.org/tutorial/bitmaps.html i learned: GetDC() - ReleaseDC() BeginPaint() - EndPaint() CreateCompatibleDC() - DeleteDC() i must get the old selected object. select it when isn't needed and then delete it. so seen these constructor and desctructor: image(const int width, const int height) { if (isimgused==true) delete …

Member Avatar for Topiary
1
1K
Member Avatar for everett.davidson1

I have a client who can not download her attachments throught the windows mail app. Their mail server is gmail and they do not have a windows account. If they go into the desktop and go to their gmail they can download the attachments with no problem. Is the issue …

Member Avatar for Claudio_3
0
2K
Member Avatar for otengkwaku

Hi guys have a python software that i want to freeze for distribution. The problem is after freezing it with cx_freeze and i run it, it works fine on my development computer but when i sent it to my testing computer (window XP sp3 32bit) it give me this error …

Member Avatar for Thomas Karl
0
2K
Member Avatar for DeanMSands3

Trying to pipe data into FINDSTR, but I'm getting whole lines and not the matching substrings. Have I asked this one before? Let's say the data takes the form of BLAH BLAH BLAH BLAH BLAH BLAH "GOOD UNIQUE DATA" BLAH BLAH BLAH BLAH BLAH BLAH "SLIGHTLY DIFFERENT GOOD UNIQUE DATA" …

Member Avatar for pty
0
1K
Member Avatar for Reverend Jim

I've never been a fan of readme files. They are fine for project files where you will likely need note of building an application, or for distribution packages where you might need extra information on installing a package. But sometimes you want to add a comment to a file (perhaps …

Member Avatar for Reverend Jim
2
809
Member Avatar for byron_2

One can do this in the registry for normal pics and I have NO idea what it isn't standard. Is it possible to modify it for Windows Picture Viewer. Using 10. Hate the new picture viwer app also. Why does Windows suck so much??

Member Avatar for Reverend Jim
0
125
Member Avatar for Wiki_Tiki

Hi, I need help playing a sound in Visual C++ 2008. (Windows Forms App). I've tried many things searching on google, I used this method: [CODE]PlaySound("beep.wav", 0, SND_LOOP|SND_ASYNC);[/CODE] Then I get the error, "'PlaySoundW' : cannot convert parameter 1 from 'const char [9]' to 'LPCWSTR''. Can anyone help me play …

Member Avatar for sahana_3
0
704
Member Avatar for vedmack

Heya i want to use ShowWindow(hWnd, SW_HIDE); to hide some application, The problem is that the code i wrote works perfectly for any application except the one i need it for heres the code [CODE] HWND hWnd = FindWindow(NULL, sName); if(hWnd) { ShowWindow(hWnd, SW_HIDE); } [/CODE] it does execute the …

Member Avatar for Gustav_1
0
10K
Member Avatar for Reverend Jim

I frequently find myself looking for files on my computer. 99.9% of the time I am looking for a file by name rather than by contents. Typically there are two ways to find a file when you don't know what folder it is in. You can do it from the …

Member Avatar for rubberman
2
690
Member Avatar for jhamb.manish

How to check for Windows Installer 1603 errors, how to check for the causes and solution for these errors. Can we check for these kind of errors in Microsoft.Net programming.

Member Avatar for no1uknow2010
0
154
Member Avatar for pauly_1

Why should microsoft didnot do the proper update for Internet explorer.There is lot of problem of explorer

Member Avatar for DMR
0
375
Member Avatar for Ghast

Does anyone have any idea what language is this launcher application made in ? I have to decompile it to launch a game in english (since the launcher is broken and can not be launched on Windows 7) and I don´t know what language is this made in. Originaly I …

Member Avatar for Ghast
0
279
Member Avatar for davy_yg

Hello, I am looking for Win 7 version that is able to capture windows screen more than 1024 x 768. Does anyone have any idea? Thanks, Davy

Member Avatar for rubberman
0
135
Member Avatar for Jim_11

Hello, I was able to show the notepad in the Winform by using a panel and inserting it in the form like this code below and using SetParent API: [DllImport("user32.dll", SetLastError = true)] static extern IntPtr SetParent(IntPtr hWndChild, IntPtr hWndNewParent); Process proc = Process.Start( new ProcessStartInfo() { //here I put …

Member Avatar for rproffitt
0
214
Member Avatar for Suzie999

I'm having trouble calling unmanaged dll function from the windows win32 apis. I've tried many ways, but the following was my first and what I think should work. using System.Diagnostics; using System.Runtime.InteropServices; namespace Win32DllImports { class Program { [DllImport("Urlmon", EntryPoint = "ObtainUserAgentString", CallingConvention = CallingConvention.StdCall, CharSet = CharSet.Ansi)] private static …

Member Avatar for Suzie999
0
392
Member Avatar for Churchillrl

Hi, I am working on a personal vb.net project that will allow me to capture a full-sized image of a given web page. I've been working on this for a few of days and have not found a method that is 100% reliable. Here's what i have tried so far... …

Member Avatar for _1_18
1
4K
Member Avatar for Member #1111627

Hi all, I'm trying to replace text in a CSV. The CSV line looks something like this: "Field One","Field Two","Field Three","Field Four" So I tried something like: (Get-Content $csvfile) -replace "Field`n", "Field" | Set-Content $csvfile

Member Avatar for Member #1111627
0
409
Member Avatar for Werwerwerw

Hi, I have a hooked function, NtTerminateProcess. I am trying to get the full path to the process handle passed to TerminateProcess. The injected app is taskmgr and GetProcessImageFileName is returning ERROR_ACCESS_DENIED. I even tried opening another handle to the process to ensure I have the required access rights, like …

Member Avatar for Werwerwerw
0
491
Member Avatar for Qazinix

I am having an issue with my program it should start the msconfig program when the button is pressed but it doesn't start, however when I change the file name to Cleanmgr it starts up perfectly. ShellExecute(handle, 'open', PChar('cleanmgr'), nil, nil, SW_normal); ShellExecute(handle, 'open', PChar('msconfig'), nil, nil, SW_normal); I assumed …

Member Avatar for Qazinix
0
479
Member Avatar for cambalinho

i did a class for the timer precision using the timeSetEvent(). of course i can have more than 7 instances from the Timer class(with 200ms or something so small). is these a limitation or what? class Timer { private: static unsigned int TimerCount; UINT_PTR timerid; UINT m_uResolution=0; unsigned int TimerID=0; …

0
304
Member Avatar for amvx86

Good Morning, For the last few weeks I've been searching HIGH AND LOW. All forms, dozens of tabs open, and bought about 200 bucks in books. My goal is to learn the windows win32 API and I'm hitting brick walls everywhere I look. So far, I've learned that findwindow (or …

Member Avatar for rubberman
0
281
Member Avatar for Member #892855

I have app with only one button in grid. If I launch mi app and my button has focus my code works pretty much fine except I can’t detect when space is pressed. If I don’t select button first, nothing happens. How can I get pressed key regardless which element …

0
111
Member Avatar for Diamonddrake

I am working on a combination productivity and source/version control app. One of the features i would like to add might sound crazy, but I would like to substitute the User's windows Desktop folder with the project files "Working Directory" That way, until the the software is exited, or the …

Member Avatar for Kelly_5
1
901
Member Avatar for cambalinho
Member Avatar for hallianonline

I want to find the MAC address of network adopter, I have a working code too but my problem is it only works if IP addres is enabled otherwise it won't get the address is there any solution to find MAC address even if IP Enabled is false if its …

Member Avatar for DenisOxon
0
278
Member Avatar for cambalinho

can i add 1 item on standard System Menu? (my big objective is just add 1 item for put the window allways on top)

0
217
Member Avatar for Mr.M

Hi Dw. I'm new to C++ nor Win32 app dev. I want my app to stay open or running even if I'm not interacting with it. And how to write a close call. In VB to close it you just right: Close() How can I achieve these two? Also how …

Member Avatar for tinstaafl
0
256
Member Avatar for Mr.M

I'm getting "error C2039: 'AllocSysString' : is not a member of 'System::Char' error. I'm trying to assign the result to a string variable. wchar_t str; return str.AllocSysString(); But I'm getting the above error.

Member Avatar for tinstaafl
0
219
Member Avatar for Kenny Robertson

Hi Guys! "can you teach me how to Disable Button Until All Textbox Is Not Empty." in my design form Named login. I have 2 textbox and 2 buttons I want to disable the buttons until all textbox is not empty i try everything i know but its not working …

Member Avatar for JOSheaIV
0
1K
Member Avatar for Darth Vader

Hello, I have an application that is not mine, that has 6 textboxes with values on it. I am trying to use the windows API to retreive the values from those textBoxes. I know that they exists in a control named "Panel1". So I have come so far in the …

Member Avatar for Suzie999
0
742
Member Avatar for Darth Vader

Hello, I wonder how it would be possible to get text from a datagridview in another form application? The datagridview has 5 rows and 5 columns with text in each cell. I know that this could be achieved with windows API but googling around I have not understand how to …

Member Avatar for Darth Vader
0
1K

The End.