• Forum
  • Windows Programming

Windows Programming

by admin
Welcome to this board!
 
Welcome to the Windows forum in C++.com! In this forum, users can to talk about any topic related to programming in C++ for the Windows platform. Feel free to...
[no replies]
Messages associated with custom control not visible in Class Wizard!
 
HI, I am using MFC with VS2022. I have a custom control grid and when I create an object of it in a dialog, the possible messages associated with its type ar...
[2 replies] Last: Thank you jonnin. However we can't add notification messages that are ... (by JUANDENT)
by ruzip
Run program and make window active
 
How do I run a program with win32 context as active? Currently it is always shown as inactive. I already used SetFocus(handle) and still inactive.
[4 replies] Last: Thanks guys. I think this has something to do with parenting a child w... (by ruzip)
by jNc
how to release HDC object
 
HDC object hwindowDC increase memory,but it must be flushed with destructor tried below DeleteObject(hwindowDC); DeleteDC(hwindowDC); Cancel...
[9 replies] Last: still does not flush memory On line 72 the window dc is released. I.e... (by coder777)
by Kaega2
Setting up Win32 for Mingw
 
I'm running into a lot of errors when I'm trying to run Win32 program examples. I want to make sure I have everything setup correctly. Most examples online ...
[8 replies] Last: Thank you. It works :-) (by Kaega2)
How do I design a button?
 
This function creates two default buttons. void Buttons::send_button(HWND hWnd) { CreateWindow(L"Button", L"Choose File", WS_VISIBLE | WS_CHILD, 53, 315, 1...
[2 replies] Last: I believe you can, instead, register that an image has been clicked an... (by jonnin)
Where to find Win32, COM, MFC, ATL tutorials?
 
I have to learn windows programming for my job since the code base I currently work with uses MFC and ATL. I've never used them for writing C++ windows apps and...
[6 replies] Last: The "Bible" of Windows API programming: "Programming Windows", Fifth ... (by George P)
by Mobo01
Views are created in SQL Server.
 
In SQL Server, I'm constructing the view shown below. create view View_CAM as SELECT '5' FUNCTION, getdate() UPLOAD_DATE, 'U' STATUS, NULL INITIATED_DAT...
[1 reply] : I think you have to put some kind of limitation on the subquery, like ... (by jonnin)
Reading a single byte from file.
 
Hi, I am having an issue with reading a single byte from a file. I want to read a byte from a file and set a NumericUpDown controls' value to the byte that w...
[4 replies] Last: > What solved the issue was using (unsigned char) in brackets. > hmm ... (by JLBorges)
Windows API not working on Win 11
 
Hello guys, I recently written code to capture an image doing basically: #include "windows.h" #include "vfw.h" #include <cstdio> #pragma com...
[1 reply] : Tested on my PC with Windows 10 and it does not work. I have a bmp fil... (by Geckoo)
HScrollBar value glitch
 
Hi, I created a HScrollBar control and set its maxvalue to 255. Changing its value will show the value in a NumericUpDown control. When I scroll to its maximu...
[5 replies] Last: Thanks for the explanation. Hmm that makes sense. (by Cyclone)
How to create an MFC custom control in VS2022?
 
Hi, I need to make an MFC custom control that enables me to draw bidimensional graphs... I am going to start looking in internet but though I also asked for ...
[6 replies] Last: And what about ImGUI? https://github.com/ocornut/imgui https://blog.co... (by Geckoo)
win32 - DIBs - can i use the a pixel array(HBITMAP), from 1 HDC, to another HDC(HBITMAP)?
 
ok.. using the GetCurrentObject() i can get the HBITMAP and the GetObject() give the BIMAP. using once the GetDIBits(), without using the pixels array, from th...
[6 replies] Last: now i can draw a line with a texture.. tomorrow, i will update it for ... (by Cambalinho)
A Simple way to play a sound on a form?
 
Hi, just trying to play a sound when the user presses a button. This won't compile. Gives a very long error message which I don't understand mciSendString(...
[6 replies] Last: ... which are now also the same as PTSTR and PCTSTR since Windows move... (by seeplus)
by Geckoo
Random numbers (1,2,3)
 
Hello. I have no questions today, but I need some explanation about this method so as to generate a random number. I made a little test using this code - an alt...
[52 replies] Last: Good coffee is just wasted on this Pleb and villein. (by George P)
How to show an image by a new window by providing char sequence?
 
Hello guys, in order for me to understand videostreams correctly, i need to know if threre is a way to not save a file into lets say .PNG et ceter and to then...
[3 replies] Last: Just showing pixel data on screen in Windows is dead simple. Basically... (by mbozzi)
How to send real time screenshare over tcp windows socket?
 
Hello all, i just wondered how i could screenshare over a tcp socket connection. I want the client to send real time pictures to the server, which then disp...
[4 replies] Last: It sounds like you want to re-invent VNC 😏 https://en.wikipedia.... (by kigar64551)
can we change console output to CP_UTF8 but using only C++ standard?
 
can we change console output to CP_UTF8 but using only C++ standard instead of windows functions? How do we build the locale to specify UTF8 and then imbue that...
[1 reply] : Already answered in your other thread: https://cplusplus.com/forum/win... (by kigar64551)
What is the encoding of CString? (1,2)
 
CString is a wchar_t based string type; what encoding does it use? how can one translate from CString to std::string? Thanks! Juan
[30 replies] Last: I think this is very platform-specific to Windows and probably can't... (by kigar64551)
can i create a texture line?
 
we can create a HPEN or HBRUSH. but can i create a HPEN from an image?
[4 replies] Last: If I read correctly or ExtCreatePen() function, with LOGBRUSH::lbHatch... (by Cambalinho)
  Archived months: [nov2022]