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

const expr debug in visual studio

Hello experts I found the workaround for this. VS still doesnot show the const expr local variables via debugger. Thanks pdk

View Article


::cryptDecrypt Fails with Unicode

Hey Gurus, I'm frustrated by an issue I have when trying to decrypt some data. I have two projects, both decrypting the exactly the same data. One project uses unicode and the other doesn't. The...

View Article


Help with RichEdit control

I want to clear RichEdit control. But, I set the attribute of RichEdit control CFE_PROTECTED. So I couldn't clear RichEdit control. I think that I should set the attribute of RichEdit control again(...

View Article

ShellExecute tries to launch .exe everytime even though it is already runniong.

Hey All, I have written two programs. Both of them have a mutex so that only one instance of each can ever be run at a time. Program one uses ShellExecute to send information to program two. Here's a...

View Article

DnD in the ListCtrl

Hi, ALL, The native ListCtrl on Windows/Win32 do not support DnD. So I implemented it with catching begindrag event, capturing mouse and mouse up event. However, there is no visual cue about dropping...

View Article


Is this valid for printf (in MSVC)

I'm trying to run a program that runs fine when built with gcc - and it builds okay with MSVC but crashes at run time. I've traced the crash to a call to vsnprintf() which is getting passed a string...

View Article

MFC mouse click coordinates

I have a CScrollView with a large image being shown and scrolled. When the user clicks, I respond to the L button down. how do I convert the mouse click coordinates to the corresponding point in the...

View Article

C++ Error cannot convert parameter 1 from 'System::Drawing::Pen' to...

[Note that this relates to c++/cli and not to standard c++]

View Article


Noob question: Don't know how to build this.

Hello, I am new to coding and I need some help to figure out how to build this project so I can finally debug my crappy code: https://github.com/lesderid/gdb-msvc Currently I am using Red Panda C++ as...

View Article


Counting logical (wrapped) lines in the text control

Hi, ALL, There is a EM_GETLINECOUNT, but it counts physical lines of the coyntrol, i.e. basically counts '\n\r' symbol. Is there a way to count number of logical (wrapped) lines in the text control?...

View Article

LNK2019 linker error when initializing an object

Hi all, This is the code that I have. I got this code and I need to work with it: Code: #include <iostream> #include "queueType.h" int main() {     queueType<int> qt(100);     for (int i =...

View Article

OpenMP compute pi

Hello, I am working my way into OpenMP. The following code is supposed to compute pi. It works fine for one thread, but in case of multiple threads the relative error gets larger. Can anyone spot the...

View Article

C2882: 'ClassLibrary2' : illegal use of namespace identifier in expression

Hi all, I need your help.I am working on a class library project using c++ to create the function that I want to use to call the function from my windows application. When I try this: Code:...

View Article


What Are the Visual C++ Effects on Programming?

I'm interested in understanding the impact of Visual C++ on programming. Can anyone explain how using Visual C++ affects the development process? I'm particularly curious about its advantages, such as...

View Article

Format problem?

Code: int main() {         std::cout <<  std::format("{:< 8f}", .111111); } displays 0.111111 but I need .111111 (no initial 0). Is this possible just using format or do I need to manipulate...

View Article


Error 1425: Invalid device context (DC) handle

Hi, if this is not the right place to post my question I would appreciate if someone could direct me to the proper forum. I am using FORTRAN to build my code, but the win32 API is used by interfaces to...

View Article

[RESOLVED] Console programming in Visual Studio

I have switched to using Visual Studio community 2022 on Windows 10. Producing a hello world to the console is no problem. My issue is that I can not change the console title (it stays with - Microsoft...

View Article


Greek letters in RichEd

Hi, I need to programmatically add letters of the Greek alphabet (and other characters) to RichEdit. I tried different manipulations with the Font property, applied Unicode encoding for the characters...

View Article

Displaying .bmp images in a window

Hello, My name is Mick and this is my first ever post on this forum. I have written several working C++ applications over the years using Borland and now MS Visual Studio, such as a Hex Editor, a...

View Article

Help needed in conversion

Hello, Its been a while here now. But I had lot of help earlier. Im facing one issue in conversion: In the current code, Code:     long Xmin = -228725;     long Ymax = 10023525;     unsigned long uiRes...

View Article
Browsing all 3046 articles
Browse latest View live