Click here to Skip to main content
16,004,574 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: dialog color Pin
OriginalGriff2-Aug-24 18:32
mveOriginalGriff2-Aug-24 18:32 
QuestionMFC CIPAddressCtrl - How to detect blank field (octet)? Pin
Member 163267082-Aug-24 11:35
Member 163267082-Aug-24 11:35 
AnswerRe: MFC CIPAddressCtrl - How to detect blank field (octet)? Pin
CPallini4-Aug-24 20:05
mveCPallini4-Aug-24 20:05 
GeneralRe: MFC CIPAddressCtrl - How to detect blank field (octet)? Pin
Member 163267085-Aug-24 5:23
Member 163267085-Aug-24 5:23 
GeneralRe: MFC CIPAddressCtrl - How to detect blank field (octet)? Pin
Member 163267085-Aug-24 7:15
Member 163267085-Aug-24 7:15 
QuestionRe: MFC CIPAddressCtrl - How to detect blank field (octet)? Pin
David Crow5-Aug-24 9:21
David Crow5-Aug-24 9:21 
AnswerRe: MFC CIPAddressCtrl - How to detect blank field (octet)? Pin
Member 163267085-Aug-24 11:54
Member 163267085-Aug-24 11:54 
GeneralRe: MFC CIPAddressCtrl - How to detect blank field (octet)? Pin
David Crow6-Aug-24 2:38
David Crow6-Aug-24 2:38 
Member 16326708 wrote:
In my case, making sure iNonBlankOctets is never less than the total number of octets...
The return value of IPM_GETADDRESS is a DWORD that is broken up into 4 pieces, one for each of the four octets. There is no count.

A possibly better option would be to call GetWindowText() on the CIPAddressCtrl's control. Getting the string representation of the IP address would allow you to parse and validate the octets. You would still get 0 for empty ones, though.

"One man's wage rise is another man's price increase." - Harold Wilson

"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles



modified 6-Aug-24 10:08am.

GeneralRe: MFC CIPAddressCtrl - How to detect blank field (octet)? Pin
Member 163267087-Aug-24 7:23
Member 163267087-Aug-24 7:23 
Questionerror CS5001: Program does not contain a static 'Main' method suitable for an entry point Pin
Pieter Claassens30-Jul-24 2:00
Pieter Claassens30-Jul-24 2:00 
AnswerRe: error CS5001: Program does not contain a static 'Main' method suitable for an entry point Pin
Mircea Neacsu30-Jul-24 2:22
Mircea Neacsu30-Jul-24 2:22 
AnswerRe: error CS5001: Program does not contain a static 'Main' method suitable for an entry point Pin
Richard MacCutchan30-Jul-24 2:36
mveRichard MacCutchan30-Jul-24 2:36 
AnswerRe: error CS5001: Program does not contain a static 'Main' method suitable for an entry point Pin
Dave Kreskowiak30-Jul-24 3:52
mveDave Kreskowiak30-Jul-24 3:52 
JokeRe: error CS5001: Program does not contain a static 'Main' method suitable for an entry point Pin
David Crow1-Aug-24 3:53
David Crow1-Aug-24 3:53 
QuestionCan not find where to define an identifier.. Pin
Carbonkevlar1324-Jul-24 23:52
Carbonkevlar1324-Jul-24 23:52 
AnswerRe: Can not find where to define an identifier.. Pin
Richard MacCutchan25-Jul-24 0:22
mveRichard MacCutchan25-Jul-24 0:22 
GeneralRe: Can not find where to define an identifier.. Pin
Carbonkevlar1325-Jul-24 0:43
Carbonkevlar1325-Jul-24 0:43 
GeneralRe: Can not find where to define an identifier.. Pin
Richard MacCutchan25-Jul-24 0:58
mveRichard MacCutchan25-Jul-24 0:58 
AnswerRe: Can not find where to define an identifier.. Pin
CPallini25-Jul-24 0:26
mveCPallini25-Jul-24 0:26 
GeneralRe: Can not find where to define an identifier.. Pin
Carbonkevlar1325-Jul-24 0:41
Carbonkevlar1325-Jul-24 0:41 
GeneralRe: Can not find where to define an identifier.. Pin
CPallini25-Jul-24 1:01
mveCPallini25-Jul-24 1:01 
GeneralRe: Can not find where to define an identifier.. Pin
Carbonkevlar1325-Jul-24 1:12
Carbonkevlar1325-Jul-24 1:12 
GeneralRe: Can not find where to define an identifier.. Pin
CPallini25-Jul-24 1:23
mveCPallini25-Jul-24 1:23 
GeneralRe: Can not find where to define an identifier.. Pin
Carbonkevlar1325-Jul-24 2:10
Carbonkevlar1325-Jul-24 2:10 
QuestionRe: Can not find where to define an identifier.. Pin
CPallini25-Jul-24 2:51
mveCPallini25-Jul-24 2:51 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.