Quantcast
Channel: CodeGuru Forums - Visual C++ Programming
Browsing all 3021 articles
Browse latest View live

Changing all vcxprojs recursively for the whole solution

I have recently moved a project previously created with cmake, it annoys me because the paths are absolute, I have to seek every path that corresponds to the change. Which is time-consuming, tedious...

View Article


Error on code

Hey guys last code i am writing. I am getting errors on one part. The professor provided this part. i have posted the directions i have to go by and part of the code below. Date Class: Design and...

View Article


How to secure sql database server using SSL for an MFC Application ?

I am using Microsoft OLEDB Provider for SQL Server to create connection.I followed below steps to make my connection SSL secured step 1. I installed self signed certificate on server and attach it with...

View Article

CreateFile returns a 0xffffffff error

The target file already exists in the same folder as the starting program. Any ideas? Thanks Jack Code: if(!pe->bLoadFromBuffer) {                 DMSG("Creating Map View of File");...

View Article

CMFCRibbonBar High DPI

In my (otherwise) high DPI aware MFC application, I use a ribbon bar as the primary interface. I've provided high resolution (48x48) image strips, but when displaying on a high DPI (4k) monitor, these...

View Article


Testing hotkeys from GetMessage

When I retrieve the message from Code: if(GetMessage(&msg,NULL0,0) != 0) {     if (msg.message == WM_HOTKEY)     {         // do something     } } I can get a hotkey stroke from the message pump....

View Article

Attaching a custom theme to a standalone explorer.exe

Hi there, I've now got a simple virtual desktop app working...But I can't have different themes for each desktop. So is it possible to attach one (desk.cpl etc) to a standalone explorer.exe, this...

View Article

CString::MakeUpper fails

Hi, i´ve created a new mfc application sample project with VS2015 Update 3. I used the default settings of Visual Studio and added these 3 lines in CMFCApplication1Dlg::OnInitDialog() CString XXX =...

View Article


Using command line to open the same application but different file

Hi all of you. I come here with a problem: can I use command line to open the same application, but different file ? How ? Here is the situation: I have a SDI app, with CView based on CEditView, which...

View Article


Simulating hardware mouse click

Hi, I am trying to simulate a mouse click with SendInput(). It works well. However, it is not possible to click on a virtual keyboard with this method. What can I do to be able to click on the virtual...

View Article

HBITMAP: can i get the selected HDC?

HBITMAP can or can not be selected to a HDC. and the HBITMAP can be selected, only, once, unless we unselect it. know these and using HBITMAP on a function parameter, can i get it's HDC? (i don't mean...

View Article

How to link undocumented windows apis?

For example, there is an api in windows called SHCreateDesktop, It is located in shell32.dll, but Microsoft keeps this symbol private, so using shell32.lib won't link in the api to the executable. If I...

View Article

[RESOLVED] HBITMAP: can i get the selected HDC?

HBITMAP can or can not be selected to a HDC. and the HBITMAP can be selected, only, once, unless we unselect it. know these and using HBITMAP on a function parameter, can i get it's HDC? (i don't mean...

View Article


ellipses and macro definition

I'm trying to compile some code which has a line looking like this:- Code: #define PRINT_MSG(fmt, args...) printf(fmt, ## args) I'm building with MSVC 2005 (so this is possibly something that's...

View Article

How to call CreateProcess and Waitforsingleobject/ MsgWaitForMultipleObjects?

Hello, from my main app I want to call another gui-app. But what is the correct way? Ok, first I need to call CreateProcess. But then? Do I need to follow it by Waitforsingleobject or...

View Article


MFC ProgressBar makes Application Slow

Hello I have a problem with my progress bar: Code:                         std::string line;                         std::ifstream infile(ExtractFromFile, std::ios::binary);...

View Article

vcproj files

For various corporate reasons I've been stuck with VC8 for the past few years but I've finally been given permission to update to something more recent :cool: The bad news is that I have around 11...

View Article


[RESOLVED] MFC ProgressBar makes Application Slow

Hello I have a problem with my progress bar: Code:                         std::string line;                         std::ifstream infile(ExtractFromFile, std::ios::binary);...

View Article

write a C++ program that repeatedly prompts a user to input a positive...

write a C++ program that repeatedly prompts a user to input a positive integer value. At any point, if the user enters 0 or a negative integer value, then the program should print the minimum of all of...

View Article

Line 427 error in atlsimpstr.h

Hi, Read serial process done by thread and write serial process done by millisecond timer (ex: 1000Millisec) and store it to edit control - serialdata[datalimit++]. Here, datalimit = 8192. datalimit...

View Article
Browsing all 3021 articles
Browse latest View live